Skip to main content

A Python package to contol IVP's pellet dispenser via USB

Project description

Pellet Dispenser Python Driver

This is a python package to use the pellet dispenser with python.

Installing

Install this package with the following shell command

pip install inkawuvp-pellet-dispenser

inkawuvp-pellet-dispenser is based on hid and therefore require the hidapi library to be installed separately.

Installing hidapi

Linux

Depending on your distribution you will need to install a hidapi package.

Ubuntu / Debian based
sudo apt install libhidapi-hidraw0

macOS

The easiest is to use Homebrew:

brew install hidapi

Sample usage code

from inkawuvp_pellet_dispenser import Device, DispenserError

dev = Device()

try:
    dispensed = dev.dispense(1)
    print(f'Dispensed {dispensed} pellets')
except DispenserError as e:
    print(e)
    print(f'still dispensed {e.dispensed}')

Project details


Download files

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

Source Distribution

inkawuvp_pellet_dispenser-0.0.1.tar.gz (3.5 kB view hashes)

Uploaded Source

Built Distribution

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