Skip to main content

PressProtocol Python SDK (pressprotocol-py)

PyPI version Python versions License: MIT

Official Python SDK for PressProtocol — Autonomous, censorship-resistant publishing infrastructure, zero-custody cryptographic signing, and multi-transport content syndication across IPFS and Tor v3.


Features

  • 🔐 Zero-Custody Client Signing: Deterministic canonical payload serialization and Ed25519 verification.
  • Deterministic In-Memory CIDv1: Instant RFC 4648 base32 multihash calculation without an IPFS node.
  • 🌐 Multi-Transport Resolution: Automated discovery across IPFS public gateways and Tor .onion endpoints.
  • 🛡️ Zero External Dependency Core: Relies strictly on Python standard library with optional acceleration.

Installation

pip install pressprotocol-py

Or install with uv:

uv add pressprotocol-py

Quickstart

from pressprotocol import PressProtocol

# 1. Initialize client
client = PressProtocol(
    endpoint="https://pressprotocol.com"
)

# 2. Publish article directly to decentralized swarms
post = client.publish_raw(
    title="Data Science Transparency Audit",
    content="# Methodology & Findings\n\nVerifiable cryptographic dataset preserved across swarms.",
    tags=["science", "reproducibility", "whistleblower"]
)

print(f"✅ Published CID: {post['cid']}")
print(f"📦 IPFS Gateway: {post.get('urls', {}).get('ipfs')}")
print(f"🧅 Tor Mirror: {post.get('urls', {}).get('tor')}")

In-Memory Deterministic CIDv1

Compute standard base32 CIDv1 multihashes in-memory without contacting any daemon or gateway:

from pressprotocol.crypto import calculate_deterministic_cidv1

cid = calculate_deterministic_cidv1("Hello, Sovereign Cyberspace!")
print("Deterministic CIDv1:", cid) # bafk...

Resolving Content

# Resolve multi-transport mirror availability
article = client.resolve("bafkreibm7...")

print(f"Title: {article.get('title')}")
print(f"Tor Gateway: {article.get('torGatewayUrl')}")

License

MIT © 0xShikhar & PressProtocol Architects

Release files for pressprotocol-py 1.0.7

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for pressprotocol-py 1.0.7
File Size Uploaded
pressprotocol_py-1.0.7.tar.gz 4.6 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for pressprotocol-py 1.0.7
File Interpreter ABI Platform
pressprotocol_py-1.0.7-py3-none-any.whl Python 3 none any Details

Total release size: 9.9 kB

Release files / pressprotocol_py-1.0.7.tar.gz

Download URL pressprotocol_py-1.0.7.tar.gz
Size 4.6 kB
Tags Source
SHA-256 checksum
How to use checksums
0f6499cbc11677b91ad39f9723d3a01edee713952b80119759fecea7ee5ca6e3
BLAKE2b-256 checksum
How to use checksums
89d36d170c1915bad996864e1f100409629bd6360213ae1fdf8af0f2467b0a96
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via uv/0.11.7 {"installer":{"name":"uv","version":"0.11.7","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"macOS","version":null,"id":null,"libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":null}

Release files / pressprotocol_py-1.0.7-py3-none-any.whl

Download URL pressprotocol_py-1.0.7-py3-none-any.whl
Size 5.2 kB
Tags Python 3
SHA-256 checksum
How to use checksums
ea9f5110a5dfe49d3e75688d4c51411a9b496c836017de7394bc24d4c80c9849
BLAKE2b-256 checksum
How to use checksums
64d8e3bb0fae9ff9c7e622c1c87427c14faae6bce02ca0d05083b4b2f9c36995
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via uv/0.11.7 {"installer":{"name":"uv","version":"0.11.7","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"macOS","version":null,"id":null,"libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":null}

Release history Release notifications | RSS feed

This release

1.0.7 This release

2 release files

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page