Skip to main content

Build Status Publish Status Coverage Package version Supported Python versions


SQLAlchemy Admin dashboard

SQLAdmin is a flexible Admin interface for SQLAlchemy models.

Main features include:


Documentation: https://aminalaee.github.io/sqladmin

Source Code: https://github.com/encode/starlette

Online Demo: Demo


Installation

$ pip install sqladmin

Quickstart

Let's define an example SQLAlchemy model:

from sqlalchemy import Column, Integer, String, create_engine
from sqlalchemy.ext.declarative import declarative_base
from sqlalchemy.orm import sessionmaker


Base = declarative_base()
engine = create_engine(
    "sqlite:///example.db",
    connect_args={"check_same_thread": False},
)
Session = sessionmaker(bind=engine)
db = Session()


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 sqladmin import Admin, ModelAdmin


app = FastAPI()
admin = Admin(app, db)


class UserAdmin(ModelAdmin, model=User):
    column_list = [User.id, User.name]


admin.register_model(UserAdmin)

Or if you want to use SQLAdmin with Starlette:

from starlette.applications import Starlette
from sqladmin import Admin, ModelAdmin


app = Starlette()
admin = Admin(app, db)


class UserAdmin(ModelAdmin, model=User):
    column_list = [User.id, User.name]


admin.register_model(UserAdmin)

Now visiting /admin on your browser you can see the SQLAdmin interface.

Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

sqladmin-0.1.0.tar.gz (602.3 kB view details)

Uploaded Source

Built Distribution

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

sqladmin-0.1.0-py3-none-any.whl (606.8 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: sqladmin-0.1.0.tar.gz
  • Upload date:
  • Size: 602.3 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.7.1 importlib_metadata/4.10.0 pkginfo/1.8.2 requests/2.26.0 requests-toolbelt/0.9.1 tqdm/4.62.3 CPython/3.9.8

File hashes

Hashes for sqladmin-0.1.0.tar.gz
Algorithm Hash digest
SHA256 d31fc920951bc31f5c5d19c6e9af01dd07172fdbcc0e07eeb3c516770fbd7eaf
MD5 1a9617994dd69169cb4907fa2f3aa3b1
BLAKE2b-256 54484cf80662f8aec556704152b2f9d81e53d727e70b57d9c045d6b453ca6d7f

See more details on using hashes here.

File details

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

File metadata

  • Download URL: sqladmin-0.1.0-py3-none-any.whl
  • Upload date:
  • Size: 606.8 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.7.1 importlib_metadata/4.10.0 pkginfo/1.8.2 requests/2.26.0 requests-toolbelt/0.9.1 tqdm/4.62.3 CPython/3.9.8

File hashes

Hashes for sqladmin-0.1.0-py3-none-any.whl
Algorithm Hash digest
SHA256 fc6a6e957d46994b915e0ba4fd54d41abdda52b2abf024591167db0a69858602
MD5 af826b0497416ba11037b8f24e1b6845
BLAKE2b-256 bc98f0873ee0adfe6709ef63ebe6015fbc579f333ba37a75c3b8246f435fb79c

See more details on using hashes here.

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