ArcGIS Notebook Server allows notebook authors to import custom Python modules from registered data directories. With this process, notebook authors can more easily manage frequently updated custom modules.
Import a custom module from a registered data directory
Follow the steps below to import a custom module from a registered directory:
- Register
a data directory in ArcGIS Notebook Server Manager.
Note:
Ensure that the directory meets the data directory requirements and that the directory contains the custom Python modules. - Delete any existing interactive notebook containers.
- Open a notebook in the notebook editor.
- Click Files to open the Files pane in the notebook editor.
The registered data directory should be listed as /arcgis/directories.
- Import the new path:
import sys sys.path.append('/arcgis/directories/')