Skip to main content

Python wrapper for libinklevel

Project description

Build Status

Python wrapper for libinklevel.

Prerequisites

Install libinklevel, e.g. on Debian:

apt-get install libinklevel

Installation

pip install inklevel

Usage

import inklevel

# libinklevel version
print(inklevel.get_version_string())

# 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.

License

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.

Source Distributions

No source distribution files available for this release.See tutorial on generating distribution archives.

Built Distribution

inklevel-0.1.2-py2.py3-none-any.whl (5.9 kB view details)

Uploaded Python 2 Python 3

File details

Details for the file inklevel-0.1.2-py2.py3-none-any.whl.

File metadata

File hashes

Hashes for inklevel-0.1.2-py2.py3-none-any.whl
Algorithm Hash digest
SHA256 6e270b78eb2b6484054f437f5c22e483b2050e7dcdb6a72a0edb4b11af4193c5
MD5 6d27be355fc3d78397e5037a5ae7ea06
BLAKE2b-256 d6c412cc2e3740de7fd2faeaf67f66c686e45a143bdbca0aa632f496b182f45a

See more details on using hashes here.

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page