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
sphinx (for documentation)
Installation
The pfxbrick package 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()
Documentation
PFx Brick Interface Control Document (ICD) v.3.36 describes details of PFx Brick operation and communication protocol
If you want to learn more about PFx Brick, check out our website.
Change Log
v.0.6.2
fixed error reporting for file system access methods
fixed file directory refresh to ignore empty directory entries
v.0.6.1
changed the USB write function to ensure consistent cross-platform compatibility
v.0.6.0
finished implementing missing functionality
finished documentation
first public announced release
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
Built Distributions
Hashes for pfxbrick-0.6.2-py2.py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 3826f41cbdab1e4bfdc8304c0f71f49f0ab6bf48e1eccda1fdcccd098192bcb3 |
|
MD5 | 415be1c540db66085499ac4dbdb3b41f |
|
BLAKE2b-256 | 9576ee9865f78d8e508480afc991e571a29af89bf476c6a5abeaf1cd79419d05 |