Skip to main content

Python ctypes SDK for the PP2P Rust core

Project description

Python SDK

This package is a ctypes bridge over the PP2P Rust C ABI.

Install

pip install pp2p_core

Runtime requirements

  • Python 3.9+
  • Supported bundled-native targets:
    • Windows x64
    • Linux x64
    • macOS Intel (x64)
    • macOS Apple Silicon (arm64)

For unsupported targets, set PP2P_CORE_LIB to a compatible native library path.

Example

from pp2p_core import Pp2pCore

core = Pp2pCore()
alice = core.generate_identity()
bob = core.generate_identity()

env = core.sign_envelope(
    private_key_b64=alice["private_key_b64"],
    sender_peer_id=alice["peer_id"],
    recipient_peer_id=bob["peer_id"],
    payload={"type": "hello", "text": "hi"},
    nonce="n1",
)
core.verify_envelope(env, signer_public_key_b64=alice["public_key_b64"])
print("ok")

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

pp2p_core-0.2.2.tar.gz (1.5 MB view details)

Uploaded Source

Built Distribution

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

pp2p_core-0.2.2-py3-none-any.whl (1.5 MB view details)

Uploaded Python 3

File details

Details for the file pp2p_core-0.2.2.tar.gz.

File metadata

  • Download URL: pp2p_core-0.2.2.tar.gz
  • Upload date:
  • Size: 1.5 MB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.12.13

File hashes

Hashes for pp2p_core-0.2.2.tar.gz
Algorithm Hash digest
SHA256 414705e58bce509169bb803363e6c6ff12b4a5dfc2cfa584cb0a966c62277ca7
MD5 71c63ed602871492556851384563da49
BLAKE2b-256 7bbacdae2f520103057cd3e37807539ccc7bf738b1d10bb83fda15f34c4e8dca

See more details on using hashes here.

File details

Details for the file pp2p_core-0.2.2-py3-none-any.whl.

File metadata

  • Download URL: pp2p_core-0.2.2-py3-none-any.whl
  • Upload date:
  • Size: 1.5 MB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.12.13

File hashes

Hashes for pp2p_core-0.2.2-py3-none-any.whl
Algorithm Hash digest
SHA256 8b7486fe97781c25cce8dead361bf5bb0f4d1d967908126dd35485871cdaecef
MD5 88f29cb0042aef6864dcf9a885f29d25
BLAKE2b-256 5acef6ffd05d3b21a37998a3f9f706298f9a63179a494e106bef9b668af05363

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