acid-cat-catalog
The AcidCat catalog library for Python, published on PyPI as acid-cat-catalog. Build a catalog in code and write it in canonical form. The library uses only the standard library. Use it at build time to write acidcat.catalog.json.
Install
pip install acid-cat-catalog
Example
from pathlib import Path
from acid_cat_catalog import Catalog
catalog = Catalog(title="Hilltop weather station")
catalog.target("logger", bindings=["http"])
fault = catalog.type("SensorFault", {"type": "object"})
catalog.capability(
"weather.sensor.calibrate",
description="Correct one sensor by a fixed offset.",
audience=["logger"],
input={"type": "object", "required": ["offset"], "properties": {"offset": {"type": "number"}}},
failures={"SensorFault": fault},
)
catalog.event(
"weather.alert.raised",
description="A reading passed a limit. The occurrence gives the reading.",
audience=["logger"],
input={"type": "object", "properties": {}},
payload={"type": "object", "properties": {"celsius": {"type": "number"}}},
)
Path("acidcat.catalog.json").write_text(catalog.render())
The full example, a weather station, is examples/weather.py.
API
event()declares an event. Clients subscribe to it and get its payload in each occurrence. A payload is an object, or a reference to a type that is an object.read_only,destructiveandidempotentare a capability's hints for clients. A hint you leave out is not in the catalog.validate()lists the rules that the catalog breaks.render()raisesCatalogErrorfor a catalog that breaks any rule.
Tests
Run moon run catalog-python:test. The tests compare the library's output, byte for byte, with these files:
| File | Contents |
|---|---|
examples/weather.acidcat.json |
The weather-station catalog |
../testdata/canonical.acidcat.json |
The canonical form of ../testdata/canonical.json: values that languages write differently by default |
../testdata/hints.acidcat.json |
Each hint of a capability, in canonical order |
The air-conditioner example writes its catalog with this library in examples/aircon/catalog/python.py, and its test compares the output with the Pkl catalog. The root moon run check checks that each committed catalog file is in canonical form.
Metadata
Release files for acid-cat-catalog 0.4.1
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 |
|---|---|---|---|---|
| acid_cat_catalog-0.4.1.tar.gz | 6.3 kB | With provenance | Details for acid_cat_catalog-0.4.1.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| acid_cat_catalog-0.4.1-py3-none-any.whl | Python 3 | none | any | Details for acid_cat_catalog-0.4.1-py3-none-any.whl |
Total release size: 13.5 kB
Release files / acid_cat_catalog-0.4.1.tar.gz
| Download URL | acid_cat_catalog-0.4.1.tar.gz |
|---|---|
| Size | 6.3 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
fe596abd48bc5737d3bb888720ce34b2986f797e87463832188c7c70058fa1ea
|
|
BLAKE2b-256 checksum How to use checksums |
1a8bb3065b9d6e7d661ddd2eed5e1f312c37cced62be4d098f2e80ff4e4c727a
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/7.0.0 CPython/3.13.14
|
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 Nov 18, 2026.
Transparency logRelease files / acid_cat_catalog-0.4.1-py3-none-any.whl
| Download URL | acid_cat_catalog-0.4.1-py3-none-any.whl |
|---|---|
| Size | 7.3 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
efd31b4548b68e41d21bf3e7c3165f8f30bcd2c87b6ebca71500a7a8b4b5181f
|
|
BLAKE2b-256 checksum How to use checksums |
6d51cdaf8a127063ab588918953117274321f32b0bb5babeb7b665f1b4f45f44
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/7.0.0 CPython/3.13.14
|
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 Nov 18, 2026.
Transparency logSecurity for acid-cat-catalog 0.4.1
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.
Full provenance
Both files in this release have been uploaded with provenance metadata.
Attestation for acid_cat_catalog-0.4.1.tar.gz
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 Nov 18, 2026.
Transparency logA 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.