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.1.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.1-py3-none-any.whl (1.5 MB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: pp2p_core-0.2.1.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.1.tar.gz
Algorithm Hash digest
SHA256 74d460acb87c33b716398950872f557f8c4ee77896123c4e86a03a93f4d8111a
MD5 7aeba16665c302371cc419444516b22f
BLAKE2b-256 312eef12d2fe49374e15e23b7318f70b38d77f74134a1981c70b2e46d44fce82

See more details on using hashes here.

File details

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

File metadata

  • Download URL: pp2p_core-0.2.1-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.1-py3-none-any.whl
Algorithm Hash digest
SHA256 db521f65b6e3b043e00ac2236ddf241e9c7c5035bc4b0f51863aa9b459b11964
MD5 ab022b94dc970396d8193e4bedd0a7b6
BLAKE2b-256 9382cfb82d144204969d55624c3ce298f8bf4a41953935dd3e458e4fdf21f4e4

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