flyfun-common
Shared user management and authentication library for flyfun services.
Provides OAuth login (Google, Apple), JWT session management, user database models, and API token administration — all as reusable FastAPI components.
Installation
pip install flyfun-common
Usage
from fastapi import FastAPI
from flyfun_common.auth import create_auth_router
from flyfun_common.db import init_db
app = FastAPI()
# Initialize database
init_db()
# Mount the auth router
app.include_router(create_auth_router())
Configuration
All configuration is via environment variables:
| Variable | Required | Description |
|---|---|---|
JWT_SECRET |
Production | Secret key for signing JWT tokens |
DATABASE_URL |
No | SQLAlchemy database URL (defaults to local SQLite) |
ENVIRONMENT |
No | production or development (default) |
COOKIE_DOMAIN |
No | Cookie domain for cross-subdomain SSO |
GOOGLE_CLIENT_ID |
No | Google OAuth client ID |
GOOGLE_CLIENT_SECRET |
No | Google OAuth client secret |
APPLE_CLIENT_ID |
No | Apple Sign In service ID |
APPLE_TEAM_ID |
No | Apple Developer Team ID |
APPLE_KEY_ID |
No | Apple Sign In key ID |
APPLE_PRIVATE_KEY |
No | Apple Sign In private key (PEM) |
CREDENTIAL_ENCRYPTION_KEY |
Production | Fernet key for encrypting stored credentials |
License
MIT
Metadata
Release files for flyfun-common 0.6.10
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | |
|---|---|---|---|
| flyfun_common-0.6.10.tar.gz | 57.5 kB | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| flyfun_common-0.6.10-py3-none-any.whl | Python 3 | none | any | Details |
Total release size: 128.8 kB
Release files / flyfun_common-0.6.10.tar.gz
| Download URL | flyfun_common-0.6.10.tar.gz |
|---|---|
| Size | 57.5 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
eae93aca0692ddd4c1f94d9a7044b9f9f0d376fe7d394603619768b42f9d1dc6
|
|
BLAKE2b-256 checksum How to use checksums |
48043a234808cd97537ba6b5a8e4d420858442e7c1f87b5fcc4fb5c92ff2c9b7
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/7.0.0 CPython/3.13.11
|
Release files / flyfun_common-0.6.10-py3-none-any.whl
| Download URL | flyfun_common-0.6.10-py3-none-any.whl |
|---|---|
| Size | 71.2 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
35c560512e1dc61f2bfd98e023f2133d5f5fea81ad4bfce4194bf9b508e48770
|
|
BLAKE2b-256 checksum How to use checksums |
2ba2178e4d201cf678b6d51becaffab5d3dbba9e4bf3087b05f7d683f73efa05
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/7.0.0 CPython/3.13.11
|