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
Metadata
Release files for rare-platform-sdk 0.2.0
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | Actions |
|---|---|---|---|---|
| rare_platform_sdk-0.2.0.tar.gz | 14.8 kB | With provenance | Details for rare_platform_sdk-0.2.0.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| rare_platform_sdk-0.2.0-py3-none-any.whl | Python 3 | none | any | Details for rare_platform_sdk-0.2.0-py3-none-any.whl |
Total release size: 27.2 kB
Release files / rare_platform_sdk-0.2.0.tar.gz
| Download URL | rare_platform_sdk-0.2.0.tar.gz |
|---|---|
| Size | 14.8 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
18e458c561eb4c0953ff2731e35529abdc5302cbf55b92e154b82d5acebe8fa7
|
|
BLAKE2b-256 checksum How to use checksums |
a73190a5e3ec1a8df01768d3ab142c4d3d278063af4a59bdae19c09b7cda0dfe
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/6.1.0 CPython/3.13.7
|
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Apr 7, 2026.
Transparency logRelease files / rare_platform_sdk-0.2.0-py3-none-any.whl
| Download URL | rare_platform_sdk-0.2.0-py3-none-any.whl |
|---|---|
| Size | 12.5 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
628a43d45cc92ec8fc702d7f3bc283dc39346c149f3f9bc4312e3e188aadca32
|
|
BLAKE2b-256 checksum How to use checksums |
b31d5706740b2ea67713390c6826cbe95ca67548347e19a29154244a840b79b7
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/6.1.0 CPython/3.13.7
|
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Apr 7, 2026.
Transparency logSecurity for rare-platform-sdk 0.2.0
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
Full provenance
All 2 files in this release have been uploaded with provenance metadata.
Attestation for rare_platform_sdk-0.2.0.tar.gz
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Apr 7, 2026.
Transparency logA note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.