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

Uploaded Python 3

File details

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

File metadata

  • Download URL: harboria_portid-0.2.1.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.1.tar.gz
Algorithm Hash digest
SHA256 cf958f25e99275578b84eed0ddccf76e52a08b5818675375cc7944a9001a9814
MD5 85aba9aa1b9260effe242f895a6c6871
BLAKE2b-256 d2844bceaa46ff72e2ffdf0f50d57156168ff8d78d071abcf08219be3f49c2c9

See more details on using hashes here.

Provenance

The following attestation bundles were made for harboria_portid-0.2.1.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.1-py3-none-any.whl.

File metadata

File hashes

Hashes for harboria_portid-0.2.1-py3-none-any.whl
Algorithm Hash digest
SHA256 dbc8df485b5d851b379eb21bc032d268f084b0495825e9cc8331d1159b2bd149
MD5 93f08ca821614508df220ee38e676874
BLAKE2b-256 0a0640ed5fe9e11ae17a17725a6cee73ff0a8037d8a85cbb7c27c2fbc20ca724

See more details on using hashes here.

Provenance

The following attestation bundles were made for harboria_portid-0.2.1-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