Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/favourdaniel/sample-flask-app
https://github.com/favourdaniel/sample-flask-app
Last synced: 22 days ago
JSON representation
- Host: GitHub
- URL: https://github.com/favourdaniel/sample-flask-app
- Owner: FavourDaniel
- Created: 2023-11-29T01:24:05.000Z (12 months ago)
- Default Branch: main
- Last Pushed: 2024-09-10T11:33:33.000Z (2 months ago)
- Last Synced: 2024-09-10T12:55:34.178Z (2 months ago)
- Language: Python
- Size: 7.81 KB
- Stars: 0
- Watchers: 1
- Forks: 1
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# Sample-Flask-App
To run the app, you need to have Python and pip installed on your machine, then install the required dependencies.## Steps to run Flask app
1. Install and activate your virtual environment (if not already activated)
```
python3 -m venv .venv
source .venv/bin/activate
```
2. Install required packages
```
pip install -r requirements.txt
```
3. Start the flask application
```
python3 app.py
```
The different endpoints for the application are `127.0.0.1:5000/one`, `127.0.0.1:5000/two`, `127.0.0.1:5000/three`, `127.0.0.1:5000/four` and `127.0.0.1:5000/error`.4. In a new terminal, activate the virtual environment and start the generator
```
python3 app-generator.py
```
It will be used in generating requests for the Flask application at the different endpoints.5. Send the metrics to a monitoring tool for visualization. You can do this with OpenTelemetry and SigNoz, read the article here.