sqladmin_skill

This skill helps you build and tailor SQLAdmin interfaces for SQLAlchemy models in FastAPI or Starlette apps, including authentication, views, and async

0

GitHub Stars

1

Bundled Files

2 months ago

Catalog Refreshed

4 months ago

First Indexed

Readme & install

Copy the install command, review bundled files from the catalogue, and read any extended description pulled from the listing source.

Installation

Preview and clipboard use veilstrat where the catalogue uses aiagentskills.

npx veilstrat add skill jik92/sqladmin-skills --skill sqladmin

  • SKILL.md3.1 KB

Overview

This skill builds and maintains SQLAdmin admin interfaces for SQLAlchemy models in FastAPI or Starlette apps. It wires sync or async SQLAlchemy engines/sessions, configures ModelView behavior, and adds authentication, role-based permissions, custom templates, and file/image upload integrations. Use it to quickly expose a polished admin UI and to extend admin features with custom views and actions.

How this skill works

I initialize an Admin instance with your FastAPI/Starlette app and a SQLAlchemy engine or sessionmaker (sync or async). For each model I create a ModelView that configures lists, forms, filters, exports, and relationship fields, then add those views to the Admin instance. Authentication backends, per-view access checks, template overrides, custom BaseView pages, and storage-backed file/image columns are wired through documented hooks and options.

When to use it

  • You need an admin dashboard to manage SQLAlchemy models in a FastAPI/Starlette project.
  • You want role-based access and per-model or per-action permissions in the admin UI.
  • You must run an async SQLAlchemy engine/session (asyncio) with admin views.
  • You want to customize list columns, forms, filters, exports, or add custom actions.
  • You need file/image upload support integrated into admin forms and listings.

Best practices

  • Use explicit ModelView configurations for lists, search, filters, and pagination to avoid leaking sensitive fields.
  • Implement AuthenticationBackend with is_accessible/is_visible checks for role enforcement and per-view guards.
  • Prefer async sessionmakers and ensure ModelView hooks use async patterns when running an async engine.
  • Override only the templates you need and keep a fallback to defaults to reduce maintenance.
  • Use storage integrations (e.g., fastapi-storages) for robust file and image handling and avoid storing files directly in the DB.

Example use cases

  • Add a single /admin dashboard that exposes Product, User, and Order models with role-based access so only admins can edit users.
  • Make SQLAdmin work with an async SQLAlchemy engine and async sessionmaker in an asyncio FastAPI app.
  • Customize a ModelView to show specific columns, add filters and a CSV export for reporting.
  • Create a custom BaseView page with analytics and add a ModelView action button to trigger batch operations.
  • Integrate image upload fields for a Product model using storage-backed ImageType columns.

FAQ

Yes. Initialize with create_async_engine and an async sessionmaker and ensure ModelView hooks use async-compatible code.

How do I restrict access to only admin users?

Implement an AuthenticationBackend and apply role checks inside is_accessible and is_visible on your ModelView classes or centrally on the Admin instance.

Built by
VeilStrat
AI signals for GTM teams
© 2026 VeilStrat. All rights reserved.All systems operational
sqladmin skill by jik92/sqladmin-skills | VeilStrat