# Femto 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.9
### INSTALL
```bash
pip install femto-admin
```
### Run your app
- Describe your db models with Tortoise ORM in `models.py` module
```python
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:
```python
from femto_admin import Admin
import models
app = Admin().start(models)
```
- Set `DB_URL` env variable in `.env` file
- Run it:
```bash
uvicorn main:app
```
Or you can just fork Completed minimal runnable example from [sample apps](https://github.com/mixartemev/femto-admin/blob/master/sample_apps/minimal/).
#### 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](https://www.starlette.io/), [TortoiseORM](https://tortoise.github.io/), [TortoiseAPI](https://pypi.org/project/tortoise-api/).
Raw data
{
"_id": null,
"home_page": "",
"name": "femto-admin",
"maintainer": "",
"docs_url": null,
"requires_python": ">=3.11",
"maintainer_email": "",
"keywords": "starlette,fastapi,admin,dashboard,datatables,crud,tortoise-orm,ASGI-admin",
"author": "",
"author_email": "Artemiev <mixartemev@gmail.com>",
"download_url": "https://files.pythonhosted.org/packages/74/ea/b275a780c4e630c73ada9f29847067cc62aa8cc406575af93354dcbd651e/femto-admin-0.3.3.tar.gz",
"platform": null,
"description": "# Femto Admin\n###### Simplest fastest minimal ASGI CRUD Admin panel for Tortoise ORM models\nIt's generating fully native async auto zero config one line app \n#### Requirements\n- Python >= 3.9\n\n### INSTALL\n```bash\npip install femto-admin\n```\n\n### Run your app\n- Describe your db models with Tortoise ORM in `models.py` module\n```python\nfrom tortoise import fields\nfrom tortoise_api import Model\n\nclass User(Model):\n id: int = fields.IntField(pk=True)\n name: str = fields.CharField(255, unique=True, null=False)\n posts: fields.ReverseRelation[\"Post\"]\n\nclass Post(Model):\n id: int = fields.IntField(pk=True)\n text: str = fields.CharField(4095)\n user: User = fields.ForeignKeyField('models.User', related_name='posts')\n _name = 'text' # `_name` sets the attr for displaying related Post instace inside User (default='name')\n```\n- Write run script `main.py`: pass your models module in Api app:\n```python\nfrom femto_admin import Admin\nimport models\n\napp = Admin().start(models)\n```\n- Set `DB_URL` env variable in `.env` file\n- Run it:\n```bash\nuvicorn main:app\n```\nOr you can just fork Completed minimal runnable example from [sample apps](https://github.com/mixartemev/femto-admin/blob/master/sample_apps/minimal/).\n\n#### And voila:\nYou have menu with all your models at root app route: http://127.0.0.1:8000\n\n\n---\nMade with \u2764 on top of the [Starlette](https://www.starlette.io/), [TortoiseORM](https://tortoise.github.io/), [TortoiseAPI](https://pypi.org/project/tortoise-api/).\n",
"bugtrack_url": null,
"license": "MIT",
"summary": "Simplest fastest minimal ASGI CRUD Admin panel for Tortoise ORM models. It's generating fully native async auto zero config one line app",
"version": "0.3.3",
"project_urls": {
"Homepage": "https://github.com/mixartemev/femto-admin",
"Repository": "https://github.com/mixartemev/femto-admin"
},
"split_keywords": [
"starlette",
"fastapi",
"admin",
"dashboard",
"datatables",
"crud",
"tortoise-orm",
"asgi-admin"
],
"urls": [
{
"comment_text": "",
"digests": {
"blake2b_256": "29d399c14aa643c63764af93180f38db90441bc6f742f10c9ca75e8456e038ae",
"md5": "6ff560fb44860056e7b04911e21ef465",
"sha256": "300203b7af0a739cdaba4d232c9c14537589054931ee1635735208c6b3a1e984"
},
"downloads": -1,
"filename": "femto_admin-0.3.3-py3-none-any.whl",
"has_sig": false,
"md5_digest": "6ff560fb44860056e7b04911e21ef465",
"packagetype": "bdist_wheel",
"python_version": "py3",
"requires_python": ">=3.11",
"size": 4431296,
"upload_time": "2023-09-14T19:39:50",
"upload_time_iso_8601": "2023-09-14T19:39:50.523528Z",
"url": "https://files.pythonhosted.org/packages/29/d3/99c14aa643c63764af93180f38db90441bc6f742f10c9ca75e8456e038ae/femto_admin-0.3.3-py3-none-any.whl",
"yanked": false,
"yanked_reason": null
},
{
"comment_text": "",
"digests": {
"blake2b_256": "74eab275a780c4e630c73ada9f29847067cc62aa8cc406575af93354dcbd651e",
"md5": "5cb3c0cda8d168ea5f209a22cdba9a9b",
"sha256": "d316764e46522984a08742b76ec4a829b068e1feeb4cb484a0e683234904964f"
},
"downloads": -1,
"filename": "femto-admin-0.3.3.tar.gz",
"has_sig": false,
"md5_digest": "5cb3c0cda8d168ea5f209a22cdba9a9b",
"packagetype": "sdist",
"python_version": "source",
"requires_python": ">=3.11",
"size": 4408111,
"upload_time": "2023-09-14T19:39:54",
"upload_time_iso_8601": "2023-09-14T19:39:54.928799Z",
"url": "https://files.pythonhosted.org/packages/74/ea/b275a780c4e630c73ada9f29847067cc62aa8cc406575af93354dcbd651e/femto-admin-0.3.3.tar.gz",
"yanked": false,
"yanked_reason": null
}
],
"upload_time": "2023-09-14 19:39:54",
"github": true,
"gitlab": false,
"bitbucket": false,
"codeberg": false,
"github_user": "mixartemev",
"github_project": "femto-admin",
"travis_ci": false,
"coveralls": false,
"github_actions": false,
"lcname": "femto-admin"
}