Skip to main content

PortID Python SDK — Zero-knowledge encrypted data sync for AI and app developers.

Project description

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

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

harboria_portid-0.2.0.tar.gz (5.8 kB view details)

Uploaded Source

Built Distribution

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

harboria_portid-0.2.0-py3-none-any.whl (5.8 kB view details)

Uploaded Python 3

File details

Details for the file harboria_portid-0.2.0.tar.gz.

File metadata

  • Download URL: harboria_portid-0.2.0.tar.gz
  • Upload date:
  • Size: 5.8 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.12

File hashes

Hashes for harboria_portid-0.2.0.tar.gz
Algorithm Hash digest
SHA256 3ed6200eaeeb6964f184110556098f9804d79be87c2a42cbeb058ce3459d1841
MD5 ec8d761b0bc5d9739a5f6e001d4cc8ec
BLAKE2b-256 8fd34a4c08751d6d63b8efaa8117fc61d24bf7415c7e436c388afd6048e3b451

See more details on using hashes here.

Provenance

The following attestation bundles were made for harboria_portid-0.2.0.tar.gz:

Publisher: publish.yml on Harboria-Labs/PortID

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

File details

Details for the file harboria_portid-0.2.0-py3-none-any.whl.

File metadata

File hashes

Hashes for harboria_portid-0.2.0-py3-none-any.whl
Algorithm Hash digest
SHA256 62ad0ee693b5bd5d8ecff716491de3aa5b2e866c407c44cd53997ed723d0966b
MD5 b38f3dcb4ab12c75750bd6fec128fdbe
BLAKE2b-256 63973bc1d8c1dabace271b7ed0a7536d6f1bbb211bf72fd275724887166461fb

See more details on using hashes here.

Provenance

The following attestation bundles were made for harboria_portid-0.2.0-py3-none-any.whl:

Publisher: publish.yml on Harboria-Labs/PortID

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

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