Skip to main content
Python Software Foundation 20th Year Anniversary Fundraiser  Donate today!

Quickest way to build powerful HTTP APIs in Python

Project description


Quickly build API services to expose functionality in Python. kwikapi.django was built by using the functionality of KwikAPI and Django web server.


$ pip3 install kwikapi[django]


Create a Django project


$ django-admin startproject django_kwikapi

Create an app in Django

$ python3 startapp polls

Add your app name to


Make sure the contents of files be like this


from django.conf.urls import url, include
from django.contrib import admin

urlpatterns = [
    url(r'^', include('polls.urls'))


from django.conf.urls import url, include

from . import views
from kwikapi.django import RequestHandler

urlpatterns = [
    url(r'api/', RequestHandler(views.api).handle_request),

Example of django views


from django.http import HttpResponse
from kwikapi import API
from logging import Logger

class BaseCalc():
    def add(self, a: int, b: int) -> int:
        return a + b

    def subtract(self, a: int, b: int) -> int:
        return a - b

class StandardCalc():
    def multiply(self, a: int, b: int) -> int:
        return a * b

    def divide(self, a: int, b: int) -> float:
        return a / b

api = API(log=Logger, default_version='v1')
api.register(BaseCalc(), 'v1')
api.register(StandardCalc(), "v2")

Start Django

$ python3 makemigrations
$ python3 migrate
$ python3 runserver 8888

Make API request

$ curl "http://localhost:8888/api/v1/add?a=10&b=10"

To know how to use all features, please refer KwikAPI documentation

Project details

Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Files for kwikapi-django, version 0.2.8
Filename, size File type Python version Upload date Hashes
Filename, size kwikapi_django-0.2.8-py3-none-any.whl (4.5 kB) File type Wheel Python version py3 Upload date Hashes View
Filename, size kwikapi-django-0.2.8.tar.gz (3.4 kB) File type Source Python version None Upload date Hashes View

Supported by

AWS AWS Cloud computing Datadog Datadog Monitoring DigiCert DigiCert EV certificate Facebook / Instagram Facebook / Instagram PSF Sponsor Fastly Fastly CDN Google Google Object Storage and Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Salesforce Salesforce PSF Sponsor Sentry Sentry Error logging StatusPage StatusPage Status page