PyArinc429
Note: The API is subject to change. Encoding is stable; decoding is available for BNR and BCD.
PRs accepted!
How to install
pip install arinc429
This lib has zero dependecies (and it will stay this way!)
How to use
Encoder
from arinc429 import Encoder
a429 = Encoder()
det= {
"label":0o205,
"value":100,
"ssm": 0x03,
"sdi":0,
"encoding":"BNR"
}
a429.encode(**det)
word = a429.word # uint32_t word
bin_vals = a429.bword # binary word
# Multiple words
a429 = Encoder()
w1= {
"label":0o205,
"value":100,
"ssm": 0x03,
"sdi":0,
"msb":29,
"lsb":12
"encoding":"BNR"
}
w2= {
"value":1,
"msb":11, # Bit position
}
a429.encode(**det)
a429.add_dsc(**w2)
word = a429.word # uint32_t word
If you want to encode another label using the same encoder, you need to reset the encoder before.
from arinc429 import Encoder
a429 = Encoder()
det= {
"label":0o205,
"value":100,
"ssm": 0x03,
"sdi":0,
"encoding":"BNR"
}
a429.encode(**det)
det2= {
"label":0o206,
"value":100,
"ssm": 0x03,
"sdi":0,
"encoding":"BNR"
}
a429.reset() # If you dont do this, it will raise an exception
a429.encode(**det)
In case you wan to encode a DSC value into a BNR word, you can do it like this:
from arinc429 import Encoder
a429 = Encoder()
det= {
"label":0o205,
"value":100,
"ssm": 0x03,
"sdi":0,
"encoding":"BNR",
"msb":28,
}
a429.add_dsc(1,29) # Add a DSC value to the word
Same applies for BNU encoding with the add_bnu method and with BNR with the add_bnr method.
The encoder takes care so you dont shoot your foot while encoding and loosing information, it wont let you encode something into a value that is already being used.
If you were to try use a different msb in the add_dsc method, it would raise an exception as all the bits are already being used.
You can also acces the state of the word by slicing the objects:
a429[0].word # will return the words first value when the first value was encoded
a429[-1].word # will return the words last value when the last value was encoded
Container class
There is a container class that allows you to easily work with the Arinc429 words.
from arinc429 import Arinc429Word
word = Arinc429Word(
byte1=0x00,
byte2=0x20,
byte3=0x00,
byte4=0xe1
)
It accepts multiple input formats and some cool helper functions like the visualize() method that will
output a string with a bit formatting of the word. Check src/common.py for more info.
Decoder
Decoder supports BNR and BCD.
from arinc429 import Decoder
a429 = Decoder()
word = a429.decode(
b"\xa0\x01\xa4\x61",
encoding="BNR",
)
assert(word.label== 0o206)
assert(word.ssm== 0x01)
assert(word.sdi== 0)
assert(word.value == 105)
Roadmap
-
Encode BNR
-
Encode BCD
-
Encode DSC
-
Encode BNU
-
Raw encoding ( label + value)
-
Mixed encoding (DSC + BNR)
-
Mixed encoding (BNU+ BNR)
-
Mixed encoding (DSC + DSC)
-
Mixed encoding (DSC + BNU)
-
Mixed encoding (BNR+ BNR)
-
Encoding values with using the SDI/SSM as usable fields (Fun encodings)
-
Decode BNR
-
Decode BCD
-
Decode DSC
-
Implement in C
I dont really follow a specific roadmap; I just add features as I need them.
Contributing
Pull requests are welcome. For major changes, please open an issue first to discuss what you would like to change.
Docs
Docs are generated with Sphinx from docstrings and live in docs/.
Changelog
See CHANGELOG.md.
Technical Overview
This library provides comprehensive support for encoding and decoding ARINC 429 data words. ARINC 429 is a widely used avionics data bus specification that defines how avionics systems communicate in aircraft. If you want a high-level explainer, see https://www.jaimebw.com/2024-11-11-encoding-arinc429/.
Supported Encodings
The library currently supports or plans to support the following encoding formats:
- Binary (BNR)
- Binary Coded Decimal (BCD)
- Discrete (DSC)
- Binary Unsigned (BNU)
- Hybrid formats (e.g., BNR + DSC combinations)
- Raw encoding (custom label + value pairs)
Flexible Implementation
The library is designed to be flexible and extensible, allowing for:
- Standard ARINC 429 word formats
- Custom data encoding schemes
- Direct manipulation of label and data fields
- Support for various SSM (Sign/Status Matrix) configurations
For specific encoding requirements or custom implementations, please refer to the examples section above.
License
MIT License. See LICENSE.
"I steal fire not with torches, but with code. Not for men — but for the machines that do not dream yet."
Metadata
Release files for arinc429 0.1.7
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | |
|---|---|---|---|
| arinc429-0.1.7.tar.gz | 14.6 kB | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| arinc429-0.1.7-py3-none-any.whl | Python 3 | none | any | Details |
Total release size: 25.3 kB
Release files / arinc429-0.1.7.tar.gz
| Download URL | arinc429-0.1.7.tar.gz |
|---|---|
| Size | 14.6 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
7812cbc514425b92852d30bc7a72ca2ec060f4f5da3682527854d1a9a3a54c4e
|
|
BLAKE2b-256 checksum How to use checksums |
e24d7863e56419ac80448d66781c7d0bbdb4375fdacdd16675f4e6581ddc2c9b
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/6.1.0 CPython/3.13.7
|
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.
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Feb 5, 2026.
Transparency logRelease files / arinc429-0.1.7-py3-none-any.whl
| Download URL | arinc429-0.1.7-py3-none-any.whl |
|---|---|
| Size | 10.7 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
3d84d5f56bccaaf36c5c14dfe3895db58dc1edb037e7cfa90d4f97b871e5d0bf
|
|
BLAKE2b-256 checksum How to use checksums |
86e0128879b45b8e5ff9647f0261528abdfb0d9e7e4021c8f4300f1fe6126dfe
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/6.1.0 CPython/3.13.7
|
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.
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Feb 5, 2026.
Transparency log