Install & Compatibility
Where this runs
tested against v3.1.0 · pip install
no network on importno background threads
Install × environment matrix
Each cell = how many times install + import succeeded across repeated harness runs. Partial = flaky.
glibc = Debian/Ubuntu slim · musl = Alpine Linux
muslpy 3.10–3.95 runs
installs and imports cleanly · install 0.0s · import 0.250s · 18.8MB
glibcpy 3.10–3.95 runs
installs and imports cleanly · install 1.7s · import 0.214s · 19MB
17MB installed
● package 17MB
Code
Verified usage
Verified import paths — ran on the pinned version, not inferred.
decode
✓ from pyais import decode
✗ from pyais.decode import decode
decode is a top-level function, not a submodule. Wrong import raises ModuleNotFoundError.
AISSentence
✓ from pyais import AISSentence
✗ from pyais.messages import AISSentence
AISSentence is exported from pyais; accessing submodule path may break or not exist.
Payload
✓ from pyais import Payload
✗ from pyais.payload import Payload
Payload is a top-level export. Direct submodule import may fail.
Decode a single AIS message from an NMEA 0183 sentence.
from pyais import decode
# NMEA 0183 AIS message string
msg = "!AIVDM,1,1,,A,133m@ogP00PD;88MD5MTDww@2D7k,0*46"
decoded = decode(msg)
print(decoded)
print(decoded.asdict())
Errors
Common errors & fixes
ModuleNotFoundError: No module named 'pyais.decode'
Importing decode as a submodule instead of top-level function.
fixUse 'from pyais import decode'.
AttributeError: 'AISSentence' object has no attribute 'bit_array'
Using deprecated attribute from v2.x. In v3.0.0, 'bit_array' was renamed to 'bv'.
fixReplace 'bit_array' with 'bv'.
TypeError: decode() missing 1 required positional argument: 'sentence'
Calling decode on a list or forgetting to pass the sentence string.
fixEnsure you pass a single NMEA sentence string to decode().
Upgrade
Version history
3.1.0latest on PyPI · released Jun 6, 2026
Audit
Dependencies
No dependency data recorded yet.