Rare platform integration kit for Python services
Project description
rare-platform-sdk
Python toolkit for third-party platforms integrating Rare with local verification-first defaults.
What It Is
rare-platform-sdk helps Python services issue Rare auth challenges, complete login, verify delegated signed actions, manage platform sessions, and optionally ingest signed negative-event signals back into Rare.
Who It Is For
- Python and FastAPI platforms adding Rare login
- Backend teams that want local identity/delegation verification
- Integrators that need Redis-backed replay protection and session storage
Quick Start
pip install rare-platform-sdk
from rare_platform_sdk import (
InMemoryChallengeStore,
InMemoryReplayStore,
InMemorySessionStore,
RareApiClient,
RarePlatformKitConfig,
create_rare_platform_kit,
)
rare = RareApiClient(rare_base_url="https://api.rareid.cc")
kit = create_rare_platform_kit(
RarePlatformKitConfig(
aud="platform",
rare_api_client=rare,
challenge_store=InMemoryChallengeStore(),
replay_store=InMemoryReplayStore(),
session_store=InMemorySessionStore(),
)
)
FastAPI integration:
from fastapi import FastAPI
from rare_platform_sdk import create_fastapi_rare_router
app = FastAPI()
app.include_router(create_fastapi_rare_router(kit, prefix="/rare"))
Production Notes
- Challenge nonces must be one-time use.
- Delegation replay protection must be atomic.
- Full identity mode requires
payload.aud == expected_aud. - Identity triad must match:
auth_complete.agent_id == delegation.agent_id == attestation.sub - Public identity mode is capped to
L1effective governance.
Development
pip install -r requirements-test.lock
pip install -e .[test] --no-deps
pytest -q
python -m build
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.1.1.tar.gz.
File metadata
- Download URL: rare_platform_sdk-0.1.1.tar.gz
- Upload date:
- Size: 12.7 kB
- Tags: Source
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.7
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
ddb8cef32756d7fe0fe90cca3e0b60a536e94fb3c7522c1ad002ed3afc8b586d
|
|
| MD5 |
ebab7f455695f6ce9820b3dbddf2ce22
|
|
| BLAKE2b-256 |
435ec70288178607cdfe2895fc12665eef6f6d44b8f5e88a659d5410e547a2a4
|
Provenance
The following attestation bundles were made for rare_platform_sdk-0.1.1.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.1.1.tar.gz -
Subject digest:
ddb8cef32756d7fe0fe90cca3e0b60a536e94fb3c7522c1ad002ed3afc8b586d - Sigstore transparency entry: 1191406547
- Sigstore integration time:
-
Permalink:
Rare-ID/Rare@d26300c6740bf0110105cfe54c447fae5daad3da -
Branch / Tag:
refs/heads/release-0.2.0 - 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@d26300c6740bf0110105cfe54c447fae5daad3da -
Trigger Event:
workflow_dispatch
-
Statement type:
File details
Details for the file rare_platform_sdk-0.1.1-py3-none-any.whl.
File metadata
- Download URL: rare_platform_sdk-0.1.1-py3-none-any.whl
- Upload date:
- Size: 10.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 |
83f8ad3ef90af1e8d3dbf0fd89e433acef688928cd093f9a96fadb4c4af31f63
|
|
| MD5 |
7aa3bfbec83c725876cbe2fbb5b41b59
|
|
| BLAKE2b-256 |
7e8b8da71d9e3504c6384b922dea73b564d2041b1b318d8c455796a19fb7f6c7
|
Provenance
The following attestation bundles were made for rare_platform_sdk-0.1.1-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.1.1-py3-none-any.whl -
Subject digest:
83f8ad3ef90af1e8d3dbf0fd89e433acef688928cd093f9a96fadb4c4af31f63 - Sigstore transparency entry: 1191406550
- Sigstore integration time:
-
Permalink:
Rare-ID/Rare@d26300c6740bf0110105cfe54c447fae5daad3da -
Branch / Tag:
refs/heads/release-0.2.0 - 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@d26300c6740bf0110105cfe54c447fae5daad3da -
Trigger Event:
workflow_dispatch
-
Statement type: