archook
Searches the (windows) system for arcgis and makes arcpy available to python (regardless of pythonpath/system path/registry settings). It's typically used when using a python distribution that's wasn't installed by ArcGIS. Ones downloaded direct from Python.org or a conda environment for two examples.
If ArcGIS is not found, an ImportError is thrown.
Use pro=True to target ArcGIS Pro instead of ArcGIS Desktop.
Example usage
ArcGIS Desktop
try:
import archook #The module which locates arcgis
archook.get_arcpy()
import arcpy
except ImportError:
# do whatever you do if arcpy isnt there.
ArcGIS Pro
try:
import archook #The module which locates arcgis
archook.get_arcpy(pro=True)
import arcpy
except ImportError:
# do whatever you do if arcpy isnt there.
Note: You may need to create a conda-meta directory in your Python interpreter's directory (referred to by sys.prefix) if you get an error like the following:
ImportError("arcpy needs to run within an active ArcGIS Conda environment")
Installation
Regular install with pip:
pip install archook
Install in developer mode using Git:
git clone https://github.com/JamesRamm/archook.git
pip install --editable .\archook
Install in developer mode manually:
- Fetch https://github.com/JamesRamm/archook/archive/master.zip
- unzip
%userprofile%\downloads\archook-master.zip - run
pip install --editable path\to\archook-master
Metadata
Release files for archook-dbc 202202.1.2045
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | Actions |
|---|---|---|---|---|
| archook_dbc-202202.1.2045.tar.gz | 12.1 kB | Without provenance | Details for archook_dbc-202202.1.2045.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| archook_dbc-202202.1.2045-py3-none-any.whl | Python 3 | none | any | Details for archook_dbc-202202.1.2045-py3-none-any.whl |
Total release size: 24.9 kB
Release files / archook_dbc-202202.1.2045.tar.gz
| Download URL | archook_dbc-202202.1.2045.tar.gz |
|---|---|
| Size | 12.1 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
ffe998b6ecb63e005bfd2a76ce1b5d6ec6ce07420e6214574a7f1df26dfb24a4
|
|
BLAKE2b-256 checksum How to use checksums |
569f1ed5004ab7c9e9c7cba55a6bfa739dda92f5ac3f0d1ba6f93d18dd8acf6d
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/3.2.0 pkginfo/1.8.2 requests/2.25.0 setuptools/58.1.0 requests-toolbelt/0.9.1 tqdm/4.62.3 CPython/3.10.2
|
Release files / archook_dbc-202202.1.2045-py3-none-any.whl
| Download URL | archook_dbc-202202.1.2045-py3-none-any.whl |
|---|---|
| Size | 12.8 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
7ecdfc1f39644623b393b2d9aeb16d232740829ef5cc39ab05d20cb82986f813
|
|
BLAKE2b-256 checksum How to use checksums |
4cf6055da02482ba7d958956099212203479fdead24be234acd92ab4032092e7
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/3.2.0 pkginfo/1.8.2 requests/2.25.0 setuptools/58.1.0 requests-toolbelt/0.9.1 tqdm/4.62.3 CPython/3.10.2
|
Security for archook-dbc 202202.1.2045
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
No provenance found
None of the files in this release were uploaded with provenance metadata.
A note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.