Skip to main content

fastapi-lite

Reusable FastAPI utilities extracted for shared use: AWS helpers (boto3 session, botocore models, SSO auth), SQLite-backed cache, and uvicorn-style access logging.

Installation

pip install fastapi-lite

Modules

fastapi_lite.log — Access logging

Drop-in uvicorn-style HTTP access-log middleware:

from fastapi import FastAPI
from fastapi_lite.log import add_uvicorn_like_access_log

app = FastAPI()
add_uvicorn_like_access_log(app)

fastapi_lite.cache — SQLite cache

Namespace-based SQLite cache with TTL, plus a ready-to-include FastAPI router:

from pathlib import Path
from fastapi_lite.cache import CacheManager, CacheStore, router as cache_router, set_cache_manager

# Optionally configure cache directory (defaults to ~/.fastapi_lite/cache)
set_cache_manager(CacheManager(Path.home() / ".myapp" / "cache"))

app.include_router(cache_router)

Use the store directly:

from fastapi_lite.cache import CacheManager
from pathlib import Path

manager = CacheManager(Path("/tmp/cache"))
store = manager.get_store("my-namespace")
store.set_item("key", {"hello": "world"}, ttl_ms=60000)
print(store.get_item("key"))

fastapi_lite.aws — AWS helpers

from fastapi_lite.aws import (
    get_boto3_session,
    execute_aws_action,
    BotoJSONEncoder,
    set_aws_sso_config,
    botocore_router,
    aws_router,
    auth_router,
)

# Configure SSO (call once at startup)
set_aws_sso_config([
    {
        "ssoRegion": "eu-west-1",
        "ssoStartUrl": "https://d-xxx.awsapps.com/start",
        "domain": "aws.amazon.com",
        "instance": "aws",
    }
])

# Include routers
app.include_router(botocore_router)
app.include_router(aws_router)
app.include_router(auth_router)

License

MIT

Metadata

Release files for fastapi-lite 1.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 fastapi-lite 1.1.0
File Size Uploaded Provenance Actions
fastapi_lite-1.1.0.tar.gz 13.9 kB With provenance Details for fastapi_lite-1.1.0.tar.gz

Built distribution (wheel)

Table of built distributions (wheels) for fastapi-lite 1.1.0
File Interpreter ABI Platform Actions
fastapi_lite-1.1.0-py3-none-any.whl Python 3 none any Details for fastapi_lite-1.1.0-py3-none-any.whl

Total release size: 27.6 kB

Release files / fastapi_lite-1.1.0.tar.gz

Download URL fastapi_lite-1.1.0.tar.gz
Size 13.9 kB
Tags Source
SHA-256 checksum
How to use checksums
6d59a597ff36ec1c56564807708e83128a632a7c647fddec8df75095d923acf6
BLAKE2b-256 checksum
How to use checksums
f99632cf9228db80278df0944178ca742ac58b69deea98a25fc80ec857ae221e
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/6.1.0 CPython/3.13.7

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.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Mar 19, 2026.

Transparency log

Release files / fastapi_lite-1.1.0-py3-none-any.whl

Download URL fastapi_lite-1.1.0-py3-none-any.whl
Size 13.7 kB
Tags Python 3
SHA-256 checksum
How to use checksums
dc93350c9954c64f067e252ac1040981daad935c842c0b88f6048884e7e94983
BLAKE2b-256 checksum
How to use checksums
82dfc69922cd85165ad974265d88f5c26692d5d674c3043ad3e17c4629cb9124
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/6.1.0 CPython/3.13.7

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.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Mar 19, 2026.

Transparency log

Security for fastapi-lite 1.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.

Full provenance

All 2 files in this release have been uploaded with provenance metadata.

Select from 2 files

Attestation for fastapi_lite-1.1.0.tar.gz

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Mar 19, 2026.

Transparency log

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.

Release history Release notifications | RSS feed

This release

1.1.0 This release

2 release files Full 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