- The
arcgishub
package acts as the Python interface to ArcGIS Hub. It aims to serve both, the core team and community user-base of Hub by allowing automation of several Hub worksflows and simplifying the use of the Hub information model. - The library now equips users with tools needed to work with the Sites in your Hub or Enterprise organization. You can create new sites and pages, search for existing sites and pages, as well as edit their layout and clone them, not only within the same organization, but over to different organizations as well.
- It is built over the
arcgis
Python API. Ensure you are using the most updated version of thearcgis
API to usearcgishub
. Click here to learn more about thearcgis
API. - The intended UI for this API is the Jupyter Notebook development environment.
- This API is built to work with Sites in Enterprise versions >= 10.8
In order to install Python, install the bundle that comes with the Anaconda distribution (Refer this)
Execute the following command in the terminal
pip install -e git+https://github.com/esri/hub-py.git#egg=arcgishub
Once installed, test it by launching an instance of Jupyter Notebook and importing the package
from arcgishub import hub
Execute the following command in the terminal
pip install -e git+https://github.com/esri/hub-py.git#egg=arcgishub
Once installed, test it by launching an instance of Jupyter Notebook and importing the package
from arcgishub import hub
Test if the version has been upgraded by following with the command
import arcgishub
arcgishub.__version__
The first step to interacting with arcgishub
is creating an instance of a Hub and exploring all that it contains.
For example:
from arcgishub import hub
myHub = hub.Hub("https://cityx.maps.arcgis.com", username, password) # or the url of your ArcGIS Online organization
initiatives = myHub.initiatives.search()
print(initiatives)
fetches a list containing all the initiatives within this Hub. Click here for more information and API reference about the functionality supported.
Example notebooks for using this API to work with your Hub are provided in the examples directory.
If you are working with arcgishub
>=v2.1.0, you will find the above examples and functionality supported in this API under the For arcgishub folder.
Older versions of this API can also be found in the ArcGIS API for Python. You can find user guides to access Hub using it, under the For ArcGIS API for Python subdirectory.
Install requirements: pip install -r requirements.txt
We strongly encourage you to provide feedback and report issues in implementation, under GitHub issues for this repo.
Under the New Issue
button on that page, you will find an option to add a Bug or Enhancement report along with guidelines. Issues reported via our Github repository will be prioritized in subsequent changes.
Report a bug when you observe unexpected or flawed behavior while working with our API. Report an Enhancement when you would like for a particular Hub object to also support new or improved capabilities within hub-py.