# 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
```bash
pip install inkawuvp-pellet-dispenser
```
`inkawuvp-pellet-dispenser` is based on [hid](https://pypi.org/project/hid/) and
therefore require the [hidapi library](https://github.com/libusb/hidapi) to be
installed separately.
### Installing hidapi
#### Linux
Depending on your distribution you will need to install a hidapi package.
##### Ubuntu / Debian based
```bash
sudo apt install libhidapi-hidraw0
```
#### macOS
The easiest is to use [Homebrew](https://brew.sh):
```bash
brew install hidapi
```
## Sample usage code
```python
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}')
```
Raw data
{
"_id": null,
"home_page": null,
"name": "inkawuvp-pellet-dispenser",
"maintainer": null,
"docs_url": null,
"requires_python": ">=3.8",
"maintainer_email": null,
"keywords": "pellet, dispenser, hardware, hid, Open Source Hardware",
"author": null,
"author_email": "Alexandre Tuleu <alexandre.tuleu.2005@polytechnique.org>",
"download_url": "https://files.pythonhosted.org/packages/52/ad/8a5fc244c39542103891666e1caa69fd565186d0919d058ce0f5a0ad95a2/inkawuvp_pellet_dispenser-0.0.1.tar.gz",
"platform": null,
"description": "# Pellet Dispenser Python Driver\n\nThis is a python package to use the pellet dispenser with python.\n\n\n## Installing\n\nInstall this package with the following shell command\n\n```bash\npip install inkawuvp-pellet-dispenser\n```\n\n`inkawuvp-pellet-dispenser` is based on [hid](https://pypi.org/project/hid/) and\ntherefore require the [hidapi library](https://github.com/libusb/hidapi) to be\ninstalled separately.\n\n### Installing hidapi\n\n#### Linux\n\nDepending on your distribution you will need to install a hidapi package.\n\n##### Ubuntu / Debian based\n\n```bash\nsudo apt install libhidapi-hidraw0\n```\n\n\n#### macOS\n\nThe easiest is to use [Homebrew](https://brew.sh):\n\n```bash\nbrew install hidapi\n```\n\n\n## Sample usage code\n\n```python\n\nfrom inkawuvp_pellet_dispenser import Device, DispenserError\n\ndev = Device()\n\ntry:\n dispensed = dev.dispense(1)\n print(f'Dispensed {dispensed} pellets')\nexcept DispenserError as e:\n print(e)\n print(f'still dispensed {e.dispensed}')\n```\n",
"bugtrack_url": null,
"license": "GNU General Public License v3 (GPLv3)",
"summary": "A Python package to contol IVP's pellet dispenser via USB",
"version": "0.0.1",
"project_urls": {
"Homepage": "https://github.com/iNkawuVervetProject/VerTIGo/tree/main/devices/pellet-dispenser/driver",
"Issues": "https://github.com/iNkawuVervetProject/VerTIGo/issues?q=is%3Aissue+is%3Aopen+label%3A\"pellet dispenser\"",
"Repository": "https://github.com/iNkawuVervetProject/VerTIGo"
},
"split_keywords": [
"pellet",
" dispenser",
" hardware",
" hid",
" open source hardware"
],
"urls": [
{
"comment_text": "",
"digests": {
"blake2b_256": "40f360643f6b6b4efd7a3589c8497117832235ebb8e58d7dd0d89381cbe8e6e2",
"md5": "069082ce27c0be960a460fb282ef97a9",
"sha256": "13e09f2bf63fd69864fa9fedb5a9304a011ad6a6049ff4d7c7a4a4ecea254353"
},
"downloads": -1,
"filename": "inkawuvp_pellet_dispenser-0.0.1-py3-none-any.whl",
"has_sig": false,
"md5_digest": "069082ce27c0be960a460fb282ef97a9",
"packagetype": "bdist_wheel",
"python_version": "py3",
"requires_python": ">=3.8",
"size": 3848,
"upload_time": "2024-07-09T10:59:28",
"upload_time_iso_8601": "2024-07-09T10:59:28.809125Z",
"url": "https://files.pythonhosted.org/packages/40/f3/60643f6b6b4efd7a3589c8497117832235ebb8e58d7dd0d89381cbe8e6e2/inkawuvp_pellet_dispenser-0.0.1-py3-none-any.whl",
"yanked": false,
"yanked_reason": null
},
{
"comment_text": "",
"digests": {
"blake2b_256": "52ad8a5fc244c39542103891666e1caa69fd565186d0919d058ce0f5a0ad95a2",
"md5": "8c970ed3acd256968530be5e81ab4385",
"sha256": "5e07383e101ddba18978bb998fec371b32445a09f020e22c72084afb04c9e0b1"
},
"downloads": -1,
"filename": "inkawuvp_pellet_dispenser-0.0.1.tar.gz",
"has_sig": false,
"md5_digest": "8c970ed3acd256968530be5e81ab4385",
"packagetype": "sdist",
"python_version": "source",
"requires_python": ">=3.8",
"size": 3524,
"upload_time": "2024-07-09T10:59:30",
"upload_time_iso_8601": "2024-07-09T10:59:30.066023Z",
"url": "https://files.pythonhosted.org/packages/52/ad/8a5fc244c39542103891666e1caa69fd565186d0919d058ce0f5a0ad95a2/inkawuvp_pellet_dispenser-0.0.1.tar.gz",
"yanked": false,
"yanked_reason": null
}
],
"upload_time": "2024-07-09 10:59:30",
"github": true,
"gitlab": false,
"bitbucket": false,
"codeberg": false,
"github_user": "iNkawuVervetProject",
"github_project": "VerTIGo",
"travis_ci": false,
"coveralls": false,
"github_actions": false,
"lcname": "inkawuvp-pellet-dispenser"
}