opensourceprojects.dev

A broadsheet for software that doesn't ask for your email

Sqladmin
GitHub RepoImpressions21

Project Description

View on GitHub

A Flask Admin? No, It’s SQLAdmin – The Admin Panel You Actually Want

Intro

If you’ve ever built a Flask app with SQLAlchemy, you know the struggle: your models are clean, your queries are fast, but you still need a quick way to inspect or edit data. You could build a custom admin panel, or you could reach for Flask-Admin. But Flask-Admin is... fine. It works, but it’s a bit clunky, and the template customization can feel like a rabbit hole.

Enter SQLAdmin. It’s a modern, lightweight admin interface for FastAPI (and Flask, with some adaptation) that sits directly on top of SQLAlchemy models. No fuss, no heavy ORM wrappers. Just an admin panel that feels like it belongs in 2024.


What It Does

SQLAdmin is a flexible admin dashboard for your SQLAlchemy models. It gives you a clean, web-based UI to:

  • View, create, edit, and delete records
  • Manage relationships (foreign keys, many-to-many)
  • Filter and search across your data
  • Export rows as CSV or JSON
  • Customize fields, columns, and actions

The repo is pretty straightforward: one Python package, zero dependencies beyond SQLAlchemy and your web framework of choice (FastAPI is the primary target, but it works with others).


Why It’s Cool

A few things make SQLAdmin stand out:

1. It’s built for FastAPI natively
That means async support out of the box. No monkey-patching, no blocking sync calls. If you’re using FastAPI + SQLAlchemy async, you’re golden.

2. The UI is modern and responsive
Think GitHub’s code review UI, not a 90s CMS. It uses a clean CSS framework (Bulma) and feels snappy on mobile too.

3. You don’t reinvent the wheel
SQLAdmin auto-discovers your models. Just pass your SQLAlchemy engine or async session, and it generates an admin panel automatically. No manual field mappings unless you want them.

4. Extensible without getting in your way
You can override almost anything – templates, fields, actions, even the base model list class. But the defaults are smart enough for 90% of use cases.

5. It’s lightweight
No jQuery, no heavy JS framework. The whole thing fits in a single Python package (under 1 MB). You can literally pip install sqladmin and be up in 5 minutes.


How to Try It

Clone the repo or install directly:

pip install sqladmin

Here’s a minimal FastAPI example:

from fastapi import FastAPI
from sqladmin import Admin, ModelView
from sqlalchemy import create_engine
from sqlalchemy.orm import DeclarativeBase

# Your SQLAlchemy models (omitted for brevity)
class Base(DeclarativeBase):
    pass

app = FastAPI()
engine = create_engine("sqlite:///./test.db")
admin = Admin(app, engine)

class UserAdmin(ModelView, model=User):
    column_list = ["id", "name", "email", "created_at"]

admin.add_view(UserAdmin)

Visit http://localhost:8000/admin and you’re good to go.

For Django or Flask users: the repo has examples in the examples/ folder. It’s a quick copy-paste.


Final Thoughts

SQLAdmin is one of those tools you don’t realize you need until you try it. If you’re building a FastAPI app with SQLAlchemy, it saves you hours of boilerplate admin code. Flask users might need a little extra glue, but it’s still a solid upgrade over Flask-Admin.

Give it a spin on your next side project or API tool. Worst case, you’re out 5 minutes of pip install time. Best case, you never write another admin endpoint again.


Found this useful? Share it with your team. Follow @githubprojects for more clean dev tools.

Back to Projects
Project ID: 58165ede-fd4e-4ad0-9ceb-6d5d7b913a4dLast updated: July 10, 2026 at 07:07 AM