Catalog PyPI
PACKAGE EXPLORERView in registry

admitiq

PyPI

AdmitiQ: signed, expiring QR/URL tokens with verify_pass, admit_daily, and admit_once. By LogicLitz — https://admitiq.logiclitz.org

admitiqattendancecouponshmaclogiclitzmulti-day-badgeonce-per-dayqrqrcodesecuritysigned-urlsingle-useticketstokensverify-pass
Versions collected1
Direct dependencies7From release 0.4.0
Last observed20 Oct, 19:42 UTC

README

Version 0.4.0 documentation

AdmitiQ

PyPI npm License: MIT

Signed, expiring, revocable tokens for QR codes and ticket links.

A LogicLitz open-source project · Site: admitiq.logiclitz.org

A QR code is just text with better marketing. AdmitiQ puts an HMAC-signed (or ES256) token under the QR or inside a URL so a scan can prove: we issued it, it hasn’t expired, and — when you choose — how many times it may be admitted.

Admission policies (v0.4+)

PolicyPythonJavaScriptTypical use
Unlimited while validverify_passverifyPassHalls, workshops, staff badges
Once per calendar dayadmit_dailyadmitDailyMain gate; go home, return tomorrow
Once everadmit_onceadmitOnceCoupons, single-session tickets

Same QR for a multi-day event: halls call verify_pass; the main gate calls admit_daily.

Tokens are cross-language: issue in Python, verify in Node (and the reverse) with the same secret.


Install

pip install admitiq

# optional extras
pip install "admitiq[qr]"     # QR images (qrcode + Pillow)
pip install "admitiq[ec]"     # ES256 / cryptography
pip install "admitiq[redis]"  # Redis single-use / revoke store

Quick start

from admitiq import issue, verify, issue_url, issue_qr
import os

SECRET = os.environ["ADMITIQ_SECRET"]  # keep on the server only

token = issue({"ticket_id": "T-1001", "seat": "A12"}, ttl_seconds=3600, secret=SECRET)
url = issue_url(
    "https://events.example/scan",
    {"ticket_id": "T-1001"},
    ttl_seconds=3600,
    secret=SECRET,
)
# issue_qr(..., output_path="ticket.png")  # needs admitiq[qr]

payload = verify(token, secret=SECRET)
print(payload["data"])  # {"ticket_id": ..., "seat": ...}

FastAPI / Flask helpers

from admitiq.frameworks import fastapi_dependency, flask_require_token

See the Python guide and the Flask attendance example.

Key rotation

from admitiq import verify_with_secrets
payload = verify_with_secrets(token, secrets=[NEW_SECRET, OLD_SECRET])

Multi-day badge + main gate

from admitiq import issue, verify_pass, admit_daily
from admitiq.stores import MemoryRevocationStore  # or Redis / Hosted

token = issue({"attendee_id": "A42"}, ttl_seconds=2 * 86400, secret=SECRET)
store = MemoryRevocationStore()
verify_pass(token, SECRET)                      # halls: unlimited
admit_daily(token, SECRET, store)               # main gate: once per day

ES256 (untrusted scanners)

from admitiq.ec import generate_keypair, issue, verify
private_pem, public_pem = generate_keypair()
token = issue({"ticket_id": "T-1001"}, ttl_seconds=3600, private_key_pem=private_pem)
verify(token, public_key_pem=public_pem)  # scanner holds public key only

Docs & guides


These also appear in the PyPI sidebar:

License

MIT © LogicLitz

Downloads & popularity

Awaiting observations

No metric observations yet

Download counts and popularity will appear here as the collector receives them.

Versions 1

Collected releases
VersionPublishedDirect dependenciesOpen version
0.4.020 Aug 20267

Package advisories

0
No matching advisories collected

This describes our collected data; it is not a security assessment.

Repository

PENDING
hyperxfury1873/admitiq

Shared repository data · GitHub

License detected in repository
Not collected

Metadata history

Meaningful changes
Current collected state Current

Observed since 20 Oct, 19:42 UTC

No superseded metadata states collected. Unchanged observations do not create new revisions.

Record identity

package:0a5b9f2dd23a73d3eae2bc98cf82a1313557a2ba1e7caccc8d835d607fd024c0