Skip to main content

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

Project description

PFx Brick Python API

https://travis-ci.org/fx-bricks/pfx-brick-py.svg?branch=master https://img.shields.io/badge/license-MIT-blue.svg

This repository contains the API for developing python scripts and applications which communicate with the PFx Brick.

Getting Started

Requirements

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


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 Distribution

pfxbrick-0.5.1-py3.6.egg (46.2 kB view hashes)

Uploaded Source

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