Rekord.io Python SDK
This project has been archived.
The maintainers of this project have marked this project as archived. No new releases are expected.
Project description
Rekord.io Python SDK
Official Python SDK for Rekord.io.
Rekord.io provides a trust layer for verifiable data, anchoring data on-chain to create immutable, audit-ready records for regulatory compliance and data integrity.
Installation
Install via pip:
pip install rekord-io-sdk
Configuration
The SDK uses rekord_sdk.Configuration to manage API credentials and endpoints.
Authentication
Rekord.io uses Auth0 OAuth2 Client Credentials Flow. You will need:
- Client ID
- Client Secret
- Auth0 Domain
- Audience
Usage Example
Here is a basic example of how to initialize the client and authenticate.
import os
import rekord_sdk
from rekord_sdk.rest import ApiException
# 1. Configure
configuration = rekord_sdk.Configuration()
configuration.host = "https://api-v2-dev.rekord.io"
# 2. Authenticate (You need to handle OAuth2 token retrieval separately)
# This SDK expects a Bearer token in the configuration
# See full integration example below for Auth0 handling
# Example: setting a token (you would get this from Auth0)
access_token = "YOUR_ACCESS_TOKEN"
# Override auth settings to inject the token
original_auth_settings = configuration.auth_settings
def auth_settings_with_token():
settings = original_auth_settings()
settings["bearerAuth"] = {
"type": "bearer",
"in": "header",
"key": "Authorization",
"value": f"Bearer {access_token}",
}
return settings
configuration.auth_settings = auth_settings_with_token
# 3. Create API Client
api_client = rekord_sdk.ApiClient(configuration)
passport_api = rekord_sdk.PassportApi(api_client)
# 4. Create a Passport
try:
artifact = {
"json": {"event": "market_data", "price": 50000},
"filename": "btc_price_20240101.json",
"mimeType": "application/json"
}
body = {
"passport_label": "my-daily-passport-20240101",
"artifacts": [artifact]
}
response = passport_api.passport_create_post(body=body)
print("Passport Created:", response)
except ApiException as e:
print(f"Exception when calling PassportApi->passport_create_post: {e}")
Features
- Passports: Create and manage daily data containers.
- Artifacts: Append immutable data files to passports.
- Verification: Verify data integrity against blockchain anchors.
Requirements
- Python 3.4+
urllib3>= 1.15six>= 1.10certifipython-dateutil
License
MIT
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
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 rekord_io_sdk-1.0.2.tar.gz.
File metadata
- Download URL: rekord_io_sdk-1.0.2.tar.gz
- Upload date:
- Size: 40.4 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.13.5
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
7b13beacb56927368582bd0193f85082735b4dd293d8dfc8d3d261375b341e25
|
|
| MD5 |
4291596f382c62b116befdfb8df7108b
|
|
| BLAKE2b-256 |
bd057d6b281343135c997a60bcd4fde0c365306aeba377faf965a3241d49e627
|
File details
Details for the file rekord_io_sdk-1.0.2-py3-none-any.whl.
File metadata
- Download URL: rekord_io_sdk-1.0.2-py3-none-any.whl
- Upload date:
- Size: 131.9 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.13.5
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
8f3b32fbf3df85c341952b3aa800295f41e5ee6df856e198a703b0ae4b178697
|
|
| MD5 |
a252500a809a49e70ffdd55aaee24db3
|
|
| BLAKE2b-256 |
98634bd48c91d972bfaf239409ef0e2b46be381b2a0dab7ea5086e5bec7344dc
|