phomemo-m03as-lib
Python library for controlling Phomemo M03AS / YinXianSen 300 DPI thermal printers via USB or Bluetooth.
Features
- USB serial connection (recommended, stable)
- Bluetooth BLE connection (optional)
- Auto-detect: tries USB first, falls back to BLE
- Print text (Chinese/English, auto word-wrap)
- Print images (Floyd-Steinberg dithering + gamma correction)
- Supports 15mm / 53mm / 80mm paper widths
Install
# USB only (recommended for Home Assistant)
pip install phomemo-m03as-lib
# With Bluetooth support
pip install "phomemo-m03as-lib[ble]"
Quick Start
import asyncio
from phomemo import M03ASPrinter
async def main():
# Auto-detect: USB first, fallback to BLE
printer = M03ASPrinter(
target="auto",
paper="80mm",
ble_address="9D:86:57:63:34:DD", # fallback BLE address
)
async with printer:
await printer.print_text("Hello, 印先森!")
await printer.print_image("photo.jpg")
asyncio.run(main())
Protocol
Uses M04 ESC/POS extended protocol (300 DPI), reverse-engineered from the phomymo open-source project.
Metadata
Release files for phomemo-m03as-lib 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 |
|---|---|---|---|---|
| phomemo_m03as_lib-0.1.0.tar.gz | 14.9 kB | Without provenance | Details for phomemo_m03as_lib-0.1.0.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| phomemo_m03as_lib-0.1.0-py3-none-any.whl | Python 3 | none | any | Details for phomemo_m03as_lib-0.1.0-py3-none-any.whl |
Total release size: 28.7 kB
Release files / phomemo_m03as_lib-0.1.0.tar.gz
| Download URL | phomemo_m03as_lib-0.1.0.tar.gz |
|---|---|
| Size | 14.9 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
7f50cf0adf110cdc6e9abce6ef1cd57b6410a2293377991d6197c05c3fc353fb
|
|
BLAKE2b-256 checksum How to use checksums |
ff4d498c8ab7ba3da1f92aa091e0fd24d7caee18a66e0c0c2509c019a09fc1a4
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/6.1.0 CPython/3.13.12
|
Release files / phomemo_m03as_lib-0.1.0-py3-none-any.whl
| Download URL | phomemo_m03as_lib-0.1.0-py3-none-any.whl |
|---|---|
| Size | 13.8 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
b104466949270ddc484ad0737c74e057383d04ea3f7c5e3adf786e271ee9b8e0
|
|
BLAKE2b-256 checksum How to use checksums |
dfdd5f76c15f0fa1e6dc9e9c47d0363b6fbd83ef8b6e9ddca5103691a2315b80
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/6.1.0 CPython/3.13.12
|
Security for phomemo-m03as-lib 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.