skillfed

pyais

AIS message decoding

pyais v3.2.1 147.4K downloads/30d#11,066 on PyPI253
Permissive license MIT License Copyright (c) 2019 M0r13n Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the… (full text in the JSON record) Active released

What it is and what it does

pyais is a pure-Python library for decoding and encoding AIS messages—the digital protocol ships use to broadcast identification, position, course, and speed via VHF radio. AIS data arrives as NMEA 0183 sentences and is transmitted in six-bit ASCII encoding; pyais handles the parsing and reconstruction of that binary payload into structured vessel information. The library supports single messages, multipart messages, file streams, and live TCP/UDP socket feeds, making it suitable for both offline analysis and real-time maritime monitoring.

The package is production-ready, having been tested against live feeds from Spire, the Norwegian Coastal Administration, and other real-world sources. It includes utilities for reading files, iterating over message streams, and a TCP server for concurrent client connections. Encoding is also supported, allowing you to construct AIS sentences from dictionaries of vessel data. The single runtime dependency is attrs, and installation is straightforward.

Use it for:

  • Decode live AIS feeds from maritime authorities or satellite operators to track vessel positions and movements in real time.
  • Parse historical AIS message logs from files to analyze shipping patterns, port traffic, or vessel behavior.
  • Build a TCP server that aggregates AIS data from multiple client connections for centralized maritime monitoring.
  • Encode vessel information into AIS sentences for simulation, testing, or custom maritime data systems.
  • Extract structured vessel metadata (MMSI, callsign, position, speed, course) from raw NMEA radio broadcasts.

Worth the install?

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

Decodes and encodes AIS (Automatic Identification System) messages from maritime VHF radio broadcasts, supporting single messages, files, and TCP/UDP socket streams in pure Python.

Yes. pyais is actively maintained, has no known vulnerabilities, installs with minimal friction, and is licensed permissively. Install it if you need to work with AIS maritime data—whether decoding live feeds, analyzing historical logs, or building maritime monitoring tools.

Install

pyais on PyPI

pip

pip install pyais

uv

uv add pyais

poetry

poetry add pyais

Installing pyais

Before you install

Low friction install with a single runtime dependency (attrs). Actively maintained with a release 5 days old and 253 repository stars. Officially supports Python 3.9 and later.

License in practice

MIT License permits unrestricted use, modification, and distribution with only attribution and liability disclaimer required—suitable for commercial and proprietary projects.

Quickstart

from pyais import decode

decoded = decode(b"!AIVDM,1,1,,B,15NG6V0P01G?cFhE`R2IU?wn28R>,0*05")
print(decoded)

Requires Python 3.9 or later.

Verify before relying

  • Whether the package's performance characteristics (e.g., throughput for high-volume streams) meet specific maritime monitoring workloads.
  • Compatibility with non-standard or proprietary AIS message variants beyond the AIVDM/AIVDO formats documented.

Package facts

License MIT License Copyright (c) 2019 M0r13n Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the… (full text in the JSON record) (permissive)
Python support supports the current Python release (>=3.9)
Install friction low — pure-Python wheel
Runtime dependencies 1 — attrs
Maintenance actively maintained — 5 days since the last release
Last repo commit
First released
Downloads 147,411/month — #11,066 on PyPI (30-day window, as of 2026-08-14)
Known vulnerabilities none known (OSV.dev, checked 2026-08-14)

Evidence: pyais-3.2.1-py3-none-any.whl

Keywords: AIS, ship, decoding, NMEA, maritime

Development Status :: 5 - Production/StableIntended Audience :: DevelopersLicense :: OSI Approved :: MIT LicenseOperating System :: OS IndependentProgramming Language :: Python :: 3Programming Language :: Python :: 3 :: OnlyProgramming Language :: Python :: 3.10Programming Language :: Python :: 3.11Programming Language :: Python :: 3.12Programming Language :: Python :: 3.13Programming Language :: Python :: 3.9Topic :: CommunicationsTopic :: System :: NetworkingTyping :: Typed

Tags

AIS message decodingmaritime vessel trackingNMEA 0183 parsingship position dataAIS encoder decodermaritime data processingvessel identification system
maritimereal-time-dataprotocol-parsing

More Networking packages