Skip to main content

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

PyPI version

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.15
  • six >= 1.10
  • certifi
  • python-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

rekord_io_sdk-1.0.2.tar.gz (40.4 kB view details)

Uploaded Source

Built Distribution

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

rekord_io_sdk-1.0.2-py3-none-any.whl (131.9 kB view details)

Uploaded Python 3

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

Hashes for rekord_io_sdk-1.0.2.tar.gz
Algorithm Hash digest
SHA256 7b13beacb56927368582bd0193f85082735b4dd293d8dfc8d3d261375b341e25
MD5 4291596f382c62b116befdfb8df7108b
BLAKE2b-256 bd057d6b281343135c997a60bcd4fde0c365306aeba377faf965a3241d49e627

See more details on using hashes here.

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

Hashes for rekord_io_sdk-1.0.2-py3-none-any.whl
Algorithm Hash digest
SHA256 8f3b32fbf3df85c341952b3aa800295f41e5ee6df856e198a703b0ae4b178697
MD5 a252500a809a49e70ffdd55aaee24db3
BLAKE2b-256 98634bd48c91d972bfaf239409ef0e2b46be381b2a0dab7ea5086e5bec7344dc

See more details on using hashes here.

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