Skip to main content

Python wrapper for libinklevel

Project description

Build Status

Python wrapper for libinklevel.


Install libinklevel, e.g. on Debian:

apt-get install libinklevel


pip install inklevel


import inklevel

# libinklevel version

# Get data from /dev/usb/lp0:
data = inklevel.get_usb_ink_level(0)

for cartridge, value in data.levels:
    print('{}: {}'.format(cartridge.description, value))

# Get data from /dev/parport2
data = inklevel.get_parport_ink_level(2)

The functions get_usb_ink_level and get_parport_ink_level are convenience functions using the original libinklevel interface. You can also use that:

data = inklevel.get_ink_level(inklevel.Port.USB, None, 0)
data = inklevel.get_ink_level(inklevel.Port.CUSTOM_USB, '/dev/usb/lp0', None)

See libinklevel and ink for details.


This software is licensed under GPLv2.

Project details

Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Files for inklevel, version 0.1.2
Filename, size File type Python version Upload date Hashes
Filename, size inklevel-0.1.2-py2.py3-none-any.whl (5.9 kB) File type Wheel Python version py2.py3 Upload date Hashes View

Supported by

Pingdom Pingdom Monitoring Google Google Object Storage and Download Analytics Sentry Sentry Error logging AWS AWS Cloud computing DataDog DataDog Monitoring Fastly Fastly CDN DigiCert DigiCert EV certificate StatusPage StatusPage Status page