Skip to main content

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 MIT.

Release history Release notifications | RSS feed

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 3.4.4
Filename, size File type Python version Upload date Hashes
Filename, size sbp-3.4.4-cp35-cp35m-linux_armv7l.whl (441.2 kB) File type Wheel Python version cp35 Upload date Hashes View
Filename, size sbp-3.4.4-cp35-cp35m-macosx_10_14_x86_64.whl (279.3 kB) File type Wheel Python version cp35 Upload date Hashes View
Filename, size sbp-3.4.4-cp35-cp35m-manylinux1_x86_64.whl (256.4 kB) File type Wheel Python version cp35 Upload date Hashes View
Filename, size sbp-3.4.4-cp35-cp35m-win32.whl (230.3 kB) File type Wheel Python version cp35 Upload date Hashes View
Filename, size sbp-3.4.4-cp35-cp35m-win_amd64.whl (231.4 kB) File type Wheel Python version cp35 Upload date Hashes View
Filename, size sbp-3.4.4-cp36-cp36m-linux_armv7l.whl (442.0 kB) File type Wheel Python version cp36 Upload date Hashes View
Filename, size sbp-3.4.4-cp36-cp36m-macosx_10_14_x86_64.whl (279.3 kB) File type Wheel Python version cp36 Upload date Hashes View
Filename, size sbp-3.4.4-cp36-cp36m-manylinux1_x86_64.whl (256.4 kB) File type Wheel Python version cp36 Upload date Hashes View
Filename, size sbp-3.4.4-cp36-cp36m-win32.whl (228.1 kB) File type Wheel Python version cp36 Upload date Hashes View
Filename, size sbp-3.4.4-cp36-cp36m-win_amd64.whl (228.9 kB) File type Wheel Python version cp36 Upload date Hashes View
Filename, size sbp-3.4.4-cp37-cp37m-linux_armv7l.whl (443.2 kB) File type Wheel Python version cp37 Upload date Hashes View
Filename, size sbp-3.4.4-cp37-cp37m-macosx_10_14_x86_64.whl (279.3 kB) File type Wheel Python version cp37 Upload date Hashes View
Filename, size sbp-3.4.4-cp37-cp37m-manylinux1_x86_64.whl (256.3 kB) File type Wheel Python version cp37 Upload date Hashes View
Filename, size sbp-3.4.4-cp37-cp37m-win32.whl (228.1 kB) File type Wheel Python version cp37 Upload date Hashes View
Filename, size sbp-3.4.4-cp37-cp37m-win_amd64.whl (228.9 kB) File type Wheel Python version cp37 Upload date Hashes View
Filename, size sbp-3.4.4-cp38-cp38-linux_armv7l.whl (445.8 kB) File type Wheel Python version cp38 Upload date Hashes View
Filename, size sbp-3.4.4-cp38-cp38-macosx_10_14_x86_64.whl (279.3 kB) File type Wheel Python version cp38 Upload date Hashes View
Filename, size sbp-3.4.4-cp38-cp38-manylinux1_x86_64.whl (256.6 kB) File type Wheel Python version cp38 Upload date Hashes View
Filename, size sbp-3.4.4-cp38-cp38-win32.whl (228.4 kB) File type Wheel Python version cp38 Upload date Hashes View
Filename, size sbp-3.4.4-cp38-cp38-win_amd64.whl (229.3 kB) File type Wheel Python version cp38 Upload date Hashes View
Filename, size sbp-3.4.4-py2.py3-none-any.whl (137.1 kB) File type Wheel Python version py2.py3 Upload date Hashes View

Supported by

Pingdom Pingdom Monitoring Google Google Object Storage and Download Analytics Sentry Sentry Error logging AWS AWS Cloud computing DataDog DataDog Monitoring Fastly Fastly CDN DigiCert DigiCert EV certificate StatusPage StatusPage Status page