Skip to main content

Official Python SDK for RightOS - privacy-preserving rights verification API (digital QR tickets for queues, reservations, EV charging, package pickup).

Project description

rightos-sdk — RightOS Python SDK

Official Python SDK for RightOS — privacy-preserving rights verification infrastructure. Issue and verify digital QR tickets ("Right Tokens") for queues, reservations, EV charging, and package pickup, without ever collecting end users' names or phone numbers.

  • Zero dependencies (standard library only), Python ≥ 3.9
  • Machine-readable spec: openapi.json · AI-agent docs: llms-full.txt

RightOS is not a taxi or ride-hailing service. It does not arrange vehicles, set fares, assign drivers, or broker dispatch.

Install

pip install rightos-sdk

Quickstart (60 seconds)

from rightos import RightOS

# 1. Register once (the apiKey is returned EXACTLY ONCE — store it securely)
pub = RightOS()
reg = pub.register_organization(name="My Shop", contact_email="you@example.com", plan_id="free")
api_key = reg["apiKey"]

# 2. Operator client
client = RightOS(api_key=api_key)

# 3. Issue a digital QR ticket
location = client.list_locations()[0]
issued = client.issue_token(location_id=location["id"], title="Queue ticket")
print("Hand this to your customer:", issued["walletUrl"])

# 4. Verify on arrival (no API key needed)
outcome = RightOS().verify_token(issued["token"]["id"], issued["verificationCode"])
print(outcome["result"])  # "success"

# 5. Mark as used after service
client.use_token(issued["token"]["id"])

Location policies (Policy Engine)

policy = client.get_location_policy(location["id"])["policy"]
# {"transferable": True, "maxTransfers": 3, "defaultValidityMinutes": 720, ...}

client.set_location_policy(location["id"], {"transferable": False})  # override
client.set_location_policy(location["id"], None)  # reset to industry preset

# The full knowledge base — industry presets and country overlays
# (JP/US/GB/KR/TW/FR/DE/IT/ES/AU, informed by local ticket-resale laws):
defs = client.list_policies()  # defaults, not legal advice

Error handling

from rightos import RightOS, RightOSError

try:
    RightOS().transfer_token(token_id, code)
except RightOSError as e:
    if e.code == "policy_transfer_disabled":
        ...  # this location forbids transfers
    elif e.status == 429:
        ...  # rate limited; wait e.retry_after_sec

Common codes: missing_api_key / invalid_api_key (401), plan limits (402), policy_transfer_disabled / transfer_limit_reached (409), rate_limited (429).

Try it against the live demo

demo = RightOS(api_key="rk_demo_00000000000000000000")  # shared demo org
print(demo.list_locations())

License

MIT © I-S3 Inc.

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

rightos_sdk-0.3.0.tar.gz (5.8 kB view details)

Uploaded Source

Built Distribution

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

rightos_sdk-0.3.0-py3-none-any.whl (5.7 kB view details)

Uploaded Python 3

File details

Details for the file rightos_sdk-0.3.0.tar.gz.

File metadata

  • Download URL: rightos_sdk-0.3.0.tar.gz
  • Upload date:
  • Size: 5.8 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.14.6

File hashes

Hashes for rightos_sdk-0.3.0.tar.gz
Algorithm Hash digest
SHA256 23cd14dc86ad2b546772fb939636fd86ea328d05fb26a8c9e59e4b2a241f79b3
MD5 bac00a2d7fb4e9754db250aa4ede4626
BLAKE2b-256 36fb8bc61da94f93d81242f9dd41f69da7e3f2275b2fa62562e63241894fe625

See more details on using hashes here.

File details

Details for the file rightos_sdk-0.3.0-py3-none-any.whl.

File metadata

  • Download URL: rightos_sdk-0.3.0-py3-none-any.whl
  • Upload date:
  • Size: 5.7 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.14.6

File hashes

Hashes for rightos_sdk-0.3.0-py3-none-any.whl
Algorithm Hash digest
SHA256 e0891953543a0c58f09c0ba8e00c11a4bbfe36a6cc758ba4664efd88e8b66581
MD5 c3eeb7df2cdd7d932d28e56396a330dd
BLAKE2b-256 50a74af075d82407fb2614ebe6be16f3c239f5f35a6020b3556f813b23678421

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