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 LGPLv3.0.

Project details


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.

Source Distributions

No source distribution files available for this release.See tutorial on generating distribution archives.

Built Distributions

sbp-3.1.2-py2.py3-none-any.whl (131.4 kB view hashes)

Uploaded Python 2 Python 3

sbp-3.1.2-cp38-cp38-win_amd64.whl (226.2 kB view hashes)

Uploaded CPython 3.8 Windows x86-64

sbp-3.1.2-cp38-cp38-win32.whl (225.4 kB view hashes)

Uploaded CPython 3.8 Windows x86

sbp-3.1.2-cp38-cp38-manylinux1_x86_64.whl (252.6 kB view hashes)

Uploaded CPython 3.8

sbp-3.1.2-cp38-cp38-macosx_10_14_x86_64.whl (275.4 kB view hashes)

Uploaded CPython 3.8 macOS 10.14+ x86-64

sbp-3.1.2-cp38-cp38-linux_armv7l.whl (442.2 kB view hashes)

Uploaded CPython 3.8

sbp-3.1.2-cp37-cp37m-win_amd64.whl (226.0 kB view hashes)

Uploaded CPython 3.7m Windows x86-64

sbp-3.1.2-cp37-cp37m-win32.whl (225.2 kB view hashes)

Uploaded CPython 3.7m Windows x86

sbp-3.1.2-cp37-cp37m-manylinux1_x86_64.whl (252.4 kB view hashes)

Uploaded CPython 3.7m

sbp-3.1.2-cp37-cp37m-macosx_10_14_x86_64.whl (275.4 kB view hashes)

Uploaded CPython 3.7m macOS 10.14+ x86-64

sbp-3.1.2-cp37-cp37m-linux_armv7l.whl (439.3 kB view hashes)

Uploaded CPython 3.7m

sbp-3.1.2-cp36-cp36m-win_amd64.whl (226.1 kB view hashes)

Uploaded CPython 3.6m Windows x86-64

sbp-3.1.2-cp36-cp36m-win32.whl (225.2 kB view hashes)

Uploaded CPython 3.6m Windows x86

sbp-3.1.2-cp36-cp36m-manylinux1_x86_64.whl (252.4 kB view hashes)

Uploaded CPython 3.6m

sbp-3.1.2-cp36-cp36m-macosx_10_14_x86_64.whl (275.4 kB view hashes)

Uploaded CPython 3.6m macOS 10.14+ x86-64

sbp-3.1.2-cp36-cp36m-linux_armv7l.whl (438.5 kB view hashes)

Uploaded CPython 3.6m

sbp-3.1.2-cp35-cp35m-win_amd64.whl (228.4 kB view hashes)

Uploaded CPython 3.5m Windows x86-64

sbp-3.1.2-cp35-cp35m-win32.whl (227.4 kB view hashes)

Uploaded CPython 3.5m Windows x86

sbp-3.1.2-cp35-cp35m-manylinux1_x86_64.whl (252.4 kB view hashes)

Uploaded CPython 3.5m

sbp-3.1.2-cp35-cp35m-macosx_10_6_x86_64.whl (275.4 kB view hashes)

Uploaded CPython 3.5m macOS 10.6+ x86-64

sbp-3.1.2-cp35-cp35m-linux_armv7l.whl (437.7 kB view hashes)

Uploaded CPython 3.5m

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