Skip to main content
Python Software Foundation 20th Year Anniversary Fundraiser  Donate today!

A python API for host control of USB connected PFx Bricks.

Project description

PFx Brick Python API

This repository contains a python package API for developing python scripts and applications which communicate with the PFx Brick. This package supports both USB and Bluetooth LE connections to the PFx Brick and is supported for Windows, macOS and linux.

Getting Started



The pfxbrick package can be installed with pip:

$ pip install pfxbrick

or directly from the source code:

$ git clone
$ cd pfx-brick-py
$ python 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()

# Get the status and identity of the PFx Brick
print('PFx Brick ICD version : %s' %(brick.get_icd_rev()))

# Get the PFx Brick configuration settings

# Get the user defined name of the PFx Brick

# Change the user defined name
brick.set_name('My Cool Brick')

# End the session


If you want to learn more about PFx Brick, check out our website.

Change Log


  • revised documentation
  • improved BLE notifcation callbacks


  • added Bluetooth LE connection access with same functionality as USB
  • added convenience methods to PFxBrick class to execute actions directly
  • added support for running scripts on PFx Brick


  • fixed error reporting for file system access methods
  • fixed file directory refresh to ignore empty directory entries


  • changed the USB write function to ensure consistent cross-platform compatibility


  • finished implementing missing functionality
  • finished documentation
  • first public announced release


  • Added CHANGELOG.rst to project manifest


  • Initial release

Project details

Download files

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

Files for pfxbrick, version 0.7.1
Filename, size File type Python version Upload date Hashes
Filename, size pfxbrick-0.7.1-py3.7.egg (101.4 kB) File type Egg Python version 3.7 Upload date Hashes View
Filename, size pfxbrick-0.7.1-py3.9.egg (101.5 kB) File type Egg Python version 3.9 Upload date Hashes View
Filename, size pfxbrick-0.7.1.tar.gz (37.9 kB) File type Source Python version None Upload date Hashes View

Supported by

AWS AWS Cloud computing Datadog Datadog Monitoring DigiCert DigiCert EV certificate Facebook / Instagram Facebook / Instagram PSF Sponsor Fastly Fastly CDN Google Google Object Storage and Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Salesforce Salesforce PSF Sponsor Sentry Sentry Error logging StatusPage StatusPage Status page