Skip to main content
Pre-release

This release is a pre-release and may not be stable for production use.

fjkit-admin

A Django-style admin for FastAPI. Register SQLAlchemy models, get a list with search, filters, sortable headers, pagination and bulk actions, plus add, change and delete forms. Every page is rendered by fjkit's macros and every interaction is an htmx swap, so the app ships no JavaScript of its own.

from fjkit import FjkitConfig, mount_fjkit
from fjkit_admin import AdminPlugin, ModelAdmin, action


class TaskAdmin(ModelAdmin, model=Task):
    list_display = ("title", "status", "project", "due")
    search_fields = ("title", "notes")
    list_filter = ("status", "project")
    ordering = ("-created",)

    @action("Mark done", confirm="Mark the selected tasks done?")
    def mark_done(self, request, session, tasks):
        for task in tasks:
            task.done = True
        return f"{len(tasks)} marked done"


admin = AdminPlugin(SessionLocal, views=(TaskAdmin,), url="/admin", base_template="base.html")
mount_fjkit(app, FjkitConfig(template_dir=TEMPLATES, plugins=(admin,)))

Options follow Django's ModelAdmin names: list_display, list_display_links, search_fields, list_filter, ordering, sortable_by, list_per_page, fields, exclude, readonly_fields, labels, help_texts, widgets, actions, plus @action for bulk actions and @display to name a method column; hooks get_queryset, has_view/add/change/delete_permission, save_model, delete_model, label_for.

Dependencies: fjkit and sqlalchemy>=2.0. A SQLModel table=True class registers like any mapped class; its own validators run on submit through model_validate.

0.1 is synchronous: pass sessionmaker(engine). Inline formsets and file upload are not in this version.

Metadata

Release files for fjkit-admin 0.1.0.dev0

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for fjkit-admin 0.1.0.dev0
File Size Uploaded Provenance Actions
fjkit_admin-0.1.0.dev0.tar.gz 32.0 kB Without provenance Details for fjkit_admin-0.1.0.dev0.tar.gz

Built distribution (wheel)

Table of built distributions (wheels) for fjkit-admin 0.1.0.dev0
File Interpreter ABI Platform Actions
fjkit_admin-0.1.0.dev0-py3-none-any.whl Python 3 none any Details for fjkit_admin-0.1.0.dev0-py3-none-any.whl

Total release size: 62.3 kB

Release files / fjkit_admin-0.1.0.dev0.tar.gz

Download URL fjkit_admin-0.1.0.dev0.tar.gz
Size 32.0 kB
Tags Source
SHA-256 checksum
How to use checksums
2701fb4d91b510590c1349690050fbd0c6c4257dd5543e693375b72f2e6030bd
BLAKE2b-256 checksum
How to use checksums
d0377adca591d6a7af5694f00417b8f57f476a4feafb7d20922f8e16d45f9201
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via uv/0.11.1 {"installer":{"name":"uv","version":"0.11.1","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"macOS","version":null,"id":null,"libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":null}

Release files / fjkit_admin-0.1.0.dev0-py3-none-any.whl

Download URL fjkit_admin-0.1.0.dev0-py3-none-any.whl
Size 30.3 kB
Tags Python 3
SHA-256 checksum
How to use checksums
e32fbeac11228b287dac5122d54519be22bc2171bd20ce77ccca051f7590f9da
BLAKE2b-256 checksum
How to use checksums
71caa93d1dd187e93dccbf470104cbd1ee958873b08da40290fd31aa68498d7e
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via uv/0.11.1 {"installer":{"name":"uv","version":"0.11.1","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"macOS","version":null,"id":null,"libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":null}

Security for fjkit-admin 0.1.0.dev0

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.

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page