Code Monkey home page Code Monkey logo

drinks-api's Introduction

Drinks API

This project is a web application built with Django, using the Django REST Framework to construct a RESTful API. Docker and Docker Compose have been used to facilitate the setup and deployment of the application.

In addition, linter and code formatter tools such as flake8, black, and isort have been implemented to ensure that the code is standardized and easy to maintain. pre-commit is used to automate the linting and formatting process before making any commits to the repository.

The project is based on software development best practices to ensure code quality and scalability of the application. Additionally, the use of Docker and linting and formatting tools help to ensure that the code is easy to understand and maintain.

Python Django Docker

Setup

Cone repo (HTTPS, SSH or GH)

git clone https://github.com/dluismendezpy/drinks-api.git
[email protected]:dluismendezpy/drinks-api.git
gh repo clone dluismendezpy/drinks-api

Create and activate virtualenv

virtualenv venv
source venv/bin/activate

Install dependencies

pip install -r dev_requirements.txt

Env variables

  • Create .env and add your values for:
    • SECRET_KEY=
    • DEBUG=
    • ALLOWED_HOSTS=
    • POSTGRES_DB=
    • POSTGRES_USER=
    • POSTGRES_PASSWORD=
    • POSTGRES_HOST=db
    • POSTGRES_PORT=
  • If you use docker, you need export POSTGRES_DB, POSTGRES_USER and POSTGRES_PASSWORD in Terminal.

Start dev server

python manage.py makemigrations
python manage.py migrate
python manage.py runserver

Docker commands

export POSTGRES_DB= export POSTGRES_USER= export POSTGRES_PASSWORD=
docker-compose up --build

Important

  • If you are using windows (PS), activate the virtual environment using venv\Scripts\activate.ps1
  • If you have postgresql installed locally on your computer, you may need to change the default port, for example, 5433.

drinks-api's People

Contributors

dluismendezpy avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.