Skip to main content

Independent, unofficial Python client for HeepX capabilities: discover, download, verify, and load.

Project description

heepx

CI PyPI Python versions License

An independent, unofficial Python client for loading HeepX capability repositories. Not affiliated with or governed by the HeepX organization's HXS-1 standard, and not itself a capability or infrastructure repository under that standard — for the actual capability ecosystem, its charter, and its governance, start at HeepX/workspace and HeepX/standard.

pip install heepx
import heepx

warrant = heepx.learn("warrant")
print(warrant.name, warrant.version)

What this is

A HeepX capability is a specification plus a deterministic evaluation suite, published as a git repository, pinned by consumers at a release tag (never a branch — see decisions/0005 in workspace). This client is how a Python program finds one, downloads it, checks that what it downloaded is intact, and loads it as a typed value — nothing more. It does not execute a capability, and it does not talk to any model provider; that is a different concern, layered on top of the Capability object this client hands back.

Whether loading a capability measurably helps is not yet established. The ecosystem's own honest status (workspace/CHARTER.md): one controlled benchmark, one small model, a placebo-controlled delta of +0.208 at p=0.125 (not significant), against a prompt-length cost significant at p=0.008. Read plainly: loading a capability document measurably costs something, and whether it measurably helps is unproven. This client makes that easier to test, not something already settled.

The public API

Six functions, and this is the whole surface:

import heepx

heepx.search("claim")  # -> list of matching capabilities
heepx.info("warrant")  # -> registry metadata, no download
warrant = heepx.learn("warrant")  # -> download (if needed) and load
heepx.list()  # -> names of capabilities installed locally
heepx.verify("warrant")  # -> integrity check against the local cache
heepx.update("warrant")  # -> fetch the newest version

learn

warrant = heepx.learn("warrant")
print(warrant.name)  # "warrant"
print(warrant.version)  # "1.2.1"
print(warrant.fingerprint)  # content hash of every file
print(warrant.dependencies)  # other capabilities this one composes with

A version already in the local cache is never re-downloaded. Pin an exact version, or work offline once something is cached:

heepx.learn("warrant", version="v1.1.0")  # exactly as info() reports it
heepx.learn("warrant", offline=True)  # never touches the network

search and info

for result in heepx.search("plan"):
    print(result.name, "-", result.description)

meta = heepx.info("warrant")
print(meta.latest_version, meta.versions)

list

Capabilities already downloaded, not the full registry:

heepx.list()  # ["warrant", "planning"]

verify

Recomputes the fingerprint of a cached capability's files and compares it to what was recorded when it was downloaded — the check that catches local corruption or tampering that a one-time download checksum cannot.

result = heepx.verify("warrant")
if not result.ok:
    print(result.reasons)

update

heepx.update("warrant")  # fetch and load the newest version

Errors

Every exception the client raises is a heepx.HeepXError:

try:
    heepx.learn("does-not-exist")
except heepx.CapabilityNotFoundError:
    ...
except heepx.OfflineError:
    ...
except heepx.HeepXError:
    ...  # catch-all

Beyond the six functions

The registry and cache are pluggable, for anyone who needs a private or offline mirror, or an isolated cache directory (tests, CI):

from heepx.registry import LocalRegistry
from heepx.cache import Cache

reg = LocalRegistry(index_path=Path("index.json"), archive_dir=Path("archives"))
cache = Cache(root=Path("/tmp/my-cache"))
heepx.learn("warrant", registry=reg, cache=cache)

Registry is an abstract base class — a future registry provider implements its four methods and every caller above keeps working unchanged.

Not in scope

This client does capability discovery, download, verification, and loading. It does not execute capabilities, and it does not integrate with any model provider (Anthropic, OpenAI, Ollama, or otherwise). Those are separate concerns for a layer above this one. It also does not speak for the HeepX organization — see workspace for that.

Development

pip install -e ".[dev]"
pre-commit install
ruff check .
mypy src
pytest

License

MIT — see LICENSE.

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

heepx-0.3.0.tar.gz (110.2 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

heepx-0.3.0-py3-none-any.whl (49.8 kB view details)

Uploaded Python 3

File details

Details for the file heepx-0.3.0.tar.gz.

File metadata

  • Download URL: heepx-0.3.0.tar.gz
  • Upload date:
  • Size: 110.2 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.14

File hashes

Hashes for heepx-0.3.0.tar.gz
Algorithm Hash digest
SHA256 ea9b70bf375b951282ec6fef21e386b040e635f083b5176f6fb6f2f40100ff0b
MD5 f92c187c3a3d051510c293817f0b81c8
BLAKE2b-256 328460186a7f52d74ccc73eed5a694770204e314e62869cef6a5726e7cca7083

See more details on using hashes here.

Provenance

The following attestation bundles were made for heepx-0.3.0.tar.gz:

Publisher: publish.yml on HeepX/heepx-sdk

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file heepx-0.3.0-py3-none-any.whl.

File metadata

  • Download URL: heepx-0.3.0-py3-none-any.whl
  • Upload date:
  • Size: 49.8 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.14

File hashes

Hashes for heepx-0.3.0-py3-none-any.whl
Algorithm Hash digest
SHA256 3735267501d81c91cc4e0d960b42c2665fefb4667125a5a4e6b6a5e6b64c9cac
MD5 f35a91a58d67355b6a09108f4278e093
BLAKE2b-256 3554b991f549e46362a6495b356fd8a8a310139da4f3ccf8dd6bb96c1a8b1ab5

See more details on using hashes here.

Provenance

The following attestation bundles were made for heepx-0.3.0-py3-none-any.whl:

Publisher: publish.yml on HeepX/heepx-sdk

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page