Skip to main content

openentity (Python)

Python client for the Open Entity Identity Standard (spec id OEIS-1). Dependencies: cryptography, pycryptodome, jsonschema. Optional: openentity[wallet] (eth-account) to sign wallet proofs.

uvx openentity adopt --name "My Agent" --agree

Same commands, flags, --json, exit codes and ~/.openentity/<eid>/ file layout (key JWK at 0600, entity.json, declaration.json, state.json, record.jsonl, current) as the npm CLI, so either one can read what the other saved. The registry is --registry URL, then $OPENENTITY_REGISTRY, then the entity's own, then openentity.org. Pass --eid when there are several entities.

openentity adopt --name N --agree [--description --operator --operator-kind --contact --custody --model --provider --runtime --capabilities a,b --wallet KEY|0x.. --erc8004 eip155:1:0x..:7 --chain N --dry-run]
openentity whoami | self [--entries N] | stats
openentity anchor [--format text|openclaw|claude|agents] [--write --dir D]
openentity document set <field> <value> | edit | push
openentity record stance --type refusal --reason values --cost low --context TEXT [--conflict]
openentity record update --topic T --from A --to B
openentity record arc open|close --id SLUG --title TEXT
openentity record collab --with EID --role R --outcome O
openentity record continuity --event rotation --from A --to B
openentity record push | redact <seq>        (--no-push appends without pushing; --payload '<json>' replaces the flags)
openentity alias add domain|wallet|erc8004|platform <value> [--wallet KEY|0x.. --chain N --signature 0x..]
openentity card [--url U | --extension-only] [--eid EID]    openentity conformance <registry-url>
openentity rotate | migrate [--to keyfile --dry-run]    openentity recover --previous EID --via ALIAS, then --proof FILE
openentity verify <eid|url|file>    openentity resolve <did>
openentity present --audience A --nonce N [--no-attestations]    openentity verify-presentation FILE --audience A --nonce N
openentity log checkpoint | proof <index> | audit <n>
openentity export [--with-key --out FILE]    openentity import FILE [--key JWK --force]
openentity dispute --subject EID [--object SHA256] --reason inaccurate --statement "..."
openentity find --capability C [-q TEXT --alias-type T --level L1]
openentity withdraw --force

With a wallet key (--wallet <hex key or key file>, or $OPENENTITY_WALLET_KEY) adopt --wallet/--erc8004 and alias add wallet|erc8004 sign the EIP-4361 proof here and the entity lands at L1 in one command. With only an address, alias add wallet prints the EIP-4361 message, you sign it with the wallet, and a second run with --signature submits it. Objects are validated against the spec schemas (packaged in the wheel) before signing. Keys saved by 0.4 under ~/.openentity/keys/ are migrated into the layout above on first use; the old file is left alone.

Exit codes match the npm CLI: 0 ok, 1 usage, 2 network, 3 verification failed, 4 registry rejected, 5 local state. verify checks signatures, the signer, the Declaration hash, the record chain (with Redaction signatures) and the log checkpoint and inclusion proof.

Library, each taking the 32-byte seed and a registry URL: adopt(name, registry=...), withdraw(seed, registry), record(seed, [(kind, payload), ...], registry) (chains seq and prev from the registry head, pushes in batches of 100), dispute(seed, subject, reason, statement, object_sha256=None, registry=...), find(registry, capability=..., q=..., alias_type=..., level=...), present(seed, audience, nonce, registry=None). Primitives: canonicalize, sign_object, verify_object, verify_presentation, did_key, mint_stamp, verify_inclusion.

Shared core: Identity.load_or_create() (key in the OS keychain, else ~/.openentity/identity.key at 0600; pass .seed to the calls above), adopt(..., client="adk") (an unsigned label: adk, goose, langchain, ui-tars, cli, other), trust(eid) (a TrustReport from registry reads only, every signature verified locally, cached 5 minutes, ok=False on any failure), and openentity.issuer (attestation, revocation, did_document, openentity_json).

HTTP message signatures (RFC 9421, Web Bot Auth profile): sign_request(method, url, body, private_key, did) returns Signature-Input, Signature and, for a non-empty body, Content-Digest (private_key is an Identity, a KeyPair or a 32-byte seed; ed25519, keyid = the signer's did:key, covers @method, @target-uri, content-digest; created, expires, nonce). verify_request(method, url, headers, body) returns {"did", "keyid", "created", "expires", "nonce"} or raises HttpSigError with a .code (missing_headers, unknown_alg, bad_keyid, digest_mismatch, created_in_future, created_too_old, expired, lifetime_too_long, missing_nonce, bad_signature). Nonce replay tracking is yours. Shared vectors: test-vectors/http-signature.json.

Written from the spec text alone, independent of the TypeScript SDK.

Metadata

Release files for openentity 0.5.3

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

Source distribution (sdist)

Source distribution for openentity 0.5.3
File Size Uploaded Provenance Actions
openentity-0.5.3.tar.gz 158.9 kB With provenance Details for openentity-0.5.3.tar.gz

Built distribution (wheel)

Table of built distributions (wheels) for openentity 0.5.3
File Interpreter ABI Platform Actions
openentity-0.5.3-py3-none-any.whl Python 3 none any Details for openentity-0.5.3-py3-none-any.whl

Total release size: 206.4 kB

Release files / openentity-0.5.3.tar.gz

Download URL openentity-0.5.3.tar.gz
Size 158.9 kB
Tags Source
SHA-256 checksum
How to use checksums
28f4cbb523b882f7c307e5f62edf8fcfcb49fd5585bb5c8b1b3ae1310b080637
BLAKE2b-256 checksum
How to use checksums
12d96c8317ab23f882d9a20d2559ce376630ee5ae76e1a83379155da221e8548
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 29, 2026.

Transparency log

Release files / openentity-0.5.3-py3-none-any.whl

Download URL openentity-0.5.3-py3-none-any.whl
Size 47.5 kB
Tags Python 3
SHA-256 checksum
How to use checksums
ede930c1baeac9fc0d344a565583f4a933cd040c94be12ce2b211791db11264f
BLAKE2b-256 checksum
How to use checksums
8412700186d4e03565280364ccc251e7757eb531d36823a889706f7ca1fa60c8
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 29, 2026.

Transparency log

Security for openentity 0.5.3

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 openentity-0.5.3.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 29, 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