Skip to main content
This is a pre-production deployment of Warehouse. Changes made here affect the production instance of PyPI (
Help us improve Python packaging - Donate today!

libbox0 Binding

Project Description

Python binding for libbox0


* cffi
* numpy

In C:

* libbox0


$ python build
$ python install

in, build_path variable to tell where to look for header and library


lots of demo code in test/ and example/
a generic approch to opening device and module and do something with them

import box0

# open any supported usb device
dev = box0.usb.open_supported()

# open the dio0 module (assuming the device support it)
# if you need to iterate over the supported modules using dev
dio0 = dev.dio(0)

# Prepare for basic mode (basic functionality)

# set to output mode
dio0.dir(0, dio0.OUTPUT)

# set value of pin 0
dio0.value(0, dio0.LOW)

#disable hiz mode of pin 0,
# note: all pins are in hiz mode right after opening (for protection)
dio0.hiz(0, dio0.DISABLE)

# start the basic mode

# wait
while True:

# Stop basic mode

# close resources

pyBox0 uses same style as libbox0 and
much of the documentation of libbox0 is applicable to pyBox0

int b0_<section>_<func>(<section-object>, params....)

in pyBox0:
instead of int, an exception (ResultException is raised) when int-val < 0
so, now the return value is used for other tasks

"b0" tag is now replace with "box0." as python have concept of modules

<section> is replace with files.
for example: <section> = "device" , theirs
and it contain

<func> these are under-scored style name in libbox0
in pyBox0, camelcasing is used
for example b0_usb_open_supported() is box0.usb.open_supported()

most of the library assumes numpy array.
numpy is good and you should always use numpy with pyBox0 as
it much better in long run

Getting help

get on to #box0 on IRC freenode
and report bug on

Getting involved

get on to #box0 on IRC freenode
and report bug on


GNU/GPLv3 or later (see COPYING)

Credits and references


Kuldeep Singh Dhaka <>
Release History

Release History

This version
History Node


History Node


History Node


Download Files

Download Files

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

File Name & Checksum SHA256 Checksum Help Version File Type Upload Date
box0-0.3.0-py3-none-any.whl (43.9 kB) Copy SHA256 Checksum SHA256 py3 Wheel Dec 26, 2016

Supported By

WebFaction WebFaction Technical Writing Elastic Elastic Search Pingdom Pingdom Monitoring Dyn Dyn DNS Sentry Sentry Error Logging CloudAMQP CloudAMQP RabbitMQ Heroku Heroku PaaS Kabu Creative Kabu Creative UX & Design Fastly Fastly CDN DigiCert DigiCert EV Certificate Rackspace Rackspace Cloud Servers DreamHost DreamHost Log Hosting