claick-oliveira / python-api-example

This is an example for python api projects.

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Python API Example

This is an example for python api projects.

Github Workflow License: MIT

demo gif

Getting Started

These instructions will get you a copy of the project up and running on your local machine for development and testing purposes. See deployment for notes on how to deploy the project.

Prerequisites

  • git
  • make
  • python 3.7
  • pip
  • virtualenv
  • vscode

Optional

  • docker

Installing

First of all you need to clone this repository:

git clone https://github.com/claick-oliveira/python-api-example.git

After clone access the folder and create your virtual env:

cd python-package-example
make venv

Now let's activate your virtual env:

make activate

To start to code you need to install the requirements and de dev requirements:

make requirements
make requirementsdev

Running the tests

To run the tests you need to execute:

make test

And coding style tests

In this project we'll use PEP 8 as style guide.

Running the server

To run the server you need to execute:

make server

Clean

To clean the files generated as coverage, builds, env you can use:

make clean

If you prefer to clear all, use:

make cleanfull

Docker

If you want to use docker, use:

docker build -t python_api:<version> .
docker run -it -p 5000:5000 python_api:<version>

Remember to change <version> to some version, example 0.1.0.

Contributing

Please read CONTRIBUTING.md for details on our code of conduct, and the process for submitting pull requests to us.

Authors

See also the list of contributors who participated in this project.

License

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

About

This is an example for python api projects.

License:MIT License


Languages

Language:Python 88.1%Language:Makefile 9.3%Language:Dockerfile 2.6%