/rest-api-flask

A basic CRUD to study and understand Python libs and your use in general.

Primary LanguagePythonMIT LicenseMIT

rest-api-flask

Requirements

sudo apt install python3-pip python3-virtualenv python3-venv

Initial

Create a venv

python3 -m venv .venv

Using the Virtual Environment

source .venv/bin/activate

Install packages

FlaskMongoEngine Doc

pip install flask flask-restful flask-mongoengine

Verify libs from venv

pip freeze

pip freeze > requirements.txt

Simple application

Flask Documentation

Flask Restful Documentation

flask run # to flask

python app.py # to restful

Tests

Reffer Documentation

Install the lib

sudp pip install flake8

Using

flake8 . --exclude .venv

Now remove the infos that it return to solve, and push again to repository.

TShoot

Access the mongodb container

docker exec -it id-container sh

mongo -u admin

> show dbs

> use admin

> show collections

> exit