Skip to main content

Agent Passport Standard (APS) — Python SDK

Project description

APS Python SDK

Python SDK for the Agent Passport Standard v0.1.

Install

pip install -e ".[dev]"

Quick Start

from aps import AgentPassport, PassportConfig, Skill, Soul, Policies, Lineage, generate_key_pair

pub, priv = generate_key_pair()
from cryptography.hazmat.primitives.serialization import Encoding, PublicFormat
pub_hex = pub.public_bytes(Encoding.Raw, PublicFormat.Raw).hex()

passport = AgentPassport.new(PassportConfig(
    id="did:key:z6MkExample",
    public_key=pub_hex,
    owner_did="did:key:z6MkOwner",
    skills=[Skill("python", "1.0.0", "Python dev", ["code_write"], "0x" + "ab" * 32)],
    soul=Soul("focused", "tdd", [], "0x" + "cd" * 32),
    policies=Policies("0x" + "ef" * 32, ["can_bid"]),
    lineage=Lineage("original", [], 0),
))

passport.sign(priv)
assert passport.verify(pub)

Tests

python -m pytest tests/ -v

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

aps_sdk-1.0.0.tar.gz (25.1 kB view details)

Uploaded Source

Built Distribution

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

aps_sdk-1.0.0-py3-none-any.whl (20.9 kB view details)

Uploaded Python 3

File details

Details for the file aps_sdk-1.0.0.tar.gz.

File metadata

  • Download URL: aps_sdk-1.0.0.tar.gz
  • Upload date:
  • Size: 25.1 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.10.12

File hashes

Hashes for aps_sdk-1.0.0.tar.gz
Algorithm Hash digest
SHA256 98383315234a670807c67774a4025879ff4b76a35d350ea61e5e17fa430e49ca
MD5 b68b9a2420bfa7a0b2cc188bd0c85f46
BLAKE2b-256 092e0b05b1efdca1bb37f601885659e17b103dade3b3c226f54db79362e107a2

See more details on using hashes here.

File details

Details for the file aps_sdk-1.0.0-py3-none-any.whl.

File metadata

  • Download URL: aps_sdk-1.0.0-py3-none-any.whl
  • Upload date:
  • Size: 20.9 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.10.12

File hashes

Hashes for aps_sdk-1.0.0-py3-none-any.whl
Algorithm Hash digest
SHA256 dd4396922623a73fe64ab27d5606d2d9f0f12ae72f7a1f79c4bf232a2a65a634
MD5 4bd91ea06212db6959a6bf431809d68f
BLAKE2b-256 59f6d77125928d8f16b335c7ea29d6f061f374a0c3fba9066e76fe7f36b0f08c

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