py2droid-api
py2droid-api provides Python bindings and helpers for Android system scripts and Magisk modules,
making them more comfortable to write than doing it by hand.
It’s part of a small ecosystem I’m building around py2droid, my Python build for Android, packaged as a Magisk module.
Project status
This project is in early development (pre-1.0). Breaking changes may land in minor releases. It’s maintained in my spare time, whenever I have the time and motivation, so releases and fixes may be slow.
Installation
pip install py2droid-api
Or with uv:
uv add py2droid-api
Requires Python 3.13+. This floor is set with headroom for Android support, which landed in CPython 3.13. I also reserve the right to raise the minimum version if py2droid supports it and doing so helps implement new features or make existing ones more ergonomic.
Modules
py2droid.sysprops— bindings for the Android bionic system property API (__system_property_*), for reading, listing, and setting system properties. Requires a real Android device; importing it elsewhere raisesNonAndroidDeviceError.py2droid.fs— filesystem helpers mirroring the Magisk module installation API (set_perm,set_perm_recursive,replace,remove).py2droid.fileprops— utilities for reading, writing, and editing.propfiles.py2droid.typing— shared type aliases and protocols used throughout the package.
Only py2droid.sysprops requires an Android device.
py2droid.fs relies on Unix-specific calls (os.chown, os.setxattr, os.mknod) and won’t work
on Windows; py2droid.fileprops and py2droid.typing have no such requirement and work on any
platform.
Usage
See examples/ for runnable examples covering the main functions of each module.
A note on AI assistance
I use AI tools to help polish the documentation (English isn’t my native language), draft CI/CD and tooling configuration, and bounce ideas around during code review.
License
MIT License — See LICENSE for details.
Metadata
Release files for py2droid-api 0.1.0
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 |
|---|---|---|---|---|
| py2droid_api-0.1.0.tar.gz | 13.9 kB | Without provenance | Details for py2droid_api-0.1.0.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| py2droid_api-0.1.0-py3-none-any.whl | Python 3 | none | any | Details for py2droid_api-0.1.0-py3-none-any.whl |
Total release size: 34.4 kB
Release files / py2droid_api-0.1.0.tar.gz
| Download URL | py2droid_api-0.1.0.tar.gz |
|---|---|
| Size | 13.9 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
871cdb6b0536cb7e49276a9ea60ac847189de7b617c313f939402ee641f1d7de
|
|
BLAKE2b-256 checksum How to use checksums |
dcf29b1628e6ee4d90a6bf7eb3c7cbd9ef90156679bf6ebc70c6c9e1000b15d1
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
uv/0.12.3 {"installer":{"name":"uv","version":"0.12.3","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Ubuntu","version":"24.04","id":"noble","libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":true}
|
Release files / py2droid_api-0.1.0-py3-none-any.whl
| Download URL | py2droid_api-0.1.0-py3-none-any.whl |
|---|---|
| Size | 20.5 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
13ebeb7f37ae73ab2eb01e03c2b90168e649107cc5c43adfe4d5fe8b464170fa
|
|
BLAKE2b-256 checksum How to use checksums |
826fae9c8609009b2b03062839941703312c0103485749b4d9a8657c10015c9c
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
uv/0.12.3 {"installer":{"name":"uv","version":"0.12.3","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Ubuntu","version":"24.04","id":"noble","libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":true}
|
Security for py2droid-api 0.1.0
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.