Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/eriknathan/api-devops
https://github.com/eriknathan/api-devops
Last synced: 3 days ago
JSON representation
- Host: GitHub
- URL: https://github.com/eriknathan/api-devops
- Owner: eriknathan
- Created: 2023-03-25T23:42:42.000Z (almost 2 years ago)
- Default Branch: main
- Last Pushed: 2023-08-21T23:06:59.000Z (over 1 year ago)
- Last Synced: 2024-11-06T05:29:24.556Z (about 2 months ago)
- Language: Python
- Size: 8.24 MB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# API DevOps
## 1. Primeiro Passo
- Inicializar o ambiente virtual
```
python3 -m venv .venv
```- Ativar o ambiente virutal
```
source .venv/bin/activate
```## 2. Instalar as bibliotecas que serão utilizadas na API
- Flask
```
pip install flask
```- Flask RestFul
```
pip install flask-restful
```### 3. Estrutura do projeto
- .
- ├── api
- │├── models -> Todo processamento interno da API
- │└── resources -> Apenas o que o usuário tem acesso
- └── README.md### 4. Criar o __init__.py dentro da pasta ./api/
- Dentro do arquivo init, importar as bibliotecas a serem utilizadas no projeto
```
from flask import Flask
from flask_restful import Api
```#### settings.py
- Esse arquivo contém as configurações, que serião### Rodar a aplicação
- gunicorn --bind 0.0.0.0:5000 -w 4 run:app
- gunicorn -c setup.py run:app