Skip to main content

hcs (Python)

A second, independent implementation of the HCS format, with no dependencies (Python >= 3.9). It covers the deterministic part of HCS: parse and serialize .hcs files, hash anchors, locate symbols, check claims against their sources, seal anchors, and render the context block. LLM features (compile, score) stay in the TypeScript CLI.

from hcs import parse, check_document, render_context, SourceCache, root_dir

doc = parse(open("project.hcs").read())
cache = SourceCache(root_dir(doc, "project.hcs"))
for report in check_document(doc, cache):
    print(report["id"], report["status"])
print(render_context(doc))

Command line (python -m hcs or hcs-py once installed): validate, check [--strict], seal [--rehash], render [--budget N].

Both implementations must pass the same language-agnostic suite in conformance/:

python -m unittest discover -s python/tests -v

Documents are plain dicts and lists, with the same shape as the reference implementation's JSON (optional keys are absent rather than None).

Metadata

Release files for hcs-format 0.3.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 hcs-format 0.3.0
File Size Uploaded Provenance
hcs_format-0.3.0.tar.gz 26.3 kB With provenance Details

Built distribution (wheel)

Table of built distributions (wheels) for hcs-format 0.3.0
File Interpreter ABI Platform
hcs_format-0.3.0-py3-none-any.whl Python 3 none any Details

Total release size: 53.3 kB

Release files / hcs_format-0.3.0.tar.gz

Download URL hcs_format-0.3.0.tar.gz
Size 26.3 kB
Tags Source
SHA-256 checksum
How to use checksums
27646847b3bd26059d8297b239a4707ae6514c665c7b59b9a6ae06f8494e549d
BLAKE2b-256 checksum
How to use checksums
7548aafa6de857781fccd76edce9ac810dcac1d6bd256ad1b4c4a3ac33105ea1
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.16

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 Oct 23, 2026.

Transparency log

Release files / hcs_format-0.3.0-py3-none-any.whl

Download URL hcs_format-0.3.0-py3-none-any.whl
Size 27.0 kB
Tags Python 3
SHA-256 checksum
How to use checksums
d74b7f02d677fafb1532f1d20a71e1aa66a642134adcc473d3c7ea3d355a3512
BLAKE2b-256 checksum
How to use checksums
7daf6d08c4e662fd5d97f52b10cab0243762cf72dc993cc0c92131f2074a1080
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.16

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 Oct 23, 2026.

Transparency log

Security for hcs-format 0.3.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

All 2 files in this release have been uploaded with provenance metadata.

Select from 2 files

Attestation for hcs_format-0.3.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 Oct 23, 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.

Release history Release notifications | RSS feed

This release

0.3.0 This release

2 release files Full provenance

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