Custom Notebook Code Snippets

512
1
Jump to solution
08-18-2022 05:58 AM
MatejVrtich
Esri Contributor

Hi,

There is now a possibility to insert a Code Snippets into a Notebook running on ArcGIS Enterprise (11+) and ArcGIS Online.

These Code Snippets are stored as an item of a type: "Notebook Code Snippets" and are curated by Esri.

In ArcGIS Enterprise, the Notebook Code Snippets item id is 23f01974be8f41a8969d70ee1bab12bd.

Individual code snippets are stored as a .txt files at the item's /resources level: https://<hostname>/portal/sharing/rest/content/items/23f01974be8f41a8969d70ee1bab12bd/resources.

Is it possible to create a custom code snippet to be used in my notebooks?

Thanks,

Matej

0 Kudos
1 Solution

Accepted Solutions
xlt208
by Esri Contributor
Esri Contributor

Hello @MatejVrtich

With the November 2022 update of ArcGIS Online, we enabled the functionalities for users to create their own notebook code snippet library items to store snippets! 

Here are some doc pages that might be helpful:

https://doc.arcgis.com/en/arcgis-online/create-maps/use-python-code-snippets.htm

https://doc.arcgis.com/en/arcgis-online/share-maps/share-a-notebook.htm#ESRI_SECTION1_D19C8BEA25EA48...

 

Let me know if you have other questions!

 

Thanks,

Lingtao | Product Engineer for ArcGIS Notebooks

View solution in original post

1 Reply
xlt208
by Esri Contributor
Esri Contributor

Hello @MatejVrtich

With the November 2022 update of ArcGIS Online, we enabled the functionalities for users to create their own notebook code snippet library items to store snippets! 

Here are some doc pages that might be helpful:

https://doc.arcgis.com/en/arcgis-online/create-maps/use-python-code-snippets.htm

https://doc.arcgis.com/en/arcgis-online/share-maps/share-a-notebook.htm#ESRI_SECTION1_D19C8BEA25EA48...

 

Let me know if you have other questions!

 

Thanks,

Lingtao | Product Engineer for ArcGIS Notebooks