Giter Site home page Giter Site logo

ilya-green / starlette-admin Goto Github PK

View Code? Open in Web Editor NEW

This project forked from jowilf/starlette-admin

0.0 0.0 0.0 3.46 MB

Fast, beautiful and extensible administrative interface framework for Starlette & FastApi applications

Home Page: https://jowilf.github.io/starlette-admin/

License: MIT License

Shell 0.03% JavaScript 10.71% Python 75.76% CSS 0.12% HTML 13.39%

starlette-admin's Introduction

starlette-admin

Starlette-Admin is a fast, beautiful and extensible administrative interface framework for Starlette/FastApi applications.

Test suite Publish Codecov Package version Supported Python versions

Preview image

Getting started

Features

  • CRUD any data with ease
  • Automatic form validation
  • Advanced table widget with Datatables
  • Search and filtering
  • Search highlighting
  • Multi-column ordering
  • Export data to CSV/EXCEL/PDF and Browser Print
  • Authentication
  • Authorization
  • Manage Files
  • Custom views
  • Custom batch actions
  • Supported ORMs
  • Internationalization

Installation

PIP

$ pip install starlette-admin

Poetry

$ poetry add starlette-admin

Example

This is a simple example with SQLAlchemy model

from sqlalchemy import Column, Integer, String, create_engine
from sqlalchemy.ext.declarative import declarative_base
from starlette.applications import Starlette
from starlette_admin.contrib.sqla import Admin, ModelView

Base = declarative_base()
engine = create_engine("sqlite:///test.db", connect_args={"check_same_thread": False})


# Define your model
class Post(Base):
    __tablename__ = "posts"

    id = Column(Integer, primary_key=True)
    title = Column(String)


Base.metadata.create_all(engine)

app = Starlette()  # FastAPI()

# Create admin
admin = Admin(engine, title="Example: SQLAlchemy")

# Add view
admin.add_view(ModelView(Post))

# Mount admin to your app
admin.mount_to(app)

Access your admin interface in your browser at http://localhost:8000/admin

Third party

starlette-admin is built with other open source projects:

Contributing

Contributions are welcome and greatly appreciated! Before getting started, please read our contribution guidelines

starlette-admin's People

Contributors

jowilf avatar ilya-green avatar dependabot[bot] avatar pre-commit-ci[bot] avatar ihuro avatar rafnixg avatar dolamroth avatar giaptx avatar sinisaos avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.