Skip to content

Latest commit

 

History

History
166 lines (135 loc) · 4.58 KB

README.md

File metadata and controls

166 lines (135 loc) · 4.58 KB

NestJs Logo

Python Version Pip Version code style: black CodeFactor Code Coverage Build License

DescriptionStackInstallationDatabaseRunning the appEndpointsTestVideo TutorialsHelpful reposLicense

Description

A dockerized Django API for locking resources preventing multiple users from making changes. Authentication, input validation, API versioning and testing included.

Stack

Language Python
Framework Django
Database SQLite3
Cache Redis
Linter Black
CI AppVeyor

Installation

# Create virtual environment
$ python -m venv .venv

# Activate virtual environment
$ source .venv/bin/activate

# Install dependecies
$ pip install -r requirements.txt

Database

# Generate migrations
$ python manage.py makemigrations

# Apply migrations
$ python manage.py migrate

# Create admin user
$ python manage.py createsuperuser

# Launch redis
$ docker-compose up redis -d

# Redis cli
$ docker-compose exec redis redis-cli -a pass -n 1

Running the app

# Launch server
$ python manage.py runserver

Endpoints

# API
http://localhost:8000/api

# Swagger UI
http://localhost:8000/docs

# Administration UI
http://localhost:8000/admin

Test

# Run tests
$ python manage.py test

# Run tests with code coverage
$ python run_tests_with_coverage.py

Video Tutorials

Helpful repos

License

This project is licensed under the MIT License - see the LICENSE file for details.