A reactive notebook for Python — run reproducible experiments, query with SQL, execute as a script, deploy as an app, and version with git. Stored as pure Python. All in a modern, AI-native editor.
Python artificial-intelligencedagdata-sciencedata-visualizationdataflowdeveloper-toolsmachine-learningnotebookspipelinepythonreactivesqlweb-app
example: leafmap (#2912)
Akshay Agrawalf697a7b03aca
diff --git a/examples/third_party/leafmap/leafmap_example.py b/examples/third_party/leafmap/leafmap_example.pyindex f458a70f79..201ab220f1 100644--- a/examples/third_party/leafmap/leafmap_example.py+++ b/examples/third_party/leafmap/leafmap_example.py@@ -1,32 +1,35 @@# /// script# requires-python = ">=3.9"# dependencies = [-# "leafmap==0.38.0",+# "leafmap==0.41.0",# "marimo",# ]# ///+import marimo-__generated_with = "0.1.59"+__generated_with = "0.9.20"app = marimo.App()[email protected](hide_code=True)def __(mo):mo.md(- f"""- # Leafmap + marimo-- To get started, install **[leafmap](https://leafmap.org/)**:+ """+ # Using Leafmap- ```- pip install leafmap marimo- ```- """+ This example shows how to render a `leafmap.Map` in marimo; just output it like any other object.+ """)return+def __():+ import leafmap+ return (leafmap,)++@app.celldef __(leafmap):m = leafmap.Map(center=(40, -100), zoom=4, height="400px")@@ -38,14 +41,13 @@ def __(leafmap):attribution="Google",)m- return m,+ return (m,)@app.celldef __():import marimo as mo- import leafmap- return leafmap, mo+ return (mo,)if __name__ == "__main__":