skillfed

pynmea2

Python library for the NMEA 0183 protcol

pynmea2 v1.19.0 150.7K downloads/30d#10,958 on PyPI680
Permissive license MIT Active released

What it is and what it does

pynmea2 is a Python library that reads and writes NMEA 0183 protocol sentences—the standard format for GPS receivers, marine instruments, and navigation devices. It parses raw NMEA strings (like "$GPGGA,184353.07,1929.045,S,...") into Python objects with named fields, and can reconstruct NMEA strings from those objects. The library extracts structured data such as timestamp, latitude, longitude, altitude, and satellite count, and provides convenience properties to convert between NMEA's degree-minute-second format and decimal degrees.

The package is designed for applications that need to read GPS or marine data from serial ports, log files, or other NMEA sources. It handles optional checksums (can validate, require, or ignore them), supports multiple sentence types (GGA, RMC, etc.), and works with both Python 2.7 and modern Python 3 versions. No external dependencies are required—it installs as a single pure-Python wheel.

Use it for:

  • Read GPS coordinates from a serial port and convert them to decimal degrees for mapping or location tracking
  • Parse NMEA log files from marine instruments to extract and validate navigation data
  • Build a real-time GPS dashboard that decodes live NMEA streams and displays position, altitude, and satellite info
  • Generate NMEA sentences programmatically to simulate or test GPS device behavior
  • Integrate GPS data into IoT or embedded systems that communicate via NMEA protocol

Worth the install?

AI-flagged interpretation of the facts on this page — verify before relying

Parses and generates NMEA 0183 sentences from GPS and marine navigation devices, converting raw protocol strings into Python objects with accessible fields.

Yes. The package is actively maintained, has no dependencies, installs cleanly, carries a permissive MIT license, and solves a specific and well-defined problem. Install it if you need to parse or generate NMEA 0183 sentences from GPS or marine devices.

Install

pynmea2 on PyPI

pip

pip install pynmea2

uv

uv add pynmea2

poetry

poetry add pynmea2

Installing pynmea2

Before you install

Low friction: pure Python wheel with no runtime dependencies. Active maintenance with last commit on 2026-04-21 and 680 repository stars.

License in practice

MIT license permits free use, modification, and distribution with minimal restrictions—suitable for commercial and open-source projects alike.

Quickstart

pip install pynmea2

import pynmea2
msg = pynmea2.parse("$GPGGA,184353.07,1929.045,S,02410.506,E,1,04,2.6,100.00,M,-33.9,M,,0000*6D")
print(msg.latitude, msg.longitude, msg.altitude)

Verify before relying

  • Whether the package handles all NMEA 0183 sentence types or only a subset of the protocol
  • Performance characteristics when parsing high-volume streams from serial devices
  • Whether helper properties like latitude/longitude conversion are available for all sentence types

Package facts

License MIT (permissive)
Python support not specified
Install friction low — pure-Python wheel
Runtime dependencies none
Maintenance actively maintained — 1,303 days since the last release
Last repo commit
First released
Downloads 150,717/month — #10,958 on PyPI (30-day window, as of 2026-08-14)
Known vulnerabilities none known (OSV.dev, checked 2026-08-14)

Evidence: pynmea2-1.19.0-py3-none-any.whl

Keywords: python, nmea, gps, parse, parsing, nmea0183, 0183

Intended Audience :: DevelopersLicense :: OSI Approved :: MIT LicenseOperating System :: OS IndependentProgramming Language :: PythonProgramming Language :: Python :: 2Programming Language :: Python :: 2.7Programming Language :: Python :: 3Programming Language :: Python :: 3.4Programming Language :: Python :: 3.5Programming Language :: Python :: 3.6Programming Language :: Python :: 3.7Programming Language :: Python :: 3.8Programming Language :: Python :: 3.9Programming Language :: Python :: Implementation :: PyPyTopic :: Scientific/Engineering :: GISTopic :: Software Development :: Libraries :: Python Modules

Tags

nmea 0183 parsergps sentence parsingmarine navigation datanmea protocol pythongps data extractionserial gps parsingnavigation sentence decoder
gps-navigationserial-protocolsdata-parsing

More Python Modules packages