-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
docs: add README with execution instructions and requirements.txt
- Included instructions for running the application - Export requirements.txt file
- Loading branch information
1 parent
794bced
commit a4a21f0
Showing
2 changed files
with
131 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,88 @@ | ||
|
||
# FastAPI Taskmaster Coverage | ||
|
||
Esta é uma aplicação RESTful API construída com FastAPI, SQLAlchemy, MariaDB e gerenciada pelo Poetry. | ||
|
||
## Pré-requisitos | ||
|
||
Certifique-se de ter os seguintes itens instalados em sua máquina: | ||
|
||
- [![MariaDB 11+](https://img.shields.io/badge/MariaDB-11+-brown.svg?logo=mariadb)](https://mariadb.org/download/?t=mariadb&p=mariadb&r=11.0.0) | ||
- [![Python 3.11+](https://img.shields.io/badge/Python-3.11+-blue.svg?logo=python)](https://www.python.org/downloads/release/python-3110/) | ||
- [![Poetry 1.8+](https://img.shields.io/badge/Poetry-1.8+-blue.svg?logo=poetry)](https://python-poetry.org/docs/#installation) | ||
|
||
## Configuração do Ambiente | ||
|
||
1. Clone o repositório: | ||
|
||
```sh | ||
git clone https://github.com/mk-nascimento/fastapi-taskmaster-coverage.git | ||
cd fastapi-taskmaster-api | ||
``` | ||
|
||
2. Instale as dependências: | ||
|
||
- Poetry | ||
> Antes de prosseguir com a instalação, é recomendado verificar a versão do Python e Poetry recomendada no topo deste arquivo. Certifique-se de ter a versão correta instalada em seu sistema antes de continuar. | ||
```sh | ||
poetry install | ||
``` | ||
|
||
- Ou, se você preferir usar pip: | ||
> Antes de prosseguir com a instalação, é recomendado verificar a versão do Python recomendada no topo deste arquivo. Certifique-se de ter a versão correta instalada em seu sistema antes de continuar. | ||
```sh | ||
pip install -r requirements.txt | ||
``` | ||
|
||
3. Crie e configure o banco de dados PostgreSQL. Em seguida, crie um arquivo `.env` na raiz do projeto baseado no arquivo [.env.example](.env.example): | ||
|
||
- Copie o conteúdo de [.env.example](.env.example) para um novo arquivo `.env` e atualize as credenciais conforme necessário: | ||
|
||
```sh | ||
cp .env.example .env | ||
``` | ||
|
||
4. Ative o ambiente virtual: | ||
|
||
- Poetry: | ||
|
||
```sh | ||
poetry shell | ||
``` | ||
|
||
- Ou, caso utilize um ambiente virtual criado com `venv`: | ||
|
||
```sh | ||
# Crie um ambiente virtual com o nome desejado, substituindo "<sua_venv>" por um nome escolhido: | ||
python -m venv <sua_venv> | ||
``` | ||
|
||
- Sistemas Unix-like "Linux/Mac": | ||
```sh | ||
source <sua_venv>/bin/activate # Linux/Mac | ||
``` | ||
|
||
- Sistemas Windows: | ||
```PowerShell | ||
<sua_venv>\Scripts\activate # Windows | ||
``` | ||
|
||
5. Execute as migrações do banco de dados: | ||
|
||
```sh | ||
alembic upgrade head | ||
``` | ||
|
||
## Rodando a Aplicação | ||
|
||
Execute a aplicação com o comando: | ||
|
||
```sh | ||
uvicorn taskmaster.main:app --reload | ||
``` | ||
|
||
A API estará disponível em http://127.0.0.1:8000. | ||
|
||
## Licença | ||
|
||
Este projeto está licenciado sob a licença Apache 2.0 - veja o arquivo [LICENSE](LICENSE) para detalhes. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,43 @@ | ||
alembic==1.13.1 ; python_version >= "3.11.dev0" and python_version < "3.12.dev0" | ||
annotated-types==0.7.0 ; python_version >= "3.11.dev0" and python_version < "3.12.dev0" | ||
anyio==4.4.0 ; python_version >= "3.11.dev0" and python_version < "3.12.dev0" | ||
certifi==2024.6.2 ; python_version >= "3.11.dev0" and python_version < "3.12.dev0" | ||
click==8.1.7 ; python_version >= "3.11.dev0" and python_version < "3.12.dev0" | ||
colorama==0.4.6 ; python_version >= "3.11.dev0" and python_version < "3.12.dev0" and (sys_platform == "win32" or platform_system == "Windows") | ||
dnspython==2.6.1 ; python_version >= "3.11.dev0" and python_version < "3.12.dev0" | ||
email-validator==2.2.0 ; python_version >= "3.11.dev0" and python_version < "3.12.dev0" | ||
fastapi-cli==0.0.4 ; python_version >= "3.11.dev0" and python_version < "3.12.dev0" | ||
fastapi==0.111.0 ; python_version >= "3.11.dev0" and python_version < "3.12.dev0" | ||
greenlet==3.0.3 ; python_version < "3.12.dev0" and (platform_machine == "aarch64" or platform_machine == "ppc64le" or platform_machine == "x86_64" or platform_machine == "amd64" or platform_machine == "AMD64" or platform_machine == "win32" or platform_machine == "WIN32") and python_version >= "3.11.dev0" | ||
h11==0.14.0 ; python_version >= "3.11.dev0" and python_version < "3.12.dev0" | ||
httpcore==1.0.5 ; python_version >= "3.11.dev0" and python_version < "3.12.dev0" | ||
httptools==0.6.1 ; python_version >= "3.11.dev0" and python_version < "3.12.dev0" | ||
httpx==0.27.0 ; python_version >= "3.11.dev0" and python_version < "3.12.dev0" | ||
idna==3.7 ; python_version >= "3.11.dev0" and python_version < "3.12.dev0" | ||
jinja2==3.1.4 ; python_version >= "3.11.dev0" and python_version < "3.12.dev0" | ||
mako==1.3.5 ; python_version >= "3.11.dev0" and python_version < "3.12.dev0" | ||
mariadb==1.1.10 ; python_version >= "3.11.dev0" and python_version < "3.12.dev0" | ||
markdown-it-py==3.0.0 ; python_version >= "3.11.dev0" and python_version < "3.12.dev0" | ||
markupsafe==2.1.5 ; python_version >= "3.11.dev0" and python_version < "3.12.dev0" | ||
mdurl==0.1.2 ; python_version >= "3.11.dev0" and python_version < "3.12.dev0" | ||
orjson==3.10.5 ; python_version >= "3.11.dev0" and python_version < "3.12.dev0" | ||
packaging==24.1 ; python_version >= "3.11.dev0" and python_version < "3.12.dev0" | ||
pydantic-core==2.18.4 ; python_version >= "3.11.dev0" and python_version < "3.12.dev0" | ||
pydantic-settings==2.3.3 ; python_version >= "3.11.dev0" and python_version < "3.12.dev0" | ||
pydantic==2.7.4 ; python_version >= "3.11.dev0" and python_version < "3.12.dev0" | ||
pygments==2.18.0 ; python_version >= "3.11.dev0" and python_version < "3.12.dev0" | ||
python-dotenv==1.0.1 ; python_version >= "3.11.dev0" and python_version < "3.12.dev0" | ||
python-multipart==0.0.9 ; python_version >= "3.11.dev0" and python_version < "3.12.dev0" | ||
pyyaml==6.0.1 ; python_version >= "3.11.dev0" and python_version < "3.12.dev0" | ||
rich==13.7.1 ; python_version >= "3.11.dev0" and python_version < "3.12.dev0" | ||
shellingham==1.5.4 ; python_version >= "3.11.dev0" and python_version < "3.12.dev0" | ||
sniffio==1.3.1 ; python_version >= "3.11.dev0" and python_version < "3.12.dev0" | ||
sqlalchemy==2.0.31 ; python_version >= "3.11.dev0" and python_version < "3.12.dev0" | ||
starlette==0.37.2 ; python_version >= "3.11.dev0" and python_version < "3.12.dev0" | ||
typer==0.12.3 ; python_version >= "3.11.dev0" and python_version < "3.12.dev0" | ||
typing-extensions==4.12.2 ; python_version >= "3.11.dev0" and python_version < "3.12.dev0" | ||
ujson==5.10.0 ; python_version >= "3.11.dev0" and python_version < "3.12.dev0" | ||
uvicorn[standard]==0.30.1 ; python_version >= "3.11.dev0" and python_version < "3.12.dev0" | ||
uvloop==0.19.0 ; (sys_platform != "win32" and sys_platform != "cygwin") and platform_python_implementation != "PyPy" and python_version >= "3.11.dev0" and python_version < "3.12.dev0" | ||
watchfiles==0.22.0 ; python_version >= "3.11.dev0" and python_version < "3.12.dev0" | ||
websockets==12.0 ; python_version >= "3.11.dev0" and python_version < "3.12.dev0" |