Skip to main content
Pre-release

This release is a pre-release and may not be stable for production use.

SCP Python SDK

scp-python -- Shared Context Protocol for Python

Cryptographic identity, encrypted contexts, capability-based auth, and outlet invocation for AI agents. Built on Rust via PyO3.

Install

pip install scp-python

Quick Start

import asyncio
from scp_sdk import Identity, Context

async def main():
    # Create a cryptographic identity (DID)
    identity = await Identity.create(custody="platform")
    print(f"DID: {identity.did}")

    # Create an encrypted context
    ctx = await Context.create(
        identity=identity,
        params={"ceiling": ["msg:send", "msg:receive"], "ttl": 3600},
    )

    # Send a message (MLS-encrypted, signed, provenance-tagged)
    await ctx.send(b"Hello from SCP")

    # Receive messages
    async for msg in ctx.receive():
        print(f"{msg.sender_did}: {msg.content}")
        break

    await ctx.close()

asyncio.run(main())

Requirements

  • Python >= 3.12
  • Rust toolchain (build only -- wheels are pre-built for Linux, macOS, Windows)

API Reference

Generated from source via pydoc. Build locally:

cd bindings/python
python -m pydoc scp_sdk

Published API docs are generated on every release by CI.

Type Checking

PEP 561 compliant. The package ships py.typed marker and _scp_core.pyi stubs for full IDE autocompletion and mypy/pyright support.

mypy your_code.py  # type stubs resolve automatically

Examples

See examples/ for runnable scripts:

File Description
basic_messaging.py Create identity, context, send/receive messages
outlet_invocation.py Register and invoke a outlet with test vectors
mcp_integration.py Expose SCP outlets via MCP JSON-RPC server
multi_agent.py Coordinate multiple agents in a shared context

Error Handling

All errors inherit from ScpError with a machine-readable code field:

from scp_sdk import ScpError, ContextError

try:
    await ctx.send(b"data")
except ContextError as e:
    print(f"[{e.code}] {e}")

Source

  • Scaffold: .docs/scaffold/python.md
  • Standards: .docs/standards/python.md
  • API sketch: .docs/sketch.md

Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

scp_python-0.1.0b3.tar.gz (5.0 MB view details)

Uploaded Source

Built Distributions

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

scp_python-0.1.0b3-cp312-cp312-win_amd64.whl (23.3 MB view details)

Uploaded CPython 3.12Windows x86-64

scp_python-0.1.0b3-cp312-cp312-manylinux_2_28_x86_64.whl (26.2 MB view details)

Uploaded CPython 3.12manylinux: glibc 2.28+ x86-64

scp_python-0.1.0b3-cp312-cp312-manylinux_2_28_aarch64.whl (27.2 MB view details)

Uploaded CPython 3.12manylinux: glibc 2.28+ ARM64

scp_python-0.1.0b3-cp312-cp312-macosx_11_0_arm64.whl (24.5 MB view details)

Uploaded CPython 3.12macOS 11.0+ ARM64

scp_python-0.1.0b3-cp312-cp312-macosx_10_12_x86_64.whl (25.1 MB view details)

Uploaded CPython 3.12macOS 10.12+ x86-64

File details

Details for the file scp_python-0.1.0b3.tar.gz.

File metadata

  • Download URL: scp_python-0.1.0b3.tar.gz
  • Upload date:
  • Size: 5.0 MB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.12

File hashes

Hashes for scp_python-0.1.0b3.tar.gz
Algorithm Hash digest
SHA256 74a20eb556330a49449c5d6a42c2bd71dcbf91a4dd90ef0479deacb42a53b291
MD5 1b85a75b36fdfe38af700f05398af2e5
BLAKE2b-256 5458ec53be28b5b477aab5c6307d110f6572653973a502bf8b0400dab161e653

See more details on using hashes here.

Provenance

The following attestation bundles were made for scp_python-0.1.0b3.tar.gz:

