Skip to main content

PortID Python SDK

Zero-knowledge encrypted data sync for Python applications.

Install

pip install harboria-portid

Quick Start

from portid_sdk import PortID, PortIDError

sdk = PortID(app_id="my-app", api_base_url="https://sync.portid.dev")

# Sign up
result = sdk.sign_up("alice", "strong_password_123")
print(f"Recovery key: {result['recovery_key']}")  # User must save this!

# Login
sdk.login("alice", "strong_password_123")

# Backup data (encrypted before leaving your machine)
sdk.backup_data({"notes": ["hello", "world"], "preferences": {"theme": "dark"}})

# Load data (downloaded + decrypted locally)
data = sdk.load_data()
print(data)  # {"notes": ["hello", "world"], ...}

# Restore on new device (only needs username + recovery key)
data = sdk.restore_data("alice", "your_64_char_hex_recovery_key")

Use with existing auth (Firebase, Clerk, etc.)

# You already have auth — just add encrypted sync
sdk = PortID(app_id="my-app", api_base_url="https://sync.portid.dev")
result = sdk.attach_to_existing_user(firebase_uid)
# Now sdk.backup_data() / sdk.load_data() work with encrypted IPFS storage

Cross-platform

Data encrypted with the Python SDK can be decrypted by the JS SDK and vice versa. Both use the same format: AES-256-GCM with base64(iv + ciphertext + tag).

Security

  • AES-256-GCM (authenticated encryption)
  • PBKDF2 with 250,000 iterations for password hashing
  • 256-bit recovery keys
  • Zero dependencies on deprecated crypto libraries

Metadata

Release files for harboria-portid 0.2.1

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

Source distribution (sdist)

Source distribution for harboria-portid 0.2.1
File Size Uploaded Provenance Actions
harboria_portid-0.2.1.tar.gz 5.8 kB With provenance Details for harboria_portid-0.2.1.tar.gz

Built distribution (wheel)

Table of built distributions (wheels) for harboria-portid 0.2.1
File Interpreter ABI Platform Actions
harboria_portid-0.2.1-py3-none-any.whl Python 3 none any Details for harboria_portid-0.2.1-py3-none-any.whl

Total release size: 11.6 kB

Release files / harboria_portid-0.2.1.tar.gz

Download URL harboria_portid-0.2.1.tar.gz
Size 5.8 kB
Tags Source
SHA-256 checksum
How to use checksums
cf958f25e99275578b84eed0ddccf76e52a08b5818675375cc7944a9001a9814
BLAKE2b-256 checksum
How to use checksums
d2844bceaa46ff72e2ffdf0f50d57156168ff8d78d071abcf08219be3f49c2c9
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/6.1.0 CPython/3.13.12

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on May 13, 2026.

Transparency log

Release files / harboria_portid-0.2.1-py3-none-any.whl

Download URL harboria_portid-0.2.1-py3-none-any.whl
Size 5.8 kB
Tags Python 3
SHA-256 checksum
How to use checksums
dbc8df485b5d851b379eb21bc032d268f084b0495825e9cc8331d1159b2bd149
BLAKE2b-256 checksum
How to use checksums
0a0640ed5fe9e11ae17a17725a6cee73ff0a8037d8a85cbb7c27c2fbc20ca724
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/6.1.0 CPython/3.13.12

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on May 13, 2026.

Transparency log

Security for harboria-portid 0.2.1

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

Full provenance

Both files in this release have been uploaded with provenance metadata.

Select from 2 files

Attestation for harboria_portid-0.2.1.tar.gz

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on May 13, 2026.

Transparency log

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

To learn more about protecting yourself from malicious actors, visit our package security documentation.

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