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.13
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 | |
|---|---|---|---|---|
| flyfun_common-0.6.13.tar.gz | 61.2 kB | Without provenance | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| flyfun_common-0.6.13-py3-none-any.whl | Python 3 | none | any | Details |
Total release size: 136.2 kB
Release files / flyfun_common-0.6.13.tar.gz
| Download URL | flyfun_common-0.6.13.tar.gz |
|---|---|
| Size | 61.2 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
93946498010e08a789ea015f357e325c8dd5b53f9ba45f4f5d192b154dca5088
|
|
BLAKE2b-256 checksum How to use checksums |
00e0496e9712f4673067da47e16d5818d983312b29f5f68a73803f9e8d9478e0
|
| 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.13-py3-none-any.whl
| Download URL | flyfun_common-0.6.13-py3-none-any.whl |
|---|---|
| Size | 75.0 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
afc30a066c63f3c23e22ca5013f3c0e07b0102a15e8108a2c5aefa9e342529b6
|
|
BLAKE2b-256 checksum How to use checksums |
a21f3270ed1c8a26cfff1cf30e30d8d01a317b0235d1f47f65d959107de52139
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/7.0.0 CPython/3.13.11
|
Security for flyfun-common 0.6.13
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.