brother
Python wrapper for getting data from Brother laser and inkjet printers via snmp
How to use package
import asyncio
import logging
from sys import argv
import pysnmp.hlapi.asyncio as hlapi
from brother import Brother, SnmpError, UnsupportedModelError
# printer IP address/hostname
HOST = "brother"
logging.basicConfig(level=logging.DEBUG)
async def main():
host = argv[1] if len(argv) > 1 else HOST
printer_type = argv[2] if len(argv) > 2 else "laser"
# argument printer_type: laser - for laser printer
# ink - for inkjet printer
external_snmp = False
if len(argv) > 3 and argv[3] == "use_external_snmp":
external_snmp = True
if external_snmp:
print("Using external SNMP engine")
snmp_engine = hlapi.SnmpEngine()
else:
snmp_engine = None
try:
brother = await Brother.create(
host, printer_type=printer_type, snmp_engine=snmp_engine
)
data = await brother.async_update()
except (ConnectionError, SnmpError, UnsupportedModelError) as error:
print(f"{error}")
return
brother.shutdown()
print(f"Model: {brother.model}")
print(f"Firmware: {brother.firmware}")
if data:
print(f"Status: {data.status}")
print(f"Serial no: {data.serial}")
print(f"Sensors data: {data}")
loop = asyncio.new_event_loop()
loop.run_until_complete(main())
loop.close()
Contributing
Contributions are welcome! Please feel free to submit a Pull Request.
How to create a dev environment
git clone https://github.com/bieniu/brother.git
cd brother
./scripts/setup-local-env.sh
Metadata
Release files for brother 6.2.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 | |
|---|---|---|---|---|
| brother-6.2.0.tar.gz | 24.2 kB | With provenance | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| brother-6.2.0-py3-none-any.whl | Python 3 | none | any | Details |
Total release size: 39.9 kB
Release files / brother-6.2.0.tar.gz
| Download URL | brother-6.2.0.tar.gz |
|---|---|
| Size | 24.2 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
913fe5aff678a8c33c90d6d53ca11d99640f4f5d948b50a3ae882eb113457633
|
|
BLAKE2b-256 checksum How to use checksums |
59c28daa8d0db5027a0dbf4cd830f79baee6cc3ead998a73e805e76c03c8b45b
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/7.0.0 CPython/3.13.14
|
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.
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Sep 20, 2026.
Transparency logRelease files / brother-6.2.0-py3-none-any.whl
| Download URL | brother-6.2.0-py3-none-any.whl |
|---|---|
| Size | 15.7 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
2c809c21eba0b6509c968bb3ae84120a9172187e4d1e0c64c90534677bb7fd6b
|
|
BLAKE2b-256 checksum How to use checksums |
bde6ae0e3c8de10a01b8eefc5a7bbcb2af52fd2ab613fb5a8bc6d12fe943e651
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/7.0.0 CPython/3.13.14
|
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.
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Sep 20, 2026.
Transparency logSecurity for brother 6.2.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.
Full provenance
All 2 files in this release have been uploaded with provenance metadata.
Attestation for brother-6.2.0.tar.gz
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Sep 20, 2026.
Transparency logA 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.