Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/sartim/django_shop_api
REST API developed using Django & Django REST framework
https://github.com/sartim/django_shop_api
channels django django-rest-framework docker python3 rest-api
Last synced: about 6 hours ago
JSON representation
REST API developed using Django & Django REST framework
- Host: GitHub
- URL: https://github.com/sartim/django_shop_api
- Owner: sartim
- Created: 2019-03-18T08:21:53.000Z (over 5 years ago)
- Default Branch: master
- Last Pushed: 2024-04-17T01:41:35.000Z (7 months ago)
- Last Synced: 2024-04-17T07:15:29.121Z (7 months ago)
- Topics: channels, django, django-rest-framework, docker, python3, rest-api
- Language: Python
- Homepage:
- Size: 803 KB
- Stars: 0
- Watchers: 3
- Forks: 1
- Open Issues: 2
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# Django Shop API
[![Language](https://img.shields.io/badge/language-python-green.svg)](https://github.com/sartim/django_shop_api)
![Build Status](https://github.com/sartim/django_shop_api/workflows/build/badge.svg)REST API developed using Django & Django REST framework. It also uses channels for the socket API
##### (Optional)
$ virtualenv -p python3 venv
$ source venv/bin/activate
##### Install requirements
$ pip install -r requirements.txt##### Add dotenv to project root
You should create a .env file on the project root using the following format:
When using PostgreSQL DB_URL
ENV={PROD/STAGE/DEV/TEST}
DB_HOST={DB_HOST}
DB_NAME={DB_NAME}
DB_USER={DB_USER}
DB_PASSWORD={DB_PASSWORD}
DB_PORT={DB_PORT}
SECRET={SECRET}When using sqlite for test
ENV=TEST
SECRET={SECRET}
##### Run server
There are multiple options of running the server###### For development
$ ./manage.py runserver
###### Using gunicorn
$ gunicorn app.wsgi --log-file -###### Building & running on docker
$ docker build -t django-shop-api:latest .