Skip to content

REST API developed for an experiment of a boilerplate/Scaffold with Django Framework. This application works with the following tech stacks: Python3, Django Rest, WSGI Server and SQLite Database.

License

Notifications You must be signed in to change notification settings

cicerokze/django-restapi

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

8 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

django-restapi

REST API Application developed with:

  • Python3
  • Django Rest
  • WSGI Server
  • SQLite Database
Buy Me A Coffee

Description

  • REST API developed for an experiment of a boilerplate/Scaffold with Django Framework. This application works with the following tech stacks: Python3, Django Rest, WSGI Server and SQLite Database.

Installation

1 - Make sure you have Python3 installed in your machine

2 - Create a virtual environment to isolate package dependencies locally

$ python3 -m venv env
$ source env/bin/activate  # On Windows use `env\Scripts\activate`

3 - Install Django and Django REST framework into the virtual environment

$ pip install djangorestframework

4 - Generate Database

$ python3 manage.py migrate

5 - Create an admin user to make requests

$ python3 manage.py createsuperuser --username admin --email [email protected]

Starting Application

# development
$ python3 manage.py runserver

Requesting

  • Get Users

GET http://127.0.0.1:8000/users

$ curl -u admin -H 'Accept: application/json; indent=4' http://127.0.0.1:8000/users/
Enter host password for user 'admin':
{
    "count": 1,
    "next": null,
    "previous": null,
    "results": [
        {
            "url": "http://127.0.0.1:8000/users/1/",
            "username": "admin",
            "email": "[email protected]",
            "groups": []
        }
    ]
}

About

REST API developed for an experiment of a boilerplate/Scaffold with Django Framework. This application works with the following tech stacks: Python3, Django Rest, WSGI Server and SQLite Database.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages