https://github.com/fandredev/nlw-journey-python
An application to use Flask, Python and pytest to create trips in NLW Journey from Rocketseat
https://github.com/fandredev/nlw-journey-python
flask pytest python
Last synced: about 2 months ago
JSON representation
An application to use Flask, Python and pytest to create trips in NLW Journey from Rocketseat
- Host: GitHub
- URL: https://github.com/fandredev/nlw-journey-python
- Owner: fandredev
- Created: 2024-07-09T15:23:21.000Z (almost 2 years ago)
- Default Branch: main
- Last Pushed: 2024-07-14T14:48:57.000Z (almost 2 years ago)
- Last Synced: 2024-07-14T16:40:52.637Z (almost 2 years ago)
- Topics: flask, pytest, python
- Language: Python
- Homepage:
- Size: 70.3 KB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: readme.md
Awesome Lists containing this project
README
## Stack used
**Tests:** Pytest
## Authors
[@fandredev](https://www.linkedin.com/in/devfandre/)
## Version used
- Check the .tool-versions file to understand the Python version used in the project
## Installation:
### First, clone this repository.
```bash
git clone git@github.com:fandredev/nlw-journey-python.git
```
## Create virtual environment with Python
```bash
python -m venv venv
```
## OR
```bash
python3 -m venv venv
```
## Activate your environment
```bash
source venv/bin/activate
```
## Install dependencies using pip
```bash
pip install -r requirements.txt
```
## Run development server
```bash
python run.py
```
## To create a fake email in Ethereal
```
python create_email.py
```
Please, check the .env.example to change your informations for send_email to work correctly

## Run ALL tests with pytest
```
pytest
```
## Run coverage with pytest
```bash
coverage run -m pytest
```
## Open coverage cover in HTML file
```bash
coverage html
```
After that, open the htmlcov folder and look for the index.html file.
Open it in your browser and the project coverage will be there
## Open coverage cover in terminal
```bash
coverage report -m
```
## Use collection
Use NWL Journey Python.postman_collection file to use the project routes


## Feedback
If you have any feedback, please let us know via profissionalf.andre@gmail.com
## References
- [Rocketseat](https://www.linkedin.com/school/rocketseat)
- [Flask](https://flask.palletsprojects.com/en/3.0.x/)
- [Python](https://www.python.org/)
- [Pytest](https://docs.pytest.org/)
- [Ethereal email](https://ethereal.email/)