skillfed

pyubx2

UBX protocol parser and generator

pyubx2 v1.3.6 93.0K downloads/30d#13,404 on PyPI253
Permissive license BSD-3-Clause Active released

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 pyubx2

uv

uv add pyubx2

poetry

poetry add pyubx2

Installing 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

Development Status :: 5 - Production/StableEnvironment :: ConsoleEnvironment :: MacOS XEnvironment :: Win32 (MS Windows)Environment :: X11 ApplicationsIntended Audience :: DevelopersIntended Audience :: End Users/DesktopIntended Audience :: Science/ResearchOperating System :: OS IndependentProgramming Language :: Python :: 3Programming Language :: Python :: 3.10Programming Language :: Python :: 3.11Programming Language :: Python :: 3.12Programming Language :: Python :: 3.13Programming Language :: Python :: 3.14Topic :: Scientific/Engineering :: GISTopic :: Software Development :: Libraries :: Python ModulesTopic :: Utilities

Tags

ubx protocol parsergnss receiver data parsingu-blox gps messagesnmea rtcm protocol handlerbinary gnss protocol decoder
gnss-gpsprotocol-parserubx-binary

More Python Modules packages