Skip to main content

FastAPI Admin Lite: auto-generated CRUD admin panel for FastAPI + SQLAlchemy.

Project description

fastapi-admin-lite

fastapi-admin-lite provides a minimal auto-generated admin panel for FastAPI + SQLAlchemy.

Features (v0.1.0)

  • auto CRUD list/delete pages
  • HTML admin UI (Jinja2 templates)
  • supports SQLAlchemy models
  • supports SQLite/Postgres/MySQL
  • optional auth dependency hook

Install

pip install fastapi-admin-lite

Quick Example

from fastapi import FastAPI
from sqlalchemy import create_engine
from sqlalchemy.orm import sessionmaker, declarative_base
from sqlalchemy import Column, Integer, String

from fastapi_admin_lite import AdminSite

Base = declarative_base()

class User(Base):
    __tablename__ = "users"
    id = Column(Integer, primary_key=True)
    name = Column(String)

engine = create_engine("sqlite:///./test.db")
Base.metadata.create_all(engine)

SessionLocal = sessionmaker(bind=engine)

app = FastAPI()

admin = AdminSite(app, session_factory=SessionLocal)
admin.register_model(User)

admin.mount("/admin")

Run:

uvicorn examples.app:app --reload

Open: http://localhost:8000/admin

License

MIT

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

fastapi_admin_lite-0.1.0.tar.gz (4.1 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

fastapi_admin_lite-0.1.0-py3-none-any.whl (4.8 kB view details)

Uploaded Python 3

File details

Details for the file fastapi_admin_lite-0.1.0.tar.gz.

File metadata

  • Download URL: fastapi_admin_lite-0.1.0.tar.gz
  • Upload date:
  • Size: 4.1 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.12

File hashes

Hashes for fastapi_admin_lite-0.1.0.tar.gz
Algorithm Hash digest
SHA256 75b20734439a657b485f9deac483ba52cf35b3fbc2a99076d0e8c48fea5c0020
MD5 aed4a30ec16eefc032b9576899e5e034
BLAKE2b-256 bba65c8a0888b25b5c5a5d0529755666e02bf6bb70907bb1322bcf5127fb30fa

See more details on using hashes here.

Provenance

The following attestation bundles were made for fastapi_admin_lite-0.1.0.tar.gz:

Publisher: publish.yml on Kubenew/fastapi-admin-lite

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file fastapi_admin_lite-0.1.0-py3-none-any.whl.

File metadata

File hashes

Hashes for fastapi_admin_lite-0.1.0-py3-none-any.whl
Algorithm Hash digest
SHA256 b0e390c7f176c350e6fc132c8dc44d35cfaf32e61af20ed48c0a21ccfa674846
MD5 11e7bb5dd03270a280e257c1aa992dac
BLAKE2b-256 1bd30a25a0b19f1b90bcf61c7796c5eb065c179f1b08c417e93406067e35f1db

See more details on using hashes here.

Provenance

The following attestation bundles were made for fastapi_admin_lite-0.1.0-py3-none-any.whl:

Publisher: publish.yml on Kubenew/fastapi-admin-lite

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page