All Projects → encode → dashboard

encode / dashboard

Licence: BSD-3-Clause license
An admin interface for ASGI Web frameworks.

Programming Languages

python
139335 projects - #7 most used programming language
HTML
75241 projects
shell
77523 projects
CSS
56736 projects

Projects that are alternatives of or similar to dashboard

fastapi-zeit-now
A simple example of deploying FastAPI as a Zeit Serverless Function
Stars: ✭ 24 (-80%)
Mutual labels:  asgi
webargs-starlette
Declarative request parsing and validation for Starlette with webargs
Stars: ✭ 36 (-70%)
Mutual labels:  asgi
fastAPI-aiohttp-example
How to use and test fastAPI with an aiohttp client
Stars: ✭ 69 (-42.5%)
Mutual labels:  asgi
msgpack-asgi
Drop-in MessagePack support for ASGI applications and frameworks
Stars: ✭ 100 (-16.67%)
Mutual labels:  asgi
mangum-cli
CLI tools for use with Mangum
Stars: ✭ 14 (-88.33%)
Mutual labels:  asgi
Uvicorn
The lightning-fast ASGI server. 🦄
Stars: ✭ 4,676 (+3796.67%)
Mutual labels:  asgi
spectree
API spec validator and OpenAPI document generator for Python web frameworks.
Stars: ✭ 190 (+58.33%)
Mutual labels:  asgi
fastapi-project
FastAPI application without global variables(almost) =)
Stars: ✭ 26 (-78.33%)
Mutual labels:  asgi
hypercorn-fastapi-docker
Docker image with Hypercorn for FastAPI apps in Python 3.7, 3.8, 3.9. Ready for HTTP2 and HTTPS
Stars: ✭ 18 (-85%)
Mutual labels:  asgi
json-head
JSON microservice for performing HEAD requests
Stars: ✭ 31 (-74.17%)
Mutual labels:  asgi
nardis
A small web framework based on ASGI
Stars: ✭ 14 (-88.33%)
Mutual labels:  asgi
channels-asgi-mqtt
Interface between MQTT and ASGI and Channels 2.0 compatible
Stars: ✭ 36 (-70%)
Mutual labels:  asgi
Datasette
An open source multi-tool for exploring and publishing data
Stars: ✭ 5,640 (+4600%)
Mutual labels:  asgi
serverless-mangum-examples
Example ASGI applications and Serverless Framework configurations using Mangum
Stars: ✭ 26 (-78.33%)
Mutual labels:  asgi
mongox
Familiar async Python MongoDB ODM
Stars: ✭ 113 (-5.83%)
Mutual labels:  asgi
geiss
An protocol server for django channels 1 written in go
Stars: ✭ 27 (-77.5%)
Mutual labels:  asgi
starlette-graphene3
An ASGI app for using Graphene v3 with Starlette / FastAPI
Stars: ✭ 52 (-56.67%)
Mutual labels:  asgi
async-asgi-testclient
A framework-agnostic library for testing ASGI web applications
Stars: ✭ 123 (+2.5%)
Mutual labels:  asgi
asgi-caches
Server-side HTTP caching for ASGI applications, inspired by Django's cache framework
Stars: ✭ 18 (-85%)
Mutual labels:  asgi
Sanic
Async Python 3.7+ web server/framework | Build fast. Run fast.
Stars: ✭ 15,660 (+12950%)
Mutual labels:  asgi

An admin dashboard for use with ASGI web frameworks.

dashboard is still under development: We recommend pinning any dependencies with dashboard~=0.1

example.py

from starlette.applications import Starlette
from starlette.routing import Mount, Route
from starlette.responses import RedirectResponse
import databases
import dashboard
import orm
import datetime


database = databases.Database("sqlite:///test.db")
models = orm.ModelRegistry(database=database)


class Notes(orm.Model):
    registry = models
    tablename = "notes"
    fields = {
        "id": orm.Integer(title="ID", primary_key=True),
        "created": orm.DateTime(
            title="Created", default=datetime.datetime.now, read_only=True
        ),
        "text": orm.String(title="Text", max_length=100),
        "completed": orm.Boolean(title="Completed", default=False),
    }


admin = dashboard.Dashboard(
    tables=[
        dashboard.DashboardTable(
            ident="notes", title="Notes", datasource=Notes.objects.order_by("-id")
        ),
    ]
)


routes = [
    Mount("/admin", app=admin, name="dashboard"),
    Route("/", endpoint=RedirectResponse(url="/admin")),
]

app = Starlette(
    debug=True,
    routes=routes,
    on_startup=[database.connect],
    on_shutdown=[database.disconnect],
)

Rough installation...

$ virtualenv venv
$ venv/bin/pip install dashboard
$ venv/bin/python
>>> from example import models
>>> models.create_all()
$ venv/bin/uvicorn example:app

With many thanks to Eren Güven (Twitter, GitHub) for the dashboard PyPI package name.

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].