mplbed
|[]mpl
|======|
| bed |
mplbed is a library of support code for embedding interactive, server-side matplotlib figures in web applications.
Supporting, in principle any ASGI-compatible Python application, it provides convenient integration for a number of frameworks ones out of the box. It aims to have "usually-works" defaults useful for quick demos, while providing a lot of flexibility and options as well as utilities to deal with advanced issues such as style isolation, and connection and resource management to enable some degree of scaling up to use-cases like internal dashboards.
It can be as easy as:
import mywebframework
from mplbed import mplbed_mywebframework
@mywebframework.route("/myplot")
@mplbed_mywebframework.figure_page
def my_plot_page(request):
fig, ax = plt.subplots()
ax.plot([1, 2, 3], [4, 5, 6])
return fig
app = mywebframework.App(...)
setup(app)
Installation
Currently you can install this package from Github:
$ uv add git+https://github.com/frankier/mplbed
Install the optional NiceGUI integration with:
$ uv add "mplbed[nicegui]"
Then configure the NiceGUI app before ui.run() and create an interactive
element with mplbed.integration.nicegui.matplotlib.
Documentation
The docs are published at https://frankier.github.io/mplbed/, which redirects to the newest version. Every release is built under its own version (for example https://frankier.github.io/mplbed/v0.3.0/) and the sidebar links between them.
Contributing
Contributions are welcome. Please discuss any larger changes in the issues before making a pull request to avoid wasted work. You, the human contributor, must personally have reviewed and understood any code submitted.
Set up a dev environment with uv:
$ uv sync --all-groups --all-extras
Run the tests (end-to-end tests need Playwright browsers: uv run playwright install chromium):
$ uv run pytest
Lint, format and typecheck:
$ uv run ruff check ./src
$ uv run ruff format ./src
$ uv run ty check ./src
Install the prek hook to run these automatically on commit:
$ prek install
Build the docs for every version, or only for the working tree:
$ uv run sphinx-polyversion docs/poly.py
$ uv run sphinx-polyversion -l docs/poly.py
Metadata
Release files for mplbed 0.3.1
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | Actions |
|---|---|---|---|---|
| mplbed-0.3.1.tar.gz | 30.8 kB | Without provenance | Details for mplbed-0.3.1.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| mplbed-0.3.1-py3-none-any.whl | Python 3 | none | any | Details for mplbed-0.3.1-py3-none-any.whl |
Total release size: 69.6 kB
Release files / mplbed-0.3.1.tar.gz
| Download URL | mplbed-0.3.1.tar.gz |
|---|---|
| Size | 30.8 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
96d378e33a8f8f6e90e8a44c20e9c9a7fe6c975ac6a9f0ac0a04770d4c5a50df
|
|
BLAKE2b-256 checksum How to use checksums |
43da9be1f682c1c7c052b0de10d1796672a397459f23e75365e31971badd84fa
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
uv/0.13.7 {"installer":{"name":"uv","version":"0.13.7","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Ubuntu","version":"26.04","id":"resolute","libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":true}
|
Release files / mplbed-0.3.1-py3-none-any.whl
| Download URL | mplbed-0.3.1-py3-none-any.whl |
|---|---|
| Size | 38.8 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
d6f13cf32a8412933f21cea4b9d6c03780f928f533cdfd794790321a95f6eb09
|
|
BLAKE2b-256 checksum How to use checksums |
2a0c41970bfa3632359960da1c900731dd4593a3363cb2faec0ce2035f249477
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
uv/0.13.7 {"installer":{"name":"uv","version":"0.13.7","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Ubuntu","version":"26.04","id":"resolute","libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":true}
|
Security for mplbed 0.3.1
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
No provenance found
None of the files in this release were uploaded with provenance metadata.
A note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.