Skip to main content

cauthy

Cauthy for Python backends: verify the access tokens and webhooks Cauthy signs, check what a person may do in an organization, and let the application manage its own organizations.

pip install cauthy                 # or "cauthy[fastapi]", "cauthy[django]", "cauthy[flask]"
import cauthy

who = cauthy.verify_token(request.headers)        # 401 on CauthyTokenError
orgs = cauthy.organizations_of(who)               # their organizations, with permissions
cauthy.can(orgs[0], "invoicing", "write")         # a lookup: no call to Cauthy

event = cauthy.verify_webhook(headers, raw_body, url="https://app.example.com/hooks/cauthy")

system = cauthy.System()                          # the application acting on its own
org = system.organizations.create(name="Acme", external_id="acme")
system.members.add(org.id, email="ana@acme.com", role="admin")

FastAPI:

from fastapi import Depends
from cauthy import Identity, SessionOrganization
from cauthy.fastapi import require_permission, require_session

@app.get("/me")
async def me(who: Identity = Depends(require_session)): ...

@app.post("/orgs/{organization_id}/invoices")
async def create(org: SessionOrganization = Depends(require_permission("invoicing:write"))): ...

Configuration comes from CAUTHY_ISSUER, CAUTHY_CLIENT_ID, CAUTHY_CLIENT_SECRET (or CAUTHY_SYSTEM_KEY and CAUTHY_SYSTEM_KEY_ID) and CAUTHY_SYSTEM, or from cauthy.Settings. Python 3.10 or later; every call has an async twin.

The full guide: https://cauthy.docs.vennet.dev/guide/sdk-python

Developing

uv sync
uv run pytest
uv run ruff check src tests && uv run mypy

Metadata

Release files for cauthy 0.2.0

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for cauthy 0.2.0
File Size Uploaded Provenance
cauthy-0.2.0.tar.gz 112.5 kB Without provenance Details

Built distribution (wheel)

Table of built distributions (wheels) for cauthy 0.2.0
File Interpreter ABI Platform
cauthy-0.2.0-py3-none-any.whl Python 3 none any Details

Total release size: 138.9 kB

Release files / cauthy-0.2.0.tar.gz

Download URL cauthy-0.2.0.tar.gz
Size 112.5 kB
Tags Source
SHA-256 checksum
How to use checksums
d64fc6d825293f78407fcbaf50a0762da063ff5a0bee45f5d76603dbbcedebbf
BLAKE2b-256 checksum
How to use checksums
f8df9319bdab59a23f1fea00101a369b5ec11898cd2262ab1668fda8f67c7e94
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via uv/0.11.32 {"installer":{"name":"uv","version":"0.11.32","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Ubuntu","version":"26.04","id":"resolute","libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":true}

Release files / cauthy-0.2.0-py3-none-any.whl

Download URL cauthy-0.2.0-py3-none-any.whl
Size 26.4 kB
Tags Python 3
SHA-256 checksum
How to use checksums
6d97f93cfada96de5065598dd8268d980ec112026e95a1e6d928b024ffcd3b23
BLAKE2b-256 checksum
How to use checksums
4e4c3b3920317e120854a3d1b0a4f76b3f255b65d8aa78002cf8abbe07aabf52
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via uv/0.11.32 {"installer":{"name":"uv","version":"0.11.32","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Ubuntu","version":"26.04","id":"resolute","libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":true}

Security for cauthy 0.2.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.

Release history Release notifications | RSS feed

This release

0.2.0 This release

2 release files No provenance

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page