A python API for host control of USB connected PFx Bricks.
Project description
PFx Brick Python API
This repository contains the API for developing python scripts and applications which communicate with the PFx Brick.
Getting Started
Requirements
Python 3.6+
hidapi
Installation
pfx-brick-py can be installed with pip:
$ pip install pfxbrick
or directly from the source code:
$ git clone https://github.com/fx-bricks/pfx-brick-py.git
$ cd pfx-brick-py
$ python setup.py install
Basic Usage
After installation, the package can imported:
$ python
>>> import pfxbrick
>>> pfxbrick.__version__
An example of the package can be seen below
from pfxbrick import PFxBrick
# Open a PFx Brick session instance
brick = PFxBrick()
brick.open()
# Get the status and identity of the PFx Brick
print('PFx Brick ICD version : %s' %(brick.get_icd_rev()))
brick.get_status()
brick.print_status()
# Get the PFx Brick configuration settings
brick.get_config()
brick.print_config()
# Get the user defined name of the PFx Brick
brick.get_name()
print(brick.name)
# Change the user defined name
brick.set_name('My Cool Brick')
# End the session
brick.close()
If you want to learn more about PFx Brick, check out our website.
Change Log
v.0.5.1
Added CHANGELOG.rst to project manifest
v.0.5.0
Initial release
Project details
Release history Release notifications | RSS feed
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 Distributions
pfxbrick-0.6.0-py3.6.egg
(64.0 kB
view hashes)
Close
Hashes for pfxbrick-0.6.0-py2.py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 493808300db1e1a68fffb458ed0d2dd85692fd5c018c7391219dddaa18c60ab6 |
|
MD5 | d1d2e61eff977c776d2df8d94e5192ce |
|
BLAKE2b-256 | 0059be4cf1aa1ebd8e34bb6d118c353ad53f4ec3f174ccd60a61e0dc71011a69 |