Skip to main content

acid-cat-catalog

The AcidCat catalog library for Python. PyPI package: acid-cat-catalog.

Write a catalog in Python, and write it in canonical form. The library uses only the standard library. Use it at build time to write acidcat.catalog.json.

pip install acid-cat-catalog
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())

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. validate() lists the rules a catalog breaks, and render() raises CatalogError for one that breaks any. The full example is examples/weather.py, a weather station.

read_only, destructive and idempotent are the hints of a capability for clients. A hint that is not given is not in the catalog.

The tests compare the output of the library with files in this directory: the weather-station catalog examples/weather.acidcat.json, a catalog of values that languages write differently, tests/fixtures/edge.acidcat.json, and a catalog with each hint of a capability, tests/fixtures/hints.acidcat.json, which shows the order of the hints. The air-conditioner example of the repository also writes its catalog with this library, in examples/aircon/catalog/python.py. Its test compares the output with the Pkl catalog. Each committed catalog file is in canonical form, and the root moon run check checks this. Thus all catalog libraries agree on the canonical form, and they do not share a test file. Test with moon run catalog-python:test.

Metadata

Release files for acid-cat-catalog 0.4.0

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for acid-cat-catalog 0.4.0
File Size Uploaded Provenance Actions
acid_cat_catalog-0.4.0.tar.gz 6.2 kB With provenance Details for acid_cat_catalog-0.4.0.tar.gz

Built distribution (wheel)

Table of built distributions (wheels) for acid-cat-catalog 0.4.0
File Interpreter ABI Platform Actions
acid_cat_catalog-0.4.0-py3-none-any.whl Python 3 none any Details for acid_cat_catalog-0.4.0-py3-none-any.whl

Total release size: 13.3 kB

Release files / acid_cat_catalog-0.4.0.tar.gz

Download URL acid_cat_catalog-0.4.0.tar.gz
Size 6.2 kB
Tags Source
SHA-256 checksum
How to use checksums
f66876780b2ea2a2e7424e0c23e5e66590fda414b055635ca562a294c60087ac
BLAKE2b-256 checksum
How to use checksums
ac8f61f95690b60e7ea4da56cee7d0424f3635c492a782518482e5acf4f83966
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 log

Release files / acid_cat_catalog-0.4.0-py3-none-any.whl

Download URL acid_cat_catalog-0.4.0-py3-none-any.whl
Size 7.1 kB
Tags Python 3
SHA-256 checksum
How to use checksums
86c7c7336f298483408cedd7470b70d0425736cb50078596b89974e10fee993a
BLAKE2b-256 checksum
How to use checksums
c9309102857fcc3a074e3689ff40e83be91710996f9f9e8eaa188b0ab5ceba07
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 log

Security for acid-cat-catalog 0.4.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.

Full provenance

Both files in this release have been uploaded with provenance metadata.

Select from 2 files

Attestation for acid_cat_catalog-0.4.0.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 log

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.

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page