Syncanix intent verification SDK for Python (Django, Flask, FastAPI)
Project description
syncanix-sdk
Python intent verification SDK for Syncanix (Django, Flask, FastAPI).
Install: pip install syncanix-sdk[django] or [flask] or [fastapi].
See the Syncanix docs for usage.
v2 (act-as-user) binds
The per-route helpers — syncanix_verify_intent (Flask/Django) and
require_syncanix_intent (FastAPI) — accept optional keyword args to enforce the
v2 argsHash / audience / single-use-nonce binds (omit them and only the v1
coordinate is checked, unchanged):
@syncanix_verify_intent(
secret=SECRET,
# CANONICAL args — NOT the raw body. Reconstruct from every source
# (ADR-0138): REST → {**view_args, **query, **body}; GraphQL → variables.
get_args=lambda request: canonical_args(request),
expected_audience="syncanix:tenant:<tenantId>", # or omit to skip
nonce_store=InMemoryNonceStore(), # or omit to skip
)
def refund(request): ...
Each bind is opt-in. Replay protection needs a nonce_store
(InMemoryNonceStore is single-instance only — use a shared store for a
horizontally scaled API). The v2 sub is surfaced on the verified payload's
.sub. Passing the bare request body as get_args would falsely reject
path-param / GET / GraphQL calls — reconstruct the canonical args.
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 syncanix_sdk-0.1.0.tar.gz.
File metadata
- Download URL: syncanix_sdk-0.1.0.tar.gz
- Upload date:
- Size: 24.5 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.11.9
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
a326445727d48e21c94a8914d2e702797673b30e5ec7d987c2feaf8f1173f574
|
|
| MD5 |
6dfd7be8dea4d779b385d181dd041f36
|
|
| BLAKE2b-256 |
be2011015072f6baedc84ebb08ac5a08141e62bd240d169897227bce8a87d177
|
File details
Details for the file syncanix_sdk-0.1.0-py3-none-any.whl.
File metadata
- Download URL: syncanix_sdk-0.1.0-py3-none-any.whl
- Upload date:
- Size: 19.5 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.11.9
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
732d581b8a9cd3fa895a308953cd4c9ee1d4f7c05e261276ea79bf36f965ce4d
|
|
| MD5 |
df1671b317cbda2ea059fd659cc309e3
|
|
| BLAKE2b-256 |
fd1344d94a311c821eea8a716d9766a7999413f4f3fd1bf21c0a8a66674d4029
|