Skip to main content

cliver-playbook-app-user

Identity package of the cliver-playbook library — accounts, roles and permissions, session and static tokens, OIDC login against external identity providers, and an OAuth 2.1 provider surface for AI-agent clients.

Builds on cliver-playbook-app-basic: it subclasses that package's Settings, uses its runtime (runtime.engine(), runtime.session_factory(), db.session.get_db) and its declarative base, and contributes its own ROUTERS, migration chain and self-application.

What is inside

Area Path (under src/cliver_playbook/app/user/) Notes
Settings settings.py Settings(basic.Settings): secret key, login policy, OIDC registry, OAuth 2.1 knobs.
Routers api/routes.py ROUTERS: list[APIRouter] — /api/v1/auth + /api/v1/admin, including the section-agnostic settings surface (ADR-0015/0021).
Identity auth/ Passwords, tokens, permissions catalog with the * superuser wildcard, RBAC dependencies, OIDC client, OAuth 2.1 provider, audit writer.
Runtime settings settings_section.py, api/admin_settings.py This package's identity-policy section plus the generic describe/update/reset HTTP layer delegated to each owning package (ADR-0021).
Domain api/, services/, schemas/, models/entities.py Endpoints + service layer; tables: users, roles, user_roles, role_permissions, oauth_identities, oauth_clients, oauth_codes, oauth_refresh_tokens, auth_tokens, audit_logs.
Migrations alembic/ Own chain, version table alembic_version_user; seeds the admin/user roles and the initial admin account, and pins the admin role to *.
Application app.py, __main__.py create_app() composes basic + user; python -m cliver_playbook.app.user.

The OAuth 2.1 provider (auth/oauth21.py) adds root-level routes (/.well-known/*, token, registration, revocation) that are not part of ROUTERS: they come from the MCP SDK at call time, so create_app adds them through mount_oauth_routes(app).

Install

python -m pip install -e ../cliver-playbook-app-basic   # dependency first
python -m pip install -e .                              # or: pip install -e ../basic -e .

Editable installs of sibling packages coexist in one virtualenv: the cliver_playbook and cliver_playbook.app namespace directories are PEP 420 — deliberately no __init__.py — so every package's portion merges.

Run standalone

docker compose up -d db        # or point CLIVER_DATABASE_URL at PostgreSQL
python -m cliver_playbook.app.user --reload

First run: apply both migration chains (basic, then user) — the seed prints the initial admin password once.

Migrate

python -c "
from cliver_playbook.app.basic.alembic import run_migrations_online
from cliver_playbook.app.user.alembic import run_migrations_online as run_user
run_migrations_online(); run_user()
"
# interactive, from this directory:
alembic upgrade head

Test

python -m pytest        # needs PostgreSQL; creates and drops a temp database

The suite binds the composed application (create_app) and applies both migration chains, so it exercises the same path a project's initialization takes. tests/fixtures/app.yaml supplies the configuration layer (pinned via CLIVER_CONFIG_FILE), keeping the suite independent of the surrounding checkout's app.yaml.

Metadata

Release files for cliver-playbook-app-user 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 cliver-playbook-app-user 0.1.0
File Size Uploaded Provenance
cliver_playbook_app_user-0.1.0.tar.gz 89.7 kB Without provenance Details

Built distribution (wheel)

Table of built distributions (wheels) for cliver-playbook-app-user 0.1.0
File Interpreter ABI Platform
cliver_playbook_app_user-0.1.0-py3-none-any.whl Python 3 none any Details

Total release size: 171.6 kB

Release files / cliver_playbook_app_user-0.1.0.tar.gz

Download URL cliver_playbook_app_user-0.1.0.tar.gz
Size 89.7 kB
Tags Source
SHA-256 checksum
How to use checksums
13b1b7c0f6a89e770cfa75939c4fe45bcd40429bdc7967ad62ff20431d3404a9
BLAKE2b-256 checksum
How to use checksums
c747329def634ce9908da6465c9427d631fd2b9ef25eca7f697894de72b7923f
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via uv/0.12.9 {"installer":{"name":"uv","version":"0.12.9","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 / cliver_playbook_app_user-0.1.0-py3-none-any.whl

Download URL cliver_playbook_app_user-0.1.0-py3-none-any.whl
Size 81.9 kB
Tags Python 3
SHA-256 checksum
How to use checksums
c867a04f7a6905d2c45a73d91ced1ba5d35bbc033a6d9d559bb6d001d28f21ac
BLAKE2b-256 checksum
How to use checksums
2d99e27b1ddcc54d9c4fc9530de10bd6afefae7f87df91a000e057efaf080e37
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via uv/0.12.9 {"installer":{"name":"uv","version":"0.12.9","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 cliver-playbook-app-user 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.

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