Publisher: release.yml on limn-works/scp

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file scp_python-0.1.0b3-cp312-cp312-win_amd64.whl.

File metadata

File hashes

Hashes for scp_python-0.1.0b3-cp312-cp312-win_amd64.whl
Algorithm Hash digest
SHA256 5722880dacdefac731494df6804b21c7fa00c9e35f588d65e90bdb98986d44dc
MD5 bbe1b4985a126846d243877aaaeca339
BLAKE2b-256 13b5184fe2cc57603d1f6be550b9ef3d6cadce8c910c95f45f4285de44e81a9e

See more details on using hashes here.

Provenance

The following attestation bundles were made for scp_python-0.1.0b3-cp312-cp312-win_amd64.whl:

Publisher: release.yml on limn-works/scp

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file scp_python-0.1.0b3-cp312-cp312-manylinux_2_28_x86_64.whl.

File metadata

File hashes

Hashes for scp_python-0.1.0b3-cp312-cp312-manylinux_2_28_x86_64.whl
Algorithm Hash digest
SHA256 090dc3768a3ea844bd39775116339456a98be4ab47345d35071f9ef0e7a5dcc7
MD5 e4d1be6df933f8dd6e50fa39014e0f7f
BLAKE2b-256 37b87efe87723221d431cd19dcc75006dba360048dd869a55d779573970db1e1

See more details on using hashes here.

Provenance

The following attestation bundles were made for scp_python-0.1.0b3-cp312-cp312-manylinux_2_28_x86_64.whl:

Publisher: release.yml on limn-works/scp

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file scp_python-0.1.0b3-cp312-cp312-manylinux_2_28_aarch64.whl.

File metadata

File hashes

Hashes for scp_python-0.1.0b3-cp312-cp312-manylinux_2_28_aarch64.whl
Algorithm Hash digest
SHA256 babbe10e8729ff54814f308d230b3cdd112e04cbd2e6416b52059912aab2e1e4
MD5 93fda1564327ef4d0e9fd0f6800abd26
BLAKE2b-256 ce6e9b0800cac522045f678a8c54ee96c9bea5b17105215f9a5e6fd4492b54f3

See more details on using hashes here.

Provenance

The following attestation bundles were made for scp_python-0.1.0b3-cp312-cp312-manylinux_2_28_aarch64.whl:

Publisher: release.yml on limn-works/scp

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file scp_python-0.1.0b3-cp312-cp312-macosx_11_0_arm64.whl.

File metadata

File hashes

Hashes for scp_python-0.1.0b3-cp312-cp312-macosx_11_0_arm64.whl
Algorithm Hash digest
SHA256 c6e08f0581c0b674af5f7fb23e4433674762e62b097850069e1295b060bf63e6
MD5 7c7bffbca1ef87be60b9761ead3935a6
BLAKE2b-256 f6a342fe31087b0279773e18f45e4f2c018e91de7d2b8e117751706d236e8345

See more details on using hashes here.

Provenance

The following attestation bundles were made for scp_python-0.1.0b3-cp312-cp312-macosx_11_0_arm64.whl:

Publisher: release.yml on limn-works/scp

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file scp_python-0.1.0b3-cp312-cp312-macosx_10_12_x86_64.whl.

File metadata

File hashes

Hashes for scp_python-0.1.0b3-cp312-cp312-macosx_10_12_x86_64.whl
Algorithm Hash digest
SHA256 e21bf084eb8a56e561821b808d1ad22ba9d547bab8141190784995cc2a70d897
MD5 4f402bb9456811c39bd1c06eb652c2a8
BLAKE2b-256 467e4351bb7fc47aaa8b8a93d5c4e7b3f71df56e25145cded92f24a1b2c0985d

See more details on using hashes here.

Provenance

The following attestation bundles were made for scp_python-0.1.0b3-cp312-cp312-macosx_10_12_x86_64.whl:

Publisher: release.yml on limn-works/scp

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

Release history Release notifications | RSS feed

This release

0.1.0b3 This release

6 files

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page