Skip to main content
Join the official 2019 Python Developers SurveyStart the survey!

Python bindings for Swift Binary Protocol

Project description

Python client for Swift Binary Protocol (SBP). Since v2.5 libsbp is compatible with Python 2.7, 3.4 to 3.7. For new projects, Python v3 is recommended.

Setup

You must have python and pip installed.

Install dependencies only:

$ sudo pip install -r requirements.txt

Install from repo:

$ sudo python setup.py install

Install package from pypi:

$ sudo pip install sbp

Setup using a virtual environment

Setup and activate the virtualenv:

$ virtualenv .env && source .env/bin/activate

Install py.test in the virtualenv:

$ pip install pytest-virtualenv

Install the pt.test coverage tools:

$ pip install pytest-cov

Finally, proceed to the standard setup instructions.

Usage Examples

Simple example

Receives SBP messages over a serial port, decodes MSG_BASELINE messages and prints them out. See simple.py .

Run this example with:

$ python -m sbp.client.examples.simple -p /path/to/serial/port

Sending SBP messages over UDP

Receives SBP messages over a serial port and sends all incoming messages to a UDP socket. See udp.py .

Run this example with:

$ python -m sbp.client.examples.udp -s /path/to/serial/port

Testing

To run the tests and check for coverage:

$  py.test -v --cov sbp tests/

To run the tests without suppressing stdout output:

$ py.test -v -s –cov sbp tests/

License

Copyright © 2015 Swift Navigation

Distributed under LGPLv3.0.

Release history Release notifications

Download files

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

Files for sbp, version 2.7.1
Filename, size File type Python version Upload date Hashes
Filename, size sbp-2.7.1-cp34-cp34m-linux_armv7l.whl (419.3 kB) File type Wheel Python version cp34 Upload date Hashes View hashes
Filename, size sbp-2.7.1-cp35-cp35m-linux_armv7l.whl (419.7 kB) File type Wheel Python version cp35 Upload date Hashes View hashes
Filename, size sbp-2.7.1-cp35-cp35m-macosx_10_6_x86_64.whl (268.8 kB) File type Wheel Python version cp35 Upload date Hashes View hashes
Filename, size sbp-2.7.1-cp35-cp35m-manylinux1_x86_64.whl (252.4 kB) File type Wheel Python version cp35 Upload date Hashes View hashes
Filename, size sbp-2.7.1-cp36-cp36m-linux_armv7l.whl (420.0 kB) File type Wheel Python version cp36 Upload date Hashes View hashes
Filename, size sbp-2.7.1-cp36-cp36m-macosx_10_7_x86_64.whl (268.7 kB) File type Wheel Python version cp36 Upload date Hashes View hashes
Filename, size sbp-2.7.1-cp36-cp36m-manylinux1_x86_64.whl (252.4 kB) File type Wheel Python version cp36 Upload date Hashes View hashes
Filename, size sbp-2.7.1-cp37-cp37m-linux_armv7l.whl (421.6 kB) File type Wheel Python version cp37 Upload date Hashes View hashes
Filename, size sbp-2.7.1-cp37-cp37m-macosx_10_9_x86_64.whl (268.7 kB) File type Wheel Python version cp37 Upload date Hashes View hashes
Filename, size sbp-2.7.1-cp37-cp37m-manylinux1_x86_64.whl (252.4 kB) File type Wheel Python version cp37 Upload date Hashes View hashes
Filename, size sbp-2.7.1-py2.py3-none-any.whl (126.7 kB) File type Wheel Python version py2.py3 Upload date Hashes View hashes

Supported by

Elastic Elastic Search Pingdom Pingdom Monitoring Google Google BigQuery Sentry Sentry Error logging AWS AWS Cloud computing DataDog DataDog Monitoring Fastly Fastly CDN SignalFx SignalFx Supporter DigiCert DigiCert EV certificate StatusPage StatusPage Status page