Esri / Esri/arcgis-python-api

Lighten or make the heavy package dependencies optional

Open
#1,692 24 comments 6 reactions 0 assignees View on GitHub
enhancement
Dominant language
Python
Stars
2.2k
Forks
1.2k
Avg merge
2h 40m
Merged PRs (30d)
2

Description

**Is your feature request related to a problem? Please describe.**
My problem is the dependencies of the arcgis package are so big and heavy its extremely onerous to incorporate arcgis into an existing Python application, even though often the features of arcgis we use don't require any of the really heavy dependencies (jupyter, pillow, ipywidgets, pandas, dask, numpy, matplotlib, etc.)

E.g. dependencies for arcgis 2.2.0

```python
dependencies = [
"pillow",
"urllib3>=1.21.1,<3",
"cachetools",
"lxml",
"notebook",
"cryptography",
"ipywidgets >=7,<8",
"widgetsnbextension >=3",
"jupyter-client <=6.1.12",
"pandas >=2.0.0,<3",
"numpy >=1.21.6",
"matplotlib",
"keyring >=23.3.0",
"pylerc",
"ujson >=3",
"jupyterlab",
"python-certifi-win32;python_version<'3.10'",
"truststore>=0.7.0;python_version>'3.9'",
'pywin32 >=223;platform_system=="Windows"',
"pyshp >=2",
"geomet",
"requests >=2.27.1,<3",
"requests-oauthlib",
"requests_toolbelt",
"pyspnego >=0.8.0",
"requests-kerberos",
"requests-gssapi",
"dask >=2023.3.2",
"matplotlib-inline",
]
```

**Describe the solution you'd like**
I'd like the arcgis package restructured or designed to make all the really heavy dependencies optional, so I can only include the ones I need for the functions I use.

**Describe alternatives you've considered**
The first alternative I tried was continuing to use arcgis as is and tolerating the hundreds of megabytes of additional dependencies it would pull in that we didn't need, and the extra 10+ minutes of dependency resolving time this would incur every time we need to update our own dependencies.

The current alternative I use (which is very time consuming and painful for me) is to perform the operations I do need with arcgis, reverse engineer the requests it makes to the REST API, then re-implement the minimal parts of the arcgis package I need for my own application.

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.