Skip to main content

Agent Passport Standard (APS) — Python SDK

Project description

APS Python SDK

Python SDK for the Agent Passport Standard v1.0.0.

Install

pip install aps

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)

Development Build

python -m pip install -e ".[dev]"
python -m pytest tests/ -v
python -m build

Publish Commands

python -m twine upload dist/*

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

agent_passport_standard-1.0.0.tar.gz (30.4 kB view details)

Uploaded Source

Built Distribution

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

agent_passport_standard-1.0.0-py3-none-any.whl (26.0 kB view details)

Uploaded Python 3

File details

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

File metadata

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

File hashes

Hashes for agent_passport_standard-1.0.0.tar.gz
Algorithm Hash digest
SHA256 f2a9413d11e4111284be8df912fda61fbd5213a5af63a0ddfc84e90eb37f8127
MD5 d2010de523b3bd26c2cb3f96ca9ac738
BLAKE2b-256 a0449f9cdd718ae11f1f6628e85a65ee0c4851645e7346398a60e507407157a4

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for agent_passport_standard-1.0.0-py3-none-any.whl
Algorithm Hash digest
SHA256 3986d01b9c6e0f10d42a72d5959f7ad8917ea55d2c584cefc81daf85e213c6a8
MD5 cc936d10cdab0fa1b05618b6f2bf80cd
BLAKE2b-256 2e42b8a994aec5f97ad9af045a0c6dd553faef53577d71187286c4e31e91116a

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