sqladmin-litestar


Namesqladmin-litestar JSON
Version 0.16.1 PyPI version JSON
download
home_pageNone
SummarySQLAlchemy admin for Litestar
upload_time2024-02-05 14:40:44
maintainerNone
docs_urlNone
authorNone
requires_python>=3.8
licenseNone
keywords admin litestar sqlalchemy
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>

---
# This is the port of Sqladmin to Litestar WIP 
# There may be breaking changes, probably will


# SQLAlchemy Admin for Litestar

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-litestar",
    "maintainer": null,
    "docs_url": null,
    "requires_python": ">=3.8",
    "maintainer_email": null,
    "keywords": "admin,litestar,sqlalchemy",
    "author": null,
    "author_email": "Amin Alaee <me@aminalaee.dev>, Cemrehan \u00c7avdar <cemrehancavdar@hotmail.com>",
    "download_url": "https://files.pythonhosted.org/packages/69/bf/d86c90a56be6ea7a5ae6cf8af760be63f45d109e079e7278340b6db6fec0/sqladmin_litestar-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# This is the port of Sqladmin to Litestar WIP \n# There may be breaking changes, probably will\n\n\n# SQLAlchemy Admin for Litestar\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 Litestar",
    "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",
        "litestar",
        "sqlalchemy"
    ],
    "urls": [
        {
            "comment_text": null,
            "digests": {
                "blake2b_256": "c9f709077de28dc26407e7f8c77a579c3acf57a8e8ea46dc48bd6490047aa430",
                "md5": "cdd436a7cd8d852059517b55563de9c3",
                "sha256": "a6811974ac0e1677b754056698b40a502cd4613d4573cacf7ff07a370c635d05"
            },
            "downloads": -1,
            "filename": "sqladmin_litestar-0.16.1-py3-none-any.whl",
            "has_sig": false,
            "md5_digest": "cdd436a7cd8d852059517b55563de9c3",
            "packagetype": "bdist_wheel",
            "python_version": "py3",
            "requires_python": ">=3.8",
            "size": 559845,
            "upload_time": "2024-02-05T14:40:46",
            "upload_time_iso_8601": "2024-02-05T14:40:46.865922Z",
            "url": "https://files.pythonhosted.org/packages/c9/f7/09077de28dc26407e7f8c77a579c3acf57a8e8ea46dc48bd6490047aa430/sqladmin_litestar-0.16.1-py3-none-any.whl",
            "yanked": false,
            "yanked_reason": null
        },
        {
            "comment_text": null,
            "digests": {
                "blake2b_256": "69bfd86c90a56be6ea7a5ae6cf8af760be63f45d109e079e7278340b6db6fec0",
                "md5": "55470b9f1f0e447efe5dd52dc6bce493",
                "sha256": "8a81c9bb20028f658e221d69c2a581396eee375c3e3c7e1a7047e71483457bd1"
            },
            "downloads": -1,
            "filename": "sqladmin_litestar-0.16.1.tar.gz",
            "has_sig": false,
            "md5_digest": "55470b9f1f0e447efe5dd52dc6bce493",
            "packagetype": "sdist",
            "python_version": "source",
            "requires_python": ">=3.8",
            "size": 544462,
            "upload_time": "2024-02-05T14:40:44",
            "upload_time_iso_8601": "2024-02-05T14:40:44.988355Z",
            "url": "https://files.pythonhosted.org/packages/69/bf/d86c90a56be6ea7a5ae6cf8af760be63f45d109e079e7278340b6db6fec0/sqladmin_litestar-0.16.1.tar.gz",
            "yanked": false,
            "yanked_reason": null
        }
    ],
    "upload_time": "2024-02-05 14:40:44",
    "github": true,
    "gitlab": false,
    "bitbucket": false,
    "codeberg": false,
    "github_user": "aminalaee",
    "github_project": "sqladmin",
    "travis_ci": false,
    "coveralls": false,
    "github_actions": true,
    "lcname": "sqladmin-litestar"
}
        
Elapsed time: 0.18456s