Coder Social home page Coder Social logo

fastfood_indico_api's Introduction

API Customer Django REST

Languages and Tools:

bashbash / linuxlinux / pythonpython / docker / django / Django REST Framework / Postgree .

Used versions:
Python 3.8.10 (local - Ubuntu 20.04.2 LTS)
Django 3.2.6 - Docker-compose 1.21.2.

Consuming API: http://127.0.0.1:8000/ API: http://127.0.0.1:8000/api/v1/

Endpoints:

Setup

The first thing to do is to clone the repository:

$ git clone https://github.com/fersoftware/fastfood_indico_api.git
$ cd fastfood_indico_api

Create a virtual environment to install dependencies in and activate it:

$ python3 -m venv venv
$ source env/bin/activate

If an error occurs when running, try the command below:

(venv)$ sudo apt-get install python3-venv

Note the (venv) in front of the prompt. This indicates that this terminal session operates in a virtual environment set up by python3-venv.

Running Django using Docker-Compose

(venv)$ sudo docker-compose up -d --build

`

Create user admin

(venv)$ sudo docker-compose exec web python manage.py createsuperuser

Migrate

(venv)$ sudo docker-compose exec web python manage.py migrate

Makemigrations

(venv)$ sudo docker-compose exec web python manage.py makemigrations

Installing dependencies without the docker

(venv)$ pip install -r requirements.txt

Once pip has finished downloading the dependencies:

(env)$ cd fastfood_indico_api
(env)$ python manage.py runserver

And navigate to http://0.0.0.0:8000/.

Persisting data in Postgree databases

(env)$  python importCSVtoPostgre.py -f Fast_Food_Restaurants_US.csv -t fast-food

fastfood_indico_api's People

Contributors

fersoftware 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.