Inbox4us POS Printer Service
A FastAPI-based service for handling ESC/POS printer operations. This service allows you to send base64-encoded images to network printers using the ESC/POS protocol.
Features
- Send images to network printers
- Support for ESC/POS protocol
- Simple REST API interface
- CORS support
- SSL/TLS support
Installation
Install using pip:
pip install inbox4us-pos-printer
Usage
Basic Usage
from pos_printer import create_app
import uvicorn
app = create_app()
if __name__ == '__main__':
uvicorn.run(
app,
host='0.0.0.0',
port=8100
)
With SSL
from pos_printer import create_app
import uvicorn
app = create_app()
if __name__ == '__main__':
uvicorn.run(
app,
host='0.0.0.0',
port=8100,
ssl_certfile="./ssl/certificate.crt",
ssl_keyfile="./ssl/private.key",
ssl_ca_certs="./ssl/ca_bundle.crt"
)
API Documentation
POST /print
Send an image to a network printer.
Request Body
{
"printer_ip": "192.168.1.100",
"port": 9100,
"data": "base64_encoded_image_data"
}
Parameters
printer_ip(string, required): IP address of the network printerport(integer, optional, default: 9100): Printer portdata(string, required): Base64 encoded image data
Response
Success:
{
"status": "success"
}
Error:
{
"status": "error",
"message": "Error message details"
}
Requirements
- Python >= 3.8
- FastAPI >= 0.68.0
- python-escpos >= 3.0
- Pillow >= 8.0.0
- pydantic >= 1.8.0
License
MIT License
Support
For support, please create an issue on the GitHub repository.
Metadata
Release files for inbox4us-pos-printer 0.1.4
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 |
|---|---|---|---|---|
| inbox4us_pos_printer-0.1.4.tar.gz | 4.7 kB | Without provenance | Details for inbox4us_pos_printer-0.1.4.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| inbox4us_pos_printer-0.1.4-py3-none-any.whl | Python 3 | none | any | Details for inbox4us_pos_printer-0.1.4-py3-none-any.whl |
Total release size: 8.5 kB
Release files / inbox4us_pos_printer-0.1.4.tar.gz
| Download URL | inbox4us_pos_printer-0.1.4.tar.gz |
|---|---|
| Size | 4.7 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
187a835190eaa6d4ab6547b00c23e068631c8a1084ad3f1eea85ff4050ed8b3e
|
|
BLAKE2b-256 checksum How to use checksums |
cf057b8f62de16c2a5c4e39f6e293635bbbf1de6ce1559c491c74795e2c2093c
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/6.1.0 CPython/3.13.2
|
Release files / inbox4us_pos_printer-0.1.4-py3-none-any.whl
| Download URL | inbox4us_pos_printer-0.1.4-py3-none-any.whl |
|---|---|
| Size | 3.8 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
8d64a986d139ee71dfe465e97a6001896c82540b6eac95dcf47d103e7cc2100d
|
|
BLAKE2b-256 checksum How to use checksums |
6a4f175915a4991da6cc935affbf7482a9e1b9e76277ace71acfcaf283d85824
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/6.1.0 CPython/3.13.2
|
Security for inbox4us-pos-printer 0.1.4
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.