Name | sqladmin JSON |
Version |
0.16.1
JSON |
| download |
home_page | None |
Summary | SQLAlchemy admin for FastAPI and Starlette |
upload_time | 2024-02-21 15:17:23 |
maintainer | None |
docs_url | None |
author | None |
requires_python | >=3.8 |
license | None |
keywords |
admin
fastapi
sqlalchemy
starlette
|
VCS |
|
bugtrack_url |
|
requirements |
No requirements were recorded.
|
Travis-CI |
No Travis.
|
coveralls test coverage |
No coveralls.
|
<p align="center">
<a href="https://github.com/aminalaee/sqladmin">
<img width="400px" src="https://raw.githubusercontent.com/aminalaee/sqladmin/main/docs/assets/images/banner.png" alt"SQLAdmin">
</a>
</p>
<p align="center">
<a href="https://github.com/aminalaee/sqladmin/actions">
<img src="https://github.com/aminalaee/sqladmin/workflows/Test%20Suite/badge.svg" alt="Build Status">
</a>
<a href="https://github.com/aminalaee/sqladmin/actions">
<img src="https://github.com/aminalaee/sqladmin/workflows/Publish/badge.svg" alt="Publish Status">
</a>
<a href="https://codecov.io/gh/aminalaee/sqladmin">
<img src="https://codecov.io/gh/aminalaee/sqladmin/branch/main/graph/badge.svg" alt="Coverage">
</a>
<a href="https://pypi.org/project/sqladmin/">
<img src="https://badge.fury.io/py/sqladmin.svg" alt="Package version">
</a>
<a href="https://pypi.org/project/sqladmin" target="_blank">
<img src="https://img.shields.io/pypi/pyversions/sqladmin.svg?color=%2334D058" alt="Supported Python versions">
</a>
</p>
---
# SQLAlchemy Admin for Starlette/FastAPI
SQLAdmin is a flexible Admin interface for SQLAlchemy models.
Main features include:
* [SQLAlchemy](https://github.com/sqlalchemy/sqlalchemy) sync/async engines
* [Starlette](https://github.com/encode/starlette) integration
* [FastAPI](https://github.com/tiangolo/fastapi) integration
* [WTForms](https://github.com/wtforms/wtforms) form building
* [SQLModel](https://github.com/tiangolo/sqlmodel) support
* UI using [Tabler](https://github.com/tabler/tabler)
---
**Documentation**: [https://aminalaee.dev/sqladmin](https://aminalaee.dev/sqladmin)
**Source Code**: [https://github.com/aminalaee/sqladmin](https://github.com/aminalaee/sqladmin)
**Online Demo**: [Demo](https://sqladmin-demo.aminalaee.dev/admin/)
---
## Installation
Install using `pip`:
```shell
$ pip install sqladmin
```
This will install the full version of sqladmin with optional dependencies:
```shell
$ pip install "sqladmin[full]"
```
---
## Screenshots
<img width="1492" alt="sqladmin-1" src="https://user-images.githubusercontent.com/19784933/208232730-0114a155-2740-4e89-9d73-64a4e51a5cf5.png">
<img width="1492" alt="sqladmin-2" src="https://user-images.githubusercontent.com/19784933/208232731-6d783dde-b93e-41c0-911b-3d1c3c73f1d5.png">
## Quickstart
Let's define an example SQLAlchemy model:
```python
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`:
```python
from fastapi import FastAPI
from 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`:
```python
from 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.
## Related projects and inspirations
* [Flask-Admin](https://github.com/flask-admin/flask-admin) Admin interface for Flask supporting different database backends and ORMs. This project has inspired SQLAdmin extensively and most of the features and configurations are implemented the same.
* [FastAPI-Admin](https://github.com/fastapi-admin/fastapi-admin) Admin interface for FastAPI which works with `TortoiseORM`.
* [Dashboard](https://github.com/encode/dashboard) Admin interface for ASGI frameworks which works with the `orm` package.
Raw data
{
"_id": null,
"home_page": null,
"name": "sqladmin",
"maintainer": null,
"docs_url": null,
"requires_python": ">=3.8",
"maintainer_email": null,
"keywords": "admin,fastapi,sqlalchemy,starlette",
"author": null,
"author_email": "Amin Alaee <me@aminalaee.dev>",
"download_url": "https://files.pythonhosted.org/packages/8a/dd/bbbf96dccdc26cfc9650a1acd28ce5fb2d6a277818099e121e408bc3ac37/sqladmin-0.16.1.tar.gz",
"platform": null,
"description": "<p align=\"center\">\n<a href=\"https://github.com/aminalaee/sqladmin\">\n <img width=\"400px\" src=\"https://raw.githubusercontent.com/aminalaee/sqladmin/main/docs/assets/images/banner.png\" alt\"SQLAdmin\">\n</a>\n</p>\n\n<p align=\"center\">\n<a href=\"https://github.com/aminalaee/sqladmin/actions\">\n <img src=\"https://github.com/aminalaee/sqladmin/workflows/Test%20Suite/badge.svg\" alt=\"Build Status\">\n</a>\n<a href=\"https://github.com/aminalaee/sqladmin/actions\">\n <img src=\"https://github.com/aminalaee/sqladmin/workflows/Publish/badge.svg\" alt=\"Publish Status\">\n</a>\n<a href=\"https://codecov.io/gh/aminalaee/sqladmin\">\n <img src=\"https://codecov.io/gh/aminalaee/sqladmin/branch/main/graph/badge.svg\" alt=\"Coverage\">\n</a>\n<a href=\"https://pypi.org/project/sqladmin/\">\n <img src=\"https://badge.fury.io/py/sqladmin.svg\" alt=\"Package version\">\n</a>\n<a href=\"https://pypi.org/project/sqladmin\" target=\"_blank\">\n <img src=\"https://img.shields.io/pypi/pyversions/sqladmin.svg?color=%2334D058\" alt=\"Supported Python versions\">\n</a>\n</p>\n\n---\n\n# SQLAlchemy Admin for Starlette/FastAPI\n\nSQLAdmin is a flexible Admin interface for SQLAlchemy models.\n\nMain features include:\n\n* [SQLAlchemy](https://github.com/sqlalchemy/sqlalchemy) sync/async engines\n* [Starlette](https://github.com/encode/starlette) integration\n* [FastAPI](https://github.com/tiangolo/fastapi) integration\n* [WTForms](https://github.com/wtforms/wtforms) form building\n* [SQLModel](https://github.com/tiangolo/sqlmodel) support\n* UI using [Tabler](https://github.com/tabler/tabler)\n\n---\n\n**Documentation**: [https://aminalaee.dev/sqladmin](https://aminalaee.dev/sqladmin)\n\n**Source Code**: [https://github.com/aminalaee/sqladmin](https://github.com/aminalaee/sqladmin)\n\n**Online Demo**: [Demo](https://sqladmin-demo.aminalaee.dev/admin/)\n\n---\n\n## Installation\n\nInstall using `pip`:\n\n```shell\n$ pip install sqladmin\n```\n\nThis will install the full version of sqladmin with optional dependencies:\n\n```shell\n$ pip install \"sqladmin[full]\"\n```\n\n---\n\n## Screenshots\n\n<img width=\"1492\" alt=\"sqladmin-1\" src=\"https://user-images.githubusercontent.com/19784933/208232730-0114a155-2740-4e89-9d73-64a4e51a5cf5.png\">\n<img width=\"1492\" alt=\"sqladmin-2\" src=\"https://user-images.githubusercontent.com/19784933/208232731-6d783dde-b93e-41c0-911b-3d1c3c73f1d5.png\">\n\n## Quickstart\n\nLet's define an example SQLAlchemy model:\n\n```python\nfrom sqlalchemy import Column, Integer, String, create_engine\nfrom sqlalchemy.orm import declarative_base\n\n\nBase = declarative_base()\nengine = create_engine(\n \"sqlite:///example.db\",\n connect_args={\"check_same_thread\": False},\n)\n\n\nclass User(Base):\n __tablename__ = \"users\"\n\n id = Column(Integer, primary_key=True)\n name = Column(String)\n\n\nBase.metadata.create_all(engine) # Create tables\n```\n\nIf you want to use `SQLAdmin` with `FastAPI`:\n\n```python\nfrom fastapi import FastAPI\nfrom sqladmin import Admin, ModelView\n\n\napp = FastAPI()\nadmin = Admin(app, engine)\n\n\nclass UserAdmin(ModelView, model=User):\n column_list = [User.id, User.name]\n\n\nadmin.add_view(UserAdmin)\n```\n\nOr if you want to use `SQLAdmin` with `Starlette`:\n\n```python\nfrom sqladmin import Admin, ModelView\nfrom starlette.applications import Starlette\n\n\napp = Starlette()\nadmin = Admin(app, engine)\n\n\nclass UserAdmin(ModelView, model=User):\n column_list = [User.id, User.name]\n\n\nadmin.add_view(UserAdmin)\n```\n\nNow visiting `/admin` on your browser you can see the `SQLAdmin` interface.\n\n## Related projects and inspirations\n\n* [Flask-Admin](https://github.com/flask-admin/flask-admin) Admin interface for Flask supporting different database backends and ORMs. This project has inspired SQLAdmin extensively and most of the features and configurations are implemented the same.\n* [FastAPI-Admin](https://github.com/fastapi-admin/fastapi-admin) Admin interface for FastAPI which works with `TortoiseORM`.\n* [Dashboard](https://github.com/encode/dashboard) Admin interface for ASGI frameworks which works with the `orm` package.\n",
"bugtrack_url": null,
"license": null,
"summary": "SQLAlchemy admin for FastAPI and Starlette",
"version": "0.16.1",
"project_urls": {
"Documentation": "https://aminalaee.dev/sqladmin",
"Issues": "https://github.com/aminalaee/sqladmin/issues",
"Source": "https://github.com/aminalaee/sqladmin"
},
"split_keywords": [
"admin",
"fastapi",
"sqlalchemy",
"starlette"
],
"urls": [
{
"comment_text": null,
"digests": {
"blake2b_256": "68dbd8ef9dd3739e271568ebab6870cfdfc8dddbc189fe79742da0eb3b8bb9d9",
"md5": "7757d92b7c369eb879009d87f16ef809",
"sha256": "eb90d453740a5749e5f9701e1d4d35d4db9c54f5d907f0705873e2aa0ac2913f"
},
"downloads": -1,
"filename": "sqladmin-0.16.1-py3-none-any.whl",
"has_sig": false,
"md5_digest": "7757d92b7c369eb879009d87f16ef809",
"packagetype": "bdist_wheel",
"python_version": "py3",
"requires_python": ">=3.8",
"size": 559084,
"upload_time": "2024-02-21T15:17:21",
"upload_time_iso_8601": "2024-02-21T15:17:21.139089Z",
"url": "https://files.pythonhosted.org/packages/68/db/d8ef9dd3739e271568ebab6870cfdfc8dddbc189fe79742da0eb3b8bb9d9/sqladmin-0.16.1-py3-none-any.whl",
"yanked": false,
"yanked_reason": null
},
{
"comment_text": null,
"digests": {
"blake2b_256": "8addbbbf96dccdc26cfc9650a1acd28ce5fb2d6a277818099e121e408bc3ac37",
"md5": "6970c2b869c37cdbf46d3c22f086922d",
"sha256": "5d43ddf5bdca05fe5e806d9d328268f96adae37558dbd0aad2fc57e0f660ba83"
},
"downloads": -1,
"filename": "sqladmin-0.16.1.tar.gz",
"has_sig": false,
"md5_digest": "6970c2b869c37cdbf46d3c22f086922d",
"packagetype": "sdist",
"python_version": "source",
"requires_python": ">=3.8",
"size": 543851,
"upload_time": "2024-02-21T15:17:23",
"upload_time_iso_8601": "2024-02-21T15:17:23.215463Z",
"url": "https://files.pythonhosted.org/packages/8a/dd/bbbf96dccdc26cfc9650a1acd28ce5fb2d6a277818099e121e408bc3ac37/sqladmin-0.16.1.tar.gz",
"yanked": false,
"yanked_reason": null
}
],
"upload_time": "2024-02-21 15:17:23",
"github": true,
"gitlab": false,
"bitbucket": false,
"codeberg": false,
"github_user": "aminalaee",
"github_project": "sqladmin",
"travis_ci": false,
"coveralls": false,
"github_actions": true,
"lcname": "sqladmin"
}