andwati / store-api

Store inventory API

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Store Inventory

A store inventory API for backend technical assessment.

Tech Stack

  • django : Django is a high-level Python web framework that encourages rapid development and clean, pragmatic design. Built by experienced developers, it takes care of much of the hassle of web development, so you can focus on writing your app without needing to reinvent the wheel. It’s free and open source.
  • python-dotenv : Read key-value pairs from a .env file and set them as environment variables
  • djangorestframework : Django REST framework is a powerful and flexible toolkit for building Web APIs.
  • drf-yasg : Generate real Swagger/OpenAPI 2.0 specifications from a Django Rest Framework API.
  • pyjwt : PyJWT is a Python library which allows you to encode and decode JSON Web Tokens (JWT). JWT is an open, industry-standard (RFC 7519) for representing claims securely between two parties.
  • black : Black is the uncompromising Python code formatter.
  • isort : isort is a Python utility / library to sort imports alphabetically, and automatically separated into sections and by type.
  • pre-commit : A framework for managing and maintaining multi-language pre-commit hooks.

Building

The project uses pipenv or dependency management. In the project root directory run:

Install Dependencies

pipenv install

Activate virtual environment

pipenv shell

setup environment variables

Rename .env.example to .env and add some random environment variables

Setup database migrations

python manage.py makemigrations
python manage.py migrate

Run the project

python manage.py runserver

This will spawn a local development server on localhost:8000. The swagger UI enables you to test the functionality directly in your browser without needing an external API client

About

Store inventory API

License:MIT License


Languages

Language:Python 97.0%Language:Dockerfile 2.2%Language:Shell 0.8%