X-Admin
Simplest fastest minimal ASGI CRUD Admin panel for Tortoise ORM models
It's generating fully native async auto zero config one line app
Requirements
- Python >= 3.11
INSTALL
pip install x-admin
Run your app
- Describe your db models with Tortoise ORM in
models.pymodule
from tortoise import fields
from tortoise_api import Model
class User(Model):
id: int = fields.IntField(pk=True)
name: str = fields.CharField(255, unique=True, null=False)
posts: fields.ReverseRelation["Post"]
class Post(Model):
id: int = fields.IntField(pk=True)
text: str = fields.CharField(4095)
user: User = fields.ForeignKeyField('models.User', related_name='posts')
_name = 'text' # `_name` sets the attr for displaying related Post instace inside User (default='name')
- Write run script
main.py: pass your models module in Api app:
from x_admin import Admin
import models
app = Admin().start(models)
- Set
DB_URLenv variable in.envfile - Run it:
uvicorn main:app
Or you can just fork Completed minimal runnable example from sample apps.
And voila:
You have menu with all your models at root app route: http://127.0.0.1:8000
Made with ❤ on top of the Starlette, TortoiseORM, X-API.
Metadata
Release files for femto-admin 0.7.4
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | |
|---|---|---|---|
| femto_admin-0.7.4.tar.gz | 4.4 MB | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| femto_admin-0.7.4-py3-none-any.whl | Python 3 | none | any | Details |
Total release size: 8.9 MB
Release files / femto_admin-0.7.4.tar.gz
| Download URL | femto_admin-0.7.4.tar.gz |
|---|---|
| Size | 4.4 MB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
36a164f0deeef9f2bae6a28212c6ffbcefeb06bc1779ab2bebe22106b2bfeaaf
|
|
BLAKE2b-256 checksum How to use checksums |
6a9ffa50d721eeef85f2e6e39898547068a2b02840bcfd542d5ec43ae8121f7d
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/5.1.1 CPython/3.11.9
|
Release files / femto_admin-0.7.4-py3-none-any.whl
| Download URL | femto_admin-0.7.4-py3-none-any.whl |
|---|---|
| Size | 4.4 MB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
31c809092b52b8dfb6b0b452b1815fd75a848b45866432371c404cd2ee43942a
|
|
BLAKE2b-256 checksum How to use checksums |
12660266af9b12eadbfdea18e7f59b7f15c1a3ec26da7fce10781c5cfabbedbd
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/5.1.1 CPython/3.11.9
|