API Server Django
Open-source API Server crafted in Django using DRF (Django REST Framework)
Simple starter built with Python / Django Rest / Sqlite3 and JWT Auth. The authentication flow is based on json web tokens. The product comes with a simple, intuitive codebase, DRF integration, SQLite for persistence JWT Authentication API, Docker, and unitary tests.
API Methods - for full description please access API Unified Definition​
    USERS API:
      /api/users/register: create a new user
      /api/users/login: authenticate an existing user
      /api/users/logout: delete the associated JWT token
      /api/users/checkSession: check an existing JWT Token for validity
      /api/users/edit - edit the information associated with a registered user
Django API Server - Open-source Product.

Requirements

    Python3 (Python2 is not supported)
    Django==3.2.5
    djangorestframework==3.12.4
    PyJWT==2.1.0
    django-cors-headers==3.7.0
​

How to use the code

Step #1 - Clone the sources
1
$ git clone https://github.com/app-generator/api-server-django.git
2
$ cd api-server-django
Copied!
Step #2 - Create a virtual environment
1
$ virtualenv -p python3 venv
2
$ source venv/bin/activate
Copied!
Step #3- Install dependencies using pip
1
$ pip install -r requirements.txt
Copied!
Step #4 - Start the API Server
1
$ python manage.py migrate
2
$ python manage.py runserver
Copied!
The API server will start using the default port 8000.
​

Docker execution

Step #1 - Get the code
1
$ git clone https://github.com/app-generator/api-server-django.git
2
$ cd api-server-django
Copied!
step #2 - Start the app in Docker
1
$ docker-compose up -d --build
Copied!
Visit http://localhost:5000 in your browser. The API server will be running.

Compatible Fullstack Products

The product can be used as a standalone server but also as an authentication server for React, Vue products. Such a product already configured with Django API Server is React Datta Able, an open-source React Dashboard.
React Datta Able - Open-Source Dashboard
Last modified 2mo ago