Skip to main content

anpyer

AnPyer's Python namespace: the execution engine behind the AnPyer notebook app (a Jupyter-compatible notebook app for Android), plus a few small user-facing helpers.

The AnPyer app bundles this package, so app users do not need to install it. pip install anpyer is for one specific case, described below.

Who needs this

You wrote a notebook in AnPyer and now want to open the same .ipynb in desktop Jupyter or VS Code.

AnPyer notebooks are plain, valid .ipynb files. But a cell may contain:

import anpyer.plot
anpyer.plot.show({"series": [{"type": "bar", "data": [1, 2, 3]}]})

On a desktop Python that line raises ModuleNotFoundError: No module named 'anpyer'. Installing this package makes the import resolve, so the notebook runs to the end instead of stopping there.

pip install anpyer

Requires Python 3.12 or newer. Apart from IPython there are no dependencies.

Please read the limitations

This package was not written for desktop Jupyter. Three honest caveats:

  • anpyer.plot.show() will not draw a chart for you. It emits a custom MIME type, application/vnd.anpyer.plot+json. Desktop Jupyter has no renderer for that MIME type, so the output falls back to its text/plain placeholder text. The actual chart is drawn by the AnPyer front end, inside the app. If you want a visible figure on the desktop, use plotly or matplotlib — anpyer.plot is deliberately tiny and Android-oriented.
  • anpyer.device only works inside the Android app. It is the notebook-to-hardware layer (torch, vibrator, battery, network, sensors, TTS, clipboard, system actions). On a desktop interpreter import anpyer.device succeeds — it deliberately touches no Java at import time — but every part reports .available == False and calling one raises DeviceUnavailableError. By design, not a broken package.
  • anpyer.test and anpyer.smoke are in-app self-check tools. Run on a desktop interpreter, most of their items will report SKIP or FAIL. That is expected, not a broken package: they probe the Android/Chaquopy runtime and the app's own renderers, which are simply not there.

anpyer.engine is internal implementation. Its API is not part of this package's promise and may change at any time.

Status

Alpha. Version 0.1.x ships alongside the first release of the AnPyer app. The API may still change during 0.x — any change will be described in the release notes.

License

MIT — see the LICENSE file in the distribution.

Metadata

Release files for anpyer 0.2.0

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for anpyer 0.2.0
File Size Uploaded
anpyer-0.2.0.tar.gz 270.0 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for anpyer 0.2.0
File Interpreter ABI Platform
anpyer-0.2.0-py3-none-any.whl Python 3 none any Details

Total release size: 448.1 kB

Release files / anpyer-0.2.0.tar.gz

Download URL anpyer-0.2.0.tar.gz
Size 270.0 kB
Tags Source
SHA-256 checksum
How to use checksums
601c551d7bf15f2f24e25644589e6a44db9ce0f3f7153178a9173c55212fc191
BLAKE2b-256 checksum
How to use checksums
ad6f10ed23b40ea5997e87cd0a635ba607f1c0f753611e4015171966790b0caf
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via uv/0.12.23 {"installer":{"name":"uv","version":"0.12.23","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":null,"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":null}

Release files / anpyer-0.2.0-py3-none-any.whl

Download URL anpyer-0.2.0-py3-none-any.whl
Size 178.1 kB
Tags Python 3
SHA-256 checksum
How to use checksums
55c310855476ef7df050a305d3c005d596c9f656cfd26f9143b82a90f44d66b4
BLAKE2b-256 checksum
How to use checksums
4c97adb1cc67f8c9ea09f26f41e06928c2cbe763fcd46f89af05ccc602ea820c
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via uv/0.12.23 {"installer":{"name":"uv","version":"0.12.23","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":null,"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":null}

Release history Release notifications | RSS feed

This release

0.2.0 This release

2 release files

0.1.0

2 release files

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page