Rare platform integration kit for Python services
Project description
rare-platform-sdk
Python toolkit for platforms integrating Rare with adoption-first defaults.
Integration Modes
public-only / quickstart: start herefull-mode / production: add platform registration, durable stores, full attestation, and event ingest
Quickstart reduces first integration to:
- one required env:
PLATFORM_AUD - two auth endpoints
- one session dependency or helper
Quickstart
pip install rare-platform-sdk
from rare_platform_sdk import (
InMemoryChallengeStore,
InMemoryReplayStore,
InMemorySessionStore,
create_rare_platform_kit_from_env,
)
challenge_store = InMemoryChallengeStore()
replay_store = InMemoryReplayStore()
session_store = InMemorySessionStore()
kit = create_rare_platform_kit_from_env(
challenge_store=challenge_store,
replay_store=replay_store,
session_store=session_store,
)
Defaults:
RARE_BASE_URL=https://api.rareid.ccRARE_SIGNER_PUBLIC_KEY_B64auto-discovered from Rare JWKS when omittedPLATFORM_IDderived fromPLATFORM_AUDfor full-mode workflows
FastAPI
from fastapi import Depends, FastAPI
from rare_platform_sdk import (
create_fastapi_rare_router_from_env,
create_fastapi_session_dependency,
)
app = FastAPI()
app.include_router(
create_fastapi_rare_router_from_env(
challenge_store=challenge_store,
replay_store=replay_store,
session_store=session_store,
prefix="/rare",
)
)
require_rare_session = create_fastapi_session_dependency(session_store)
FastAPI is the preferred Python integration path.
Security Notes
Quickstart still enforces:
- challenge nonce one-time use
- delegation replay protection
- identity/delegation triad consistency
- local attestation verification
- public-mode governance cap to
L1
Production Notes
- Replace in-memory stores before production
- Move to full-mode only when platform registration or full attestation is required
- Keep bearer-token session transport supported even if you add cookie convenience helpers
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 rare_platform_sdk-0.2.0.tar.gz.
File metadata
- Download URL: rare_platform_sdk-0.2.0.tar.gz
- Upload date:
- Size: 14.8 kB
- Tags: Source
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.7
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
18e458c561eb4c0953ff2731e35529abdc5302cbf55b92e154b82d5acebe8fa7
|
|
| MD5 |
2d6611405caaab28536eb758049844ef
|
|
| BLAKE2b-256 |
a73190a5e3ec1a8df01768d3ab142c4d3d278063af4a59bdae19c09b7cda0dfe
|
Provenance
The following attestation bundles were made for rare_platform_sdk-0.2.0.tar.gz:
Publisher:
publish-python-packages.yml on Rare-ID/Rare
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
rare_platform_sdk-0.2.0.tar.gz -
Subject digest:
18e458c561eb4c0953ff2731e35529abdc5302cbf55b92e154b82d5acebe8fa7 - Sigstore transparency entry: 1247141924
- Sigstore integration time:
-
Permalink:
Rare-ID/Rare@abcffdb752f7645f98aee2476eaed7bc32ccb70b -
Branch / Tag:
refs/heads/main - Owner: https://github.com/Rare-ID
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
publish-python-packages.yml@abcffdb752f7645f98aee2476eaed7bc32ccb70b -
Trigger Event:
push
-
Statement type:
File details
Details for the file rare_platform_sdk-0.2.0-py3-none-any.whl.
File metadata
- Download URL: rare_platform_sdk-0.2.0-py3-none-any.whl
- Upload date:
- Size: 12.5 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.7
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
628a43d45cc92ec8fc702d7f3bc283dc39346c149f3f9bc4312e3e188aadca32
|
|
| MD5 |
b9267bad9a6df285414428c0ce9e2d47
|
|
| BLAKE2b-256 |
b31d5706740b2ea67713390c6826cbe95ca67548347e19a29154244a840b79b7
|
Provenance
The following attestation bundles were made for rare_platform_sdk-0.2.0-py3-none-any.whl:
Publisher:
publish-python-packages.yml on Rare-ID/Rare
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
rare_platform_sdk-0.2.0-py3-none-any.whl -
Subject digest:
628a43d45cc92ec8fc702d7f3bc283dc39346c149f3f9bc4312e3e188aadca32 - Sigstore transparency entry: 1247141933
- Sigstore integration time:
-
Permalink:
Rare-ID/Rare@abcffdb752f7645f98aee2476eaed7bc32ccb70b -
Branch / Tag:
refs/heads/main - Owner: https://github.com/Rare-ID
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
publish-python-packages.yml@abcffdb752f7645f98aee2476eaed7bc32ccb70b -
Trigger Event:
push
-
Statement type: