Lightweight auth package for email/password, pluggable user schema and stores
Project description
author
author is a small Python package to provide email/password authentication with a pluggable user schema and pluggable user storage backends. It uses Argon2 via passlib for password hashing by default.
Quick usage:
from author import Authenticator
from author.models import User
# default in-memory store
auth = Authenticator()
user = auth.register("alice@example.com", "s3cr3t", full_name="Alice")
assert auth.authenticate("alice@example.com", "s3cr3t")
# provide your own factory to accept a different user schema
def my_user_factory(**kwargs):
return User(**kwargs)
auth2 = Authenticator(user_factory=my_user_factory)
See tests for a minimal example.
Project details
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 auth101-0.1.1.tar.gz.
File metadata
- Download URL: auth101-0.1.1.tar.gz
- Upload date:
- Size: 3.2 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.11.9
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
5d7f93dab890ff9a23f7cda39eca66994259efcd158f54971c27f0e175da243d
|
|
| MD5 |
761873d7cccb0cb00f064051e8a6b853
|
|
| BLAKE2b-256 |
7d1e6b1c7d243493522ad590818221f1f76ebf6c7298e39868e23f812e9aab0b
|
File details
Details for the file auth101-0.1.1-py3-none-any.whl.
File metadata
- Download URL: auth101-0.1.1-py3-none-any.whl
- Upload date:
- Size: 3.7 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.11.9
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
f5737250fb78b20c258ccb27fe14f8974c9edc0853e95b6584da685108c1c027
|
|
| MD5 |
62c5d4e349b6b0acaed4c1db601fb8d0
|
|
| BLAKE2b-256 |
71f73d734afa54ee702fe326d392555861a08cbb29361f46031a047a29609b23
|