--- id: pyais version: "3.2.1" 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) license_treatment: permissive maintenance: active --- # pyais — AIS message decoding License: permissive · Maintenance: active · Downloads: 147.4K/mo ## 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 above — 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 pip install pyais uv add pyais 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_current - Install friction: low - Maintenance: active - Downloads: 147.4K/month (top 15,000 on PyPI) - Known vulnerabilities: none known ## Tags AIS message decoding, maritime vessel tracking, NMEA 0183 parsing, ship position data, AIS encoder decoder, maritime data processing, vessel identification system, maritime, real-time-data, protocol-parsing [View on SkillFed](https://skillfed.io/packages/pyais) · [View on PyPI](https://pypi.org/project/pyais/)