Skip to main content

Python SDK for the AEO Protocol v0.1 — parse, build, validate, and fetch AEO declaration documents.

Project description

aeo-sdk-python

Python SDK for the AEO Protocol v0.1 — parse, build, validate, and fetch AEO declaration documents.

Install

pip install aeo-protocol

Quickstart

from aeo import Document, fetch_well_known

# Fetch and parse from a live well-known URL
doc = fetch_well_known("https://mizcausevic-dev.github.io")
print(doc.entity.name)              # "Miz Causevic"
print(doc.claim_ids())               # ['current-role', 'location', ...]
print(doc.find_claim("years-experience").value)  # 30

# Parse from disk
doc = Document.from_file("aeo.json")

# Build programmatically
from aeo import Entity, Authority, Claim, Document
doc = Document(
    entity=Entity(
        id="https://example.com/#org",
        type="Organization",
        name="Example Org",
        canonical_url="https://example.com/",
    ),
    authority=Authority(primary_sources=["https://example.com/"]),
    claims=[Claim(id="tagline", predicate="description", value="A reference example.")],
)
print(doc.to_json())

Async variant:

import asyncio
from aeo.client import fetch_well_known_async

doc = asyncio.run(fetch_well_known_async("https://mizcausevic-dev.github.io"))

What it does

  • ParseDocument.from_json / from_file / from_dict
  • Build — pydantic v2 model classes for every type in the spec (Entity, Authority, Claim, Verification, CitationPreferences, AnswerConstraints, Audit)
  • SerializeDocument.to_json() returns canonical JSON
  • Fetchfetch_well_known(origin) performs HTTP discovery against /.well-known/aeo.json with Accept: application/aeo+json, application/json
  • Querydoc.claim_ids() and doc.find_claim(id) for convenience

Conformance

This SDK supports the AEO Protocol at conformance Level 1 (Declare). Signature verification (Level 2) and audit-endpoint posting (Level 3) are not yet implemented; signed documents parse fine but the signature is not verified.

Dependencies

  • pydantic >= 2.0 — model validation and serialization
  • httpx >= 0.27 — sync and async HTTP

Development

pip install -e .[dev]
pytest -v

Specification

Full spec at github.com/mizcausevic-dev/aeo-protocol-spec.

License

AGPL-3.0.

Kinetic Gain Protocol Suite

Spec Implementation
AEO Protocol aeo-sdk-python (this) · aeo-sdk-typescript · aeo-sdk-rust · aeo-sdk-go · aeo-cli · aeo-crawler
Prompt Provenance
Agent Cards
AI Evidence Format
MCP Tool Cards

Connect: LinkedIn · Kinetic Gain · Medium · Skills

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

aeo_protocol-0.1.0.tar.gz (18.0 kB view details)

Uploaded Source

Built Distribution

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

aeo_protocol-0.1.0-py3-none-any.whl (17.2 kB view details)

Uploaded Python 3

File details

Details for the file aeo_protocol-0.1.0.tar.gz.

File metadata

  • Download URL: aeo_protocol-0.1.0.tar.gz
  • Upload date:
  • Size: 18.0 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.14.0

File hashes

Hashes for aeo_protocol-0.1.0.tar.gz
Algorithm Hash digest
SHA256 9003ec3cfbb5f53d2ebdb63ca4bcd6c4d2e4e952277724b8c1f528ae3a247af4
MD5 777149cc93dde2501e267fc64a80761f
BLAKE2b-256 7b9ea3766817305e1db8349c26d630a38ea4f81834aaff2542fdbc35ad18c480

See more details on using hashes here.

File details

Details for the file aeo_protocol-0.1.0-py3-none-any.whl.

File metadata

  • Download URL: aeo_protocol-0.1.0-py3-none-any.whl
  • Upload date:
  • Size: 17.2 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.14.0

File hashes

Hashes for aeo_protocol-0.1.0-py3-none-any.whl
Algorithm Hash digest
SHA256 448aaa662b48d4d02930b3ee62a6f0438eb1a4ea3c3b2849cd662afc96218112
MD5 df7acc98e138b42b2071178649386d75
BLAKE2b-256 09acdeaca9e78ee0afeab7cbc7adea1dcda2f0cae363ad9d53f21c77b4e9ffb3

See more details on using hashes here.

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