Email + password user management, admin invites, RBAC-ready — replaces Keycloak for simple_module apps
Project description
simple_module_users
Email+password user management for simple_module apps. Replaces Keycloak/Auth0 for the common case: local accounts, admin invites, password reset, optional public signup. Built on fastapi-users.
Install
pip install simple_module_users
Pre-wired into any app scaffolded with simple-module new.
What it provides
- Email + password registration, login, logout, password reset.
- Admin invite flow — admin enters an email, recipient clicks a link, sets a password, is logged in.
- Public signup toggle (
SM_USERS_ALLOW_SIGNUP, defaultfalse). - Bootstrap admin via env vars (
SM_USERS_BOOTSTRAP_EMAIL+SM_USERS_BOOTSTRAP_PASSWORD) — idempotent, only creates if the users table is empty. sm-users create-adminCLI for ad-hoc admin creation.- Inertia pages for login/register/invite-accept/admin-invite.
- Console mailer (logs to stdout) or SMTP mailer (
SM_USERS_MAILER=smtp).
Usage
CLI:
uv run sm-users create-admin --email admin@example.com --password 'change-me'
Bootstrap-on-boot (.env):
SM_USERS_BOOTSTRAP_EMAIL=admin@example.com
SM_USERS_BOOTSTRAP_PASSWORD=change-me
Program:
from users.deps import CurrentUser # type: ignore[import-not-found]
@router.get("/profile")
async def profile(user: CurrentUser):
return {"email": user.email}
Depends on
simple_module_core,simple_module_db,simple_module_hosting,simple_module_authfastapi-users[sqlalchemy]>=15,<16,aiosmtplib,cachetools,typer
License
MIT — see LICENSE.
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 simple_module_users-0.0.2.tar.gz.
File metadata
- Download URL: simple_module_users-0.0.2.tar.gz
- Upload date:
- Size: 60.3 kB
- Tags: Source
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.12
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
96ead69df0d71580a6a560182895c50d53a010c17dbeeb40f6b226a923d0a129
|
|
| MD5 |
7fc02f18057ddc31aaf9f3670b70c39d
|
|
| BLAKE2b-256 |
9c1ad4299526e09a47c48c1e09bce26af680af4570be44ae6bf437631897fd88
|
Provenance
The following attestation bundles were made for simple_module_users-0.0.2.tar.gz:
Publisher:
release.yml on antosubash/simple_module_python
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
simple_module_users-0.0.2.tar.gz -
Subject digest:
96ead69df0d71580a6a560182895c50d53a010c17dbeeb40f6b226a923d0a129 - Sigstore transparency entry: 1391727865
- Sigstore integration time:
-
Permalink:
antosubash/simple_module_python@1a7e639ff44ab1e2ebf917e0a7f7148e947ca085 -
Branch / Tag:
refs/heads/main - Owner: https://github.com/antosubash
-
Access:
private
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
release.yml@1a7e639ff44ab1e2ebf917e0a7f7148e947ca085 -
Trigger Event:
workflow_dispatch
-
Statement type:
File details
Details for the file simple_module_users-0.0.2-py3-none-any.whl.
File metadata
- Download URL: simple_module_users-0.0.2-py3-none-any.whl
- Upload date:
- Size: 61.4 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.12
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
bf3f6c5432595abbe7e4f5d2bb3a95a85a6c33f4663ece8404562f755ac18973
|
|
| MD5 |
e8f4b70cf9a4ef9f0fc36e46a101714e
|
|
| BLAKE2b-256 |
9bc77cd97cc8303e207c078728618fcc0657182b22b34710c9c89e4d1bf2c4f8
|
Provenance
The following attestation bundles were made for simple_module_users-0.0.2-py3-none-any.whl:
Publisher:
release.yml on antosubash/simple_module_python
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
simple_module_users-0.0.2-py3-none-any.whl -
Subject digest:
bf3f6c5432595abbe7e4f5d2bb3a95a85a6c33f4663ece8404562f755ac18973 - Sigstore transparency entry: 1391727877
- Sigstore integration time:
-
Permalink:
antosubash/simple_module_python@1a7e639ff44ab1e2ebf917e0a7f7148e947ca085 -
Branch / Tag:
refs/heads/main - Owner: https://github.com/antosubash
-
Access:
private
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
release.yml@1a7e639ff44ab1e2ebf917e0a7f7148e947ca085 -
Trigger Event:
workflow_dispatch
-
Statement type: