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
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
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
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
cf958f25e99275578b84eed0ddccf76e52a08b5818675375cc7944a9001a9814
|
|
| MD5 |
85aba9aa1b9260effe242f895a6c6871
|
|
| BLAKE2b-256 |
d2844bceaa46ff72e2ffdf0f50d57156168ff8d78d071abcf08219be3f49c2c9
|
Provenance
The following attestation bundles were made for harboria_portid-0.2.1.tar.gz:
Publisher:
publish.yml on Harboria-Labs/PortID
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
harboria_portid-0.2.1.tar.gz -
Subject digest:
cf958f25e99275578b84eed0ddccf76e52a08b5818675375cc7944a9001a9814 - Sigstore transparency entry: 1523262819
- Sigstore integration time:
-
Permalink:
Harboria-Labs/PortID@fc44f0e90d4af8a8b9da20c999794318929f1c66 -
Branch / Tag:
refs/tags/v0.2.1 - Owner: https://github.com/Harboria-Labs
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
publish.yml@fc44f0e90d4af8a8b9da20c999794318929f1c66 -
Trigger Event:
push
-
Statement type:
File details
Details for the file harboria_portid-0.2.1-py3-none-any.whl.
File metadata
- Download URL: harboria_portid-0.2.1-py3-none-any.whl
- Upload date:
- Size: 5.8 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.12
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
dbc8df485b5d851b379eb21bc032d268f084b0495825e9cc8331d1159b2bd149
|
|
| MD5 |
93f08ca821614508df220ee38e676874
|
|
| BLAKE2b-256 |
0a0640ed5fe9e11ae17a17725a6cee73ff0a8037d8a85cbb7c27c2fbc20ca724
|
Provenance
The following attestation bundles were made for harboria_portid-0.2.1-py3-none-any.whl:
Publisher:
publish.yml on Harboria-Labs/PortID
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
harboria_portid-0.2.1-py3-none-any.whl -
Subject digest:
dbc8df485b5d851b379eb21bc032d268f084b0495825e9cc8331d1159b2bd149 - Sigstore transparency entry: 1523262825
- Sigstore integration time:
-
Permalink:
Harboria-Labs/PortID@fc44f0e90d4af8a8b9da20c999794318929f1c66 -
Branch / Tag:
refs/tags/v0.2.1 - Owner: https://github.com/Harboria-Labs
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
publish.yml@fc44f0e90d4af8a8b9da20c999794318929f1c66 -
Trigger Event:
push
-
Statement type: