Skip to content
/ brother Public
forked from bieniu/brother

Python wrapper for getting data from Brother laser and inkjet printers via snmp

License

Notifications You must be signed in to change notification settings

hofdee/brother

 
 

Repository files navigation

GitHub Release PyPI PyPI - Downloads Buy me a coffee

brother

Python wrapper for getting data from Brother laser and inkjet printers via snmp

How to use package

import asyncio

from brother import Brother, SnmpError, UnsupportedModel

# printer IP address/hostname
HOST = "192.172.10.12"


async def main():
    # argument kind: laser - for laser printer
    #                ink   - for inkjet printer
    brother = Brother(HOST, kind="laser")
    try:
        await brother.async_update()
    except (ConnectionError, SnmpError, UnsupportedModel) as error:
        print(f"{error}")
        return

    if brother.available:
        print(f"Data available: {brother.available}")
        print(f"Model: {brother.model}")
        print(f"Firmware: {brother.firmware}")
        print(f"Status: {brother.data['status']}")
        print(f"Serial no: {brother.serial}")
        print(f"Sensors data: {brother.data}")


loop = asyncio.get_event_loop()
loop.run_until_complete(main())
loop.close()

About

Python wrapper for getting data from Brother laser and inkjet printers via snmp

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages

  • Python 100.0%