Skip to main content

EEP discovery utilities — manifest validation, Link header parsing, DNS TXT record parsing

Project description

eep-discovery — Python

EEP discovery utilities — Python port of @eep-dev/discovery.

EEP License

Overview

Python implementation of the three EEP discovery mechanisms (Whitepaper §4):

Function Description
validate_manifest() Validate /.well-known/eep.json manifests
parse_link_header() Parse HTTP Link: <url>; rel="eep" headers
parse_dns_txt_record() Parse _eep.domain TXT "v=eep1; manifest=..." records

Installation

pip install -e packages/eep-discovery-python

Usage

from eep_discovery import validate_manifest, parse_link_header, parse_dns_txt_record

# Validate manifest
result = validate_manifest({
    "did": "did:web:example.com",
    "eep_version": "0.1",
    "layers": {"layer1": "https://api.example.com/eep"},
    "supported_content_types": ["application/json"],
    "pqc_ready": False,
    "x402_enabled": True,
})
assert result.valid

# Parse Link header
links = parse_link_header('<https://example.com/eep.json>; rel="eep"')
# [EEPLinkInfo(url='https://...', rel='eep')]

# Parse DNS TXT record
dns = parse_dns_txt_record("v=eep1; manifest=https://example.com/.well-known/eep.json")
assert dns.manifest_url == "https://example.com/.well-known/eep.json"

Tests

python3 -m pytest tests/ -v

Comprehensive tests cover manifest validation, Link header parsing, and DNS TXT parsing.

License

Apache-2.0

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

eep_discovery-0.1.0.tar.gz (9.1 kB view details)

Uploaded Source

Built Distribution

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

eep_discovery-0.1.0-py3-none-any.whl (8.6 kB view details)

Uploaded Python 3

File details

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

File metadata

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

File hashes

Hashes for eep_discovery-0.1.0.tar.gz
Algorithm Hash digest
SHA256 c919f7898dc6d5901781a4141c035af06411cb416bca039059bac88ded963421
MD5 dbbfc7e3e890cac9519bdee7cfc3295b
BLAKE2b-256 868fbb787fb9b2aaf11a75f6bfc24a792aae3c5494df8dd6976456b6ef048ef2

See more details on using hashes here.

File details

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

File metadata

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

File hashes

Hashes for eep_discovery-0.1.0-py3-none-any.whl
Algorithm Hash digest
SHA256 ce58030385ef550f880682f7ef6e44a9ec320d1b5e6fa9251f4d046950b187d8
MD5 dd8aef4e4d989cbf5d107185d0898a5e
BLAKE2b-256 baa503aaa6c0fdcbec632de3f8caae02c4724715875b9f1b54181e8e03f1766c

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