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.1.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.1.0
File Size Uploaded Provenance
cauthy-0.1.0.tar.gz 112.1 kB Without provenance Details

Built distribution (wheel)

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

Total release size: 138.5 kB

Release files / cauthy-0.1.0.tar.gz

Download URL cauthy-0.1.0.tar.gz
Size 112.1 kB
Tags Source
SHA-256 checksum
How to use checksums
254d46487769f6a4f870b8d16717c8da120812d16acf44224544dd17c1cd4869
BLAKE2b-256 checksum
How to use checksums
6d69792b16e0a0c002cac4dc2612ec38e07432ed9df07159f272efda675cb561
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":"24.04","id":"noble","libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":true}

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

Download URL cauthy-0.1.0-py3-none-any.whl
Size 26.4 kB
Tags Python 3
SHA-256 checksum
How to use checksums
c990a1077755dda9e5e04a65620cc0ed12c30746f22a22744bb0f2a9bd4cd3c7
BLAKE2b-256 checksum
How to use checksums
ea9fe9ab135a167454642640e50b14a9d129db46a5d31d8044416086c38a4d07
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":"24.04","id":"noble","libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":true}

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