Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Pyodide docs stub #667

Merged
merged 3 commits into from
Oct 3, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Binary file added assets/lonboard-jupyterlite.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
21 changes: 21 additions & 0 deletions docs/ecosystem/pyodide.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
# Using in pyodide

As of Lonboard version 0.10, it's possible to use Lonboard in [Pyodide](https://pyodide.org/en/stable/), where Python is running _inside your web browser_ in WebAssembly.

[![](../assets/lonboard-jupyterlite.png)][Jupyterlite demo]

[**Demo notebook**][Jupyterlite demo].

[Jupyterlite demo]: https://jupyterlite.ds.io/lab/index.html?path=lonboard%2Fdata-filter-extension.ipynb

There's a few things to keep in mind:

### Pyodide-specific dependencies

Not all Python libraries work out of the box in Pyodide. Any Python libraries that use compiled code need to be loaded in Pyodide with special wheels.

Lonboard does not use compiled code itself, but some of its dependencies — namely [`arro3`](https://github.com/kylebarron/arro3) — use compiled code. You may need to manually load `arro3` wheels before importing `lonboard`. Refer to the demo notebook for an example.

### Memory limits

Pyodide has stricter memory limits than normal Python environments. Take care to delete Python objects you're no longer using with `del`.
1 change: 1 addition & 0 deletions mkdocs.yml
Original file line number Diff line number Diff line change
Expand Up @@ -87,6 +87,7 @@ nav:
- ecosystem/geopandas.md
- ecosystem/duckdb.md
- ecosystem/geoarrow.md
- ecosystem/pyodide.md
- ecosystem/jupyter-widgets.md
- ecosystem/panel.md
- ecosystem/shiny.md
Expand Down