Skip to content

Introduction

Django API router component.

Inspired by FastAPI and Django Rest Framework.

tests codecov Documentation Status Code style: black version license


Installing

Install using pip:

pip install django-apirouter

Example

In Django project urls.py:

from apirouter import APIRouter, Response, Request

router = APIRouter()


@router.route("/hello")
def index(request: Request):
    return Response("Hello, Django APIRouter!")


urlpatterns = router.urls