aggsoft-ais-decoder
Unofficial Python wrapper for decoding AIS (Automatic Identification System) messages via aggsoft.com.
Note: This library is not affiliated with, endorsed by, or connected to aggsoft.com. The service is provided by a third party.
Features
- Decode AIS messages types 1-27
- Support for single and multipart NMEA sentences
- Async/await API with httpx
- Configurable HTML fallback parser
- Comprehensive error handling
Requirements
Internet connection required - This library relies on the aggsoft.com online service to decode AIS messages. The messages are sent to a third-party server for processing.
User Responsibility
- Do not spam the service with excessive requests. Use appropriate delays between requests (see
decode_batchdelay parameter). - Verify compliance with aggsoft.com's terms of service before using this library.
- You are responsible for ensuring your usage of the service is appropriate.
Installation
pip install aggsoft-ais-decoder
Or install from source:
pip install -e .
Quick Start
from aggsoft_ais_decoder import AISDecoderClient, decode
async def main():
# Using client
async with AISDecoderClient() as client:
result = await client.decode("!AIVDM,1,1,,A,13u@ND0P01PJ=0lMH0nN20pl,0*7D")
if result.success:
print(f"Ship: {result.decoded.ship_name}")
print(f"Position: {result.decoded.position}")
# Or module-level function
result = await decode("!AIVDM,1,1,,A,13u@ND0P01PJ=0lMH0nN20pl,0*7D")
Configuration
from aggsoft_ais_decoder import AISDecoderClient
# Enable HTML fallback if JSON parsing fails (default: False)
client = AISDecoderClient(enable_html_fallback=True)
# Customize timeout (default: 30 seconds)
client = AISDecoderClient(timeout=60.0)
API Reference
AISDecoderClient
client = AISDecoderClient(
enable_html_fallback=False, # Use HTML parser if JSON fails
timeout=30.0 # Request timeout in seconds
)
Methods:
decode(message: str | list[str])- Decode single or multipart messagedecode_batch(messages: list[str], delay=0.5)- Decode multiple messages
Returns: AISDecodeResponse with:
success: booldecoded: AISShipData | Noneerror: str | None
Module Functions
from aggsoft_ais_decoder import decode, decode_batch
# Single message
result = await decode("!AIVDM,1,1,,A,13u@ND0P01PJ=0lMH0nN20pl,0*7D")
# Multipart message (list)
result = await decode(["!AIVDM,2,1,,A,13u@ND0P01Pj00000000000000", "!AIVDM,2,2,,A,0000000000000000000000000"])
# Batch
results = await decode_batch(["!AIVDM,1,1,,A,13u@ND0P01PJ=0lMH0nN20pl,0*7D"])
Dependencies
- httpx >= 0.27.0
- pydantic >= 2.0.0
- beautifulsoup4 >= 4.12.0
Development
# Install dev dependencies
pip install -r requirements-dev.txt
# Run tests
pytest tests/
Legal
Copyright (c) 2026 KikiManjaro
This library is provided under the MIT License.
aggsoft.com is a third-party service. All rights reserved by their respective owners.
Metadata
Release files for aggsoft-ais-decoder 1.0.0
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | Actions |
|---|---|---|---|---|
| aggsoft_ais_decoder-1.0.0.tar.gz | 30.0 kB | Without provenance | Details for aggsoft_ais_decoder-1.0.0.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| aggsoft_ais_decoder-1.0.0-py3-none-any.whl | Python 3 | none | any | Details for aggsoft_ais_decoder-1.0.0-py3-none-any.whl |
Total release size: 40.6 kB
Release files / aggsoft_ais_decoder-1.0.0.tar.gz
| Download URL | aggsoft_ais_decoder-1.0.0.tar.gz |
|---|---|
| Size | 30.0 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
55351c093fc13b26f7cfd3ce9727b5ac462a09ceb0f2ad2ca08006dce570087d
|
|
BLAKE2b-256 checksum How to use checksums |
83f5319ebe660e06ba3a0f8012e4e16629f1c7d575bc8d2c89d2182708c362ce
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/6.2.0 CPython/3.14.5
|
Release files / aggsoft_ais_decoder-1.0.0-py3-none-any.whl
| Download URL | aggsoft_ais_decoder-1.0.0-py3-none-any.whl |
|---|---|
| Size | 10.7 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
080023eefcf83b3c9bc98011a14b319e9512887cea1a03d170904272f76d6545
|
|
BLAKE2b-256 checksum How to use checksums |
90fc3aab7ddd73b6d0938d4c597977f0de56fefca3b6ec6c297e7e8848f8eb71
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/6.2.0 CPython/3.14.5
|
Security for aggsoft-ais-decoder 1.0.0
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
No provenance found
None of the files in this release were uploaded with provenance metadata.
A note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.