Pycatzao
Pycatzao is a pure Python library for encoding, decoding and compressing Asterix CAT240 messages.
📚 Usage & Documentation
Pycatzao releases are available as wheel packages for macOS, Windows and Linux on PyPI. Install it using pip:
$ pip install pycatzao
If you prefer installing this library from source, run:
# optional
$ pip install -r requirements.txt
$ pip install -e .
After installing, simply import pycatzao and start fooling around with its API:
import pycatzao
print("Version:", pycatzao.__version__)
for block in pycatzao.decode_file("my-cat240-data.bin"):
process_cat240_block(
range=block["r"],
azimuth=block["az"],
amplitude=block["amp"],
...
) # do something meaningful with the data
See examples/cat240toHDF5.py for a more elaborated example or our documentation for a full list of available functions. Note, however, that you won't find an introduction into Asterix CAT240 here since we assume that you know the basics of the standard. If you need such an introduction though, simply search for Asterix CAT240 with a search engine of your choice or directly consult https://www.eurocontrol.int/asterix.
🎯 Goals
The purpose of this project is to have a slim and Python-only library with almost no dependencies. We don't plan to add support for other Asterix formats and there are certainly other libraries out there than can parse Asterix CAT240 faster than Pycatzao. However, does this mean that Pycatzao is slow? Certainly not! Pycatzao can easily parse data faster than real-time. On a decently equipped laptop one hour of compressed data is decoded in less than 100 seconds; this is more than 60k message per second... fast enough for most applications.
👷 Contributing
Contributions are welcome! If you find any issues or have suggestions for improvements, please feel free to submit a pull request.
Development Setup
To set up your development environment, follow these steps:
-
Clone the repository:
$ git clone git@github.com:DLR-KN/pycatzao.git
-
Change to the project directory:
$ cd pycatzao
-
Install the development dependencies using
pip:$ pip install -e .[dev]
Pre-Commit-Hooks
To maintain code quality and avoid pushing invalid commits, we recommend using pre-commit hooks. These hooks perform automated checks before commits are made. To set up pre-commit hooks, follow these steps:
-
Install the pre-commit package (if not already installed):
$ pip install pre-commit
-
Install the hooks:
$ pre-commit install
Now, each time you commit changes, the pre-commit hooks will run checks such as formatting, linting, and more. If any issues are found, they will be flagged before the commit is made.
Running Tests
You can run tests using the following command:
$ pytest --cov=pycatzao
Make sure to run tests before submitting a pull request to ensure that everything is functioning as expected.
Generate documentation (optional)
If you like, you can generate the documentation locally by navigating to the docs/ folder and running:
$ cd docs && make html
[...]
The HTML pages are in build/html.
This will generate an HTML documentation under docs/build/html/. Open the generated index.html with a browser and start reading🤓
Metadata
Release files for pycatzao 1.2.5
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 | |
|---|---|---|---|---|
| pycatzao-1.2.5.tar.gz | 36.3 kB | Without provenance | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| pycatzao-1.2.5-py3-none-any.whl | Python 3 | none | any | Details |
Total release size: 54.5 kB
Release files / pycatzao-1.2.5.tar.gz
| Download URL | pycatzao-1.2.5.tar.gz |
|---|---|
| Size | 36.3 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
f97779089de4c1251d51e9af9caee94529f5bbc097cc1a0569f00b9dd4ab6536
|
|
BLAKE2b-256 checksum How to use checksums |
d5178b5644a0afa2bdb265453d73c42316aa7ea4e0e41ed703d6cceb4ce56982
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/6.0.1 CPython/3.11.13
|
Release files / pycatzao-1.2.5-py3-none-any.whl
| Download URL | pycatzao-1.2.5-py3-none-any.whl |
|---|---|
| Size | 18.2 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
a167f024a755e7179a50333c775be585f7a66243c219a71496942bf260eb673f
|
|
BLAKE2b-256 checksum How to use checksums |
9a0acf537255dc0cbbf16697ec735bf381314b7e104f78070148b081aa58c13c
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/6.0.1 CPython/3.11.13
|
Security for pycatzao 1.2.5
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.