Skip to main content

Remote GPIO access library

Project description

HTPIO : Remote I/O Access Library

PyPI PyPI - License PyPI - Python Version PyPI - Status

HTPIO allows users to use Raspberry Pi's GPIOs or similiar hardware remotely using various telecommunication protocols. The library also offers a simple locking mechanism in order to implement advanced testing scenarios using shared hardware.


HTPIO is a subset of the Hilscher Test Framework for products of the netX family. A brief overview of some netX products is given in the links below:


  • Python >=2.7
  • Python >=3.4


  • Remote GPIO access using various protocols
  • Pin locking to ensure shared use of hardware resources
  • Command line interface for shell scripting


First check if pip is installed on the your computer:

pip --version
pip 19.1.1 from c:\python\3.7.3\lib\site-packages\pip (python 3.7)

If the operating system doesn't recognize the command and your operating system is Linux or Windows 8+:

curl >

else visit and download the file. Then run the following command:


If pip is installed, we can proceed further to check for pipenv and eventually install it:

pipenv --version
pipenv, version 2018.11.26

If pipenv is not present on the system issue the following command :

pip install pipenv

To install htpio's latest stable release from PyPi use pipenv (or pip):

pipenv install htpio

or install the latest stable version from BitBucket:

pipenv install

Library interface

>>> from htpio import bridge, socketio, telnetio
>>> device = telnetio.RaspberryPi('')
>>> gpio = bridge.RemoteAccess(device)
>>> gpio.lock(14)
>>> gpio.unlock(14)
>>> gpio.islocked(14)
>>> gpio.configure(14, gpio.OUTPUT)
>>> gpio.set(14, 1)
>>> gpio.get(14)
>>> gpio.deconfigure(14)
>>> gpio.logout()

Command line interface

$ htpio -p telnet set --host --pin 14 --val 1
$ htpio -p socket get --host --pin 14
$ htpio lock --host --pin 14
$ htpio unlock --host --pin 14

Project details

Download files

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

Source Distribution

htpio- (182.2 kB view hashes)

Uploaded Source

Built Distribution

htpio- (18.7 kB view hashes)

Uploaded Python 3

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