pyubx2
UBX protocol parser and generator
What it is and what it does
pyubx2 is a parser and generator for the UBX binary protocol used by u-blox GNSS receiver modules. It reads and parses incoming UBX messages from streams (serial, file, or socket), returning both raw bytes and structured message objects. The package integrates support for NMEA 0183 and RTCM3 protocols via its runtime dependencies pynmeagps and pyrtcm, covering all output protocols that u-blox receivers produce.
The library divides UBX messages into three categories: GET (output from the receiver), SET (commands to the receiver), and POLL (queries to the receiver). It provides a UBXReader class for streaming and parsing, a static parse() method for individual messages, and utilities for generating and serializing messages. The package is readily extensible and implements a comprehensive set of messages for current u-blox devices.
Use it for:
- Stream and parse real-time GNSS data from a u-blox receiver via file or socket.
- Read and decode UBX messages from a binary file for post-processing or analysis.
- Send configuration commands or queries to a u-blox receiver and parse responses.
- Handle mixed protocol streams containing UBX, NMEA, and RTCM3 messages.
- Extend the parser with custom UBX message definitions for non-standard outputs.
Worth the install?
AI-flagged interpretation of the facts on this page — verify before relying
Parses and generates UBX protocol messages from u-blox GNSS receivers, and can also handle NMEA 0183 and RTCM3 protocols through pynmeagps and pyrtcm.
Yes. The package is actively maintained, has no known vulnerabilities, low install friction, and a permissive BSD-3-Clause license. It fills a clear need for developers working with u-blox GNSS receivers. Install it if you need to parse or generate UBX protocol messages.
Install
pyubx2 on PyPI
pip
pip install pyubx2uv
uv add pyubx2poetry
poetry add pyubx2Installing pyubx2
Before you install
Low install friction with a pure Python wheel. Actively maintained with a recent release 27 days old and a stable repository. Requires Python>=3.10.
License in practice
BSD-3-Clause is permissive; you can use, modify, and distribute this package with minimal restrictions, provided you include the license notice.
Quickstart
from pyubx2 import UBXReader
with open('ubxdata.bin', 'rb') as stream:
ubr = UBXReader(stream)
for raw_data, parsed_data in ubr:
print(parsed_data)
Requires Python>=3.10; stream object must support read(n) -> bytes method.
Verify before relying
- Whether the command-line utility and graphical client mentioned in the documentation are included in the PyPI distribution.
- Performance characteristics when parsing high-frequency GNSS message streams.
- Whether custom UBX message type extensibility is straightforward for typical use cases.
Package facts
| License | BSD-3-Clause (permissive) |
| Python support | supports the current Python release (>=3.10) |
| Install friction | low — pure-Python wheel |
| Runtime dependencies | 2 — pynmeagps, pyrtcm |
| Maintenance | actively maintained — 27 days since the last release |
| Last repo commit | |
| First released | |
| Downloads | 93,040/month — #13,404 on PyPI (30-day window, as of 2026-08-14) |
| Known vulnerabilities | none known (OSV.dev, checked 2026-08-14) |
Evidence: pyubx2-1.3.6-py3-none-any.whl
Tags
More Python Modules packages
Converts domain names between Unicode and…
permissive · top 100 on PyPI
setuptoolsSetuptools is a Python build backend and…
permissive · top 100 on PyPI
PyYAMLPyYAML parses and emits YAML 1.1 data format,…
permissive · top 100 on PyPI
pydanticPydantic validates Python data structures…
permissive · top 100 on PyPI
annotated-typesProvides reusable metadata objects for use with…
permissive · top 100 on PyPI
typing-inspectionProvides runtime tools to inspect and…
permissive · top 100 on PyPI
pynmeagpsParses and generates NMEA 0183 GPS/GNSS…
permissive · top 15,000 on PyPI
pyrtcmParses RTCM3 differential GNSS protocol…
permissive · top 15,000 on PyPI
pynmea2Parses and generates NMEA 0183 sentences from…
permissive · top 15,000 on PyPI
pykdebugparserParses Darwin kdebug trace events from iOS and…
permissive · top 15,000 on PyPI
x690Encodes and decodes data using the X.690 BER…
permissive · top 15,000 on PyPI
pyaisDecodes and encodes AIS (Automatic…
permissive · top 15,000 on PyPI
oralb-blePassive parser for Oral-B toothbrush Bluetooth…
permissive · top 15,000 on PyPI
fdtParses, manipulates, and converts between…
permissive · top 15,000 on PyPI
protobuf-decoderDecodes protobuf binary messages without…
permissive · top 15,000 on PyPI
garmin-fit-sdkDecodes Garmin FIT (Flexible and Interoperable…
unclear · top 15,000 on PyPI