spa-sqladmin: React SPA Admin for Starlette/FastAPI
spa-sqladmin is a modern React SPA rewrite of sqladmin providing a better UI/UX.
Main features include:
- SQLAlchemy sync/async engines
- Starlette integration
- FastAPI integration
- SQLModel support
- Modern React SPA UI with Shadcn UI, Tanstack Router, Tanstack Table, and Tanstack Query
Installation
$ pip install spa-sqladmin
Or with uv:
$ uv add spa-sqladmin
Screenshots
Quickstart
Let's define an example SQLAlchemy model:
from sqlalchemy import Column, Integer, String, create_engine
from sqlalchemy.orm import declarative_base
Base = declarative_base()
engine = create_engine(
"sqlite:///example.db",
connect_args={"check_same_thread": False},
)
class User(Base):
__tablename__ = "users"
id = Column(Integer, primary_key=True)
name = Column(String)
Base.metadata.create_all(engine) # Create tables
If you want to use SQLAdmin with FastAPI:
from fastapi import FastAPI
from spa_sqladmin import Admin, ModelView
app = FastAPI()
admin = Admin(app, engine)
class UserAdmin(ModelView, model=User):
column_list = [User.id, User.name]
admin.add_view(UserAdmin)
Or if you want to use SQLAdmin with Starlette:
from spa_sqladmin import Admin, ModelView
from starlette.applications import Starlette
app = Starlette()
admin = Admin(app, engine)
class UserAdmin(ModelView, model=User):
column_list = [User.id, User.name]
admin.add_view(UserAdmin)
Now visiting /admin on your browser you can see the SQLAdmin interface.
Find an extensive example in the example folder.
For a full overview of Admin(...) parameters, icon formats, palette syntax, and custom admin patterns, see docs/USAGE.md.
Acknowledgements
This project would not have been possible without sqladmin.
Metadata
Release files for spa-sqladmin 0.3.0
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 | Actions |
|---|---|---|---|---|
| spa_sqladmin-0.3.0.tar.gz | 246.7 kB | Without provenance | Details for spa_sqladmin-0.3.0.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| spa_sqladmin-0.3.0-py3-none-any.whl | Python 3 | none | any | Details for spa_sqladmin-0.3.0-py3-none-any.whl |
Total release size: 501.9 kB
Release files / spa_sqladmin-0.3.0.tar.gz
| Download URL | spa_sqladmin-0.3.0.tar.gz |
|---|---|
| Size | 246.7 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
225b3e55e7d543e1c84fff9701faa9fb75476f2315dea30acca3f504c4aababd
|
|
BLAKE2b-256 checksum How to use checksums |
6d686276cc1680d9d64562ded2223b233dc19337fa30ed64279fd17239a27e33
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
uv/0.11.2 {"installer":{"name":"uv","version":"0.11.2","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Ubuntu","version":"24.04","id":"noble","libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":true}
|
Release files / spa_sqladmin-0.3.0-py3-none-any.whl
| Download URL | spa_sqladmin-0.3.0-py3-none-any.whl |
|---|---|
| Size | 255.2 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
5a193759a193a9c05d5ab81ca5dcc72c6a5216e691ceeaec6449916f80ebb7c5
|
|
BLAKE2b-256 checksum How to use checksums |
856b874a22de60382ffb051f278206a70b5d512c030a2f59c8d0760acdcc05b8
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
uv/0.11.2 {"installer":{"name":"uv","version":"0.11.2","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Ubuntu","version":"24.04","id":"noble","libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":true}
|
Security for spa-sqladmin 0.3.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.
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.