argos
Python client for the Argos authorizer — handles app authentication, JWT validation, permission checking and automatic operation sync.
Installation
pip install argos
# With FastAPI support
pip install "argos[fastapi]"
Quick start with FastAPI
from fastapi import FastAPI, Request
from argos.adapters.fastapi import Argos, operation
app = FastAPI()
argos = Argos(
app,
authorizer_url="http://localhost:4000/api",
app_id="your-app-uuid",
secret="your-app-secret",
)
@app.get("/public")
@operation(id="public.info", level="public")
async def public_info():
"""Anyone can call this — no token needed."""
return {"message": "Hello, world!"}
@app.get("/items")
@operation(id="items.list", level="private")
async def list_items(request: Request):
"""Requires any authenticated user (token with non-empty groups)."""
user = request.state.user # TokenClaims
return {"user": user.sub, "items": []}
@app.delete("/items/{item_id}")
@operation(id="items.delete", level="protected")
async def delete_item(item_id: str, request: Request):
"""Requires a user whose group has explicit permission for items.delete."""
return {"deleted": item_id}
Standalone client
import asyncio
from argos import ArgosClient, OperationDescriptor
client = ArgosClient(
authorizer_url="http://localhost:4000/api",
app_id="your-app-uuid",
secret="your-app-secret",
)
client.register_operation(
OperationDescriptor(identifier="items.list", method="read", level="private")
)
async def main():
await client.startup()
# Validate a token from an incoming request
claims = await client.validate_token("<bearer-token>")
# Check whether the token has permission
allowed = client.check_permission(claims, "items.list", "read")
print(f"Allowed: {allowed}")
asyncio.run(main())
Operation levels
| Level | Who can access |
|---|---|
public |
Everyone — no token required |
private |
Any authenticated user (token with at least one group) |
protected |
Only users whose groups intersect the operation's allowed_groups |
Method auto-detection
The @operation decorator infers the method from the function name:
| Function name prefix/keyword | Detected method |
|---|---|
get_, list_, fetch_, read_ |
read |
delete_, remove_, destroy_ |
delete |
contains stream, subscribe, watch |
stream |
| anything else | write |
Configuration
| Parameter | Description |
|---|---|
authorizer_url |
Base URL of Argos, including the API prefix (e.g. http://host/api) |
app_id |
UUID of the app registered in auth.apps |
secret |
Plain-text app secret (never committed — use env vars) |
import os
from argos.adapters.fastapi import Argos
argos = Argos(
app,
authorizer_url=os.environ["AUTHORIZER_URL"],
app_id=os.environ["APP_ID"],
secret=os.environ["APP_SECRET"],
)
Metadata
Release files for caronte-sdk 0.2.4
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 | |
|---|---|---|---|---|
| caronte_sdk-0.2.4.tar.gz | 18.2 kB | Without provenance | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| caronte_sdk-0.2.4-py3-none-any.whl | Python 3 | none | any | Details |
Total release size: 37.5 kB
Release files / caronte_sdk-0.2.4.tar.gz
| Download URL | caronte_sdk-0.2.4.tar.gz |
|---|---|
| Size | 18.2 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
7f3d2d58a6d2a6ab0d27cb0732c08fac5441b40d1fea2b9d243722b050cc4465
|
|
BLAKE2b-256 checksum How to use checksums |
209e4e3cb938ee827ebfda37173ee36281f696e5bbd4f386714d321c050e521d
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/7.0.0 CPython/3.14.4
|
Release files / caronte_sdk-0.2.4-py3-none-any.whl
| Download URL | caronte_sdk-0.2.4-py3-none-any.whl |
|---|---|
| Size | 19.2 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
781b8655aec7f7c3542ab7276af13c8893de3dee3de6d27451e8d2acd8f7c01e
|
|
BLAKE2b-256 checksum How to use checksums |
1c0e3951b061ad65f5222252b08aa63ca5e9634ef0b14e0e7542787b7caf0f7a
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/7.0.0 CPython/3.14.4
|
Security for caronte-sdk 0.2.4
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.