AdmitiQ
Signed, expiring, revocable tokens for QR codes and ticket links.
A LogicLitz open-source project · Site: admitiq.logiclitz.org
| Website & tutorial | https://admitiq.logiclitz.org |
| Admission policies | https://admitiq.logiclitz.org/guides/admission-policies |
| Token playground | https://admitiq.logiclitz.org/debugger |
| Organization | https://logiclitz.org |
| Source | https://github.com/HyperXfury1873/admitiq |
| JavaScript twin | npm install admitiq |
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+)
| Policy | Python | JavaScript | Typical use |
|---|---|---|---|
| Unlimited while valid | verify_pass |
verifyPass |
Halls, workshops, staff badges |
| Once per calendar day | admit_daily |
admitDaily |
Main gate; go home, return tomorrow |
| Once ever | admit_once |
admitOnce |
Coupons, 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
| Resource | URL |
|---|---|
| Interactive tutorial | https://admitiq.logiclitz.org/tutorial |
| Admission policies (pass / daily / once) | https://admitiq.logiclitz.org/guides/admission-policies |
| Issue & verify playground | https://admitiq.logiclitz.org/debugger |
| Getting started | https://admitiq.logiclitz.org/getting-started |
| Python guide | https://github.com/HyperXfury1873/admitiq/blob/main/docs/python.md |
| Delivering tokens (QR / URL) | https://github.com/HyperXfury1873/admitiq/blob/main/docs/delivering-tokens.md |
| Key rotation | https://github.com/HyperXfury1873/admitiq/blob/main/docs/key-rotation.md |
| Security model | https://github.com/HyperXfury1873/admitiq/blob/main/SECURITY.md |
| Flask example | https://github.com/HyperXfury1873/admitiq/tree/main/examples/flask-attendance |
| What is AdmitiQ? | https://github.com/HyperXfury1873/admitiq/blob/main/docs/what-is-admitiq.md |
Project links
These also appear in the PyPI sidebar:
- Homepage — https://admitiq.logiclitz.org
- Documentation — https://admitiq.logiclitz.org/getting-started
- LogicLitz — https://logiclitz.org
- Source — https://github.com/HyperXfury1873/admitiq
- Bug tracker — https://github.com/HyperXfury1873/admitiq/issues
- Changelog — https://github.com/HyperXfury1873/admitiq/releases
License
MIT © LogicLitz
Metadata
Release files for admitiq 0.4.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 | |
|---|---|---|---|---|
| admitiq-0.4.0.tar.gz | 17.7 kB | Without provenance | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| admitiq-0.4.0-py3-none-any.whl | Python 3 | none | any | Details |
Total release size: 34.9 kB
Release files / admitiq-0.4.0.tar.gz
| Download URL | admitiq-0.4.0.tar.gz |
|---|---|
| Size | 17.7 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
c6a68fc0e9061dab5fb8260321ed267746c02607428217f44aae0082bdaf1648
|
|
BLAKE2b-256 checksum How to use checksums |
ddd6e73e006cf8cc6b0dad5504adc21f7e009b4f3460b0483173cb664fe0787d
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/7.0.0 CPython/3.13.2
|
Release files / admitiq-0.4.0-py3-none-any.whl
| Download URL | admitiq-0.4.0-py3-none-any.whl |
|---|---|
| Size | 17.3 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
51038891d3b8a780d9a783c267637c143227dc0f9736ebc24b420f06ee2553c5
|
|
BLAKE2b-256 checksum How to use checksums |
dc7ca72e26fd651c231609ff9524add3bbed631bba05cd163efeab8cee35ee02
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/7.0.0 CPython/3.13.2
|
Security for admitiq 0.4.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.
No provenance found
None of the files in this release were uploaded with provenance metadata.
A 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.