⚠️ Not Production Ready ⚠️
pyfost.adminui
Fost Admin / CRUD frontend
Table of Contents
Installation
pip install pyfost.adminui
Usage
Basic usage:
from __future__ import annotations
from my_app import get_fastapi_app
from pyfost.adminui import Admin
from pyfost.adminui import AdminModel, Field
# Define your models and their getters:
class Author(AdminModel):
id : int
name: str
def get_authors()->list[Author]:
# fetch all authors here
...
class Book(AdminModel):
id: int
title: str
author: Author|None = None
async def get_books()->list[Book]:
# fetch all books here
# Note: this can be async
...
# Configure your admin:
admin = Admin("/book_management")
admin.add_view(Author, get_authors)
admin.add_view(Book, get_books)
# Add the admin pages to your fastapi app:
app = get_fastapi_app()
admin.add_to(app)
ui.run_with(app)
# Now run your app and navigate to the `/book_management` page.
Customization
You can customize your admin pages by providing column and field renderers, by adding render methods to your models, etc... See examples for more details.
Examples
There are example usage in the pyfost.adminui.examples module.
You can run them with python -m pyfost.adminui.examples.<example_name>
Then browse to http://0.0.0.0:8001/admin
License
pyfost.adminui is distributed under the terms of the GNU GPL-3.0 or later license.
Metadata
Release files for pyfost.adminui 0.1.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 | Provenance | Actions |
|---|---|---|---|---|
| pyfost_adminui-0.1.4.tar.gz | 24.9 kB | Without provenance | Details for pyfost_adminui-0.1.4.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| pyfost_adminui-0.1.4-py3-none-any.whl | Python 3 | none | any | Details for pyfost_adminui-0.1.4-py3-none-any.whl |
Total release size: 52.6 kB
Release files / pyfost_adminui-0.1.4.tar.gz
| Download URL | pyfost_adminui-0.1.4.tar.gz |
|---|---|
| Size | 24.9 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
cacdd42d37b48c0eefa5042aadc9ca29ed21e8b170d137f39b16b08fb40da53c
|
|
BLAKE2b-256 checksum How to use checksums |
79c2cd4cd66c0966126098bf945b2697a898656e9c6896c4d3902036dccceb95
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
python-httpx/0.28.1
|
Release files / pyfost_adminui-0.1.4-py3-none-any.whl
| Download URL | pyfost_adminui-0.1.4-py3-none-any.whl |
|---|---|
| Size | 27.7 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
3b825c249465974a4f71a187860dfb9002a2e2c423f381b11a4692eddfd8aa1c
|
|
BLAKE2b-256 checksum How to use checksums |
09056a34deaf4031aaa16949c08de1c62fc14f70168c95efa03c67de02c394f7
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
python-httpx/0.28.1
|
Security for pyfost.adminui 0.1.4
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
No provenance found
None of the files in this release were uploaded with provenance metadata.
A note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.