Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/mahajanankur/flask-template
A template for creating a Python Flask REST web service, suitable for both novice and experienced programmers.
https://github.com/mahajanankur/flask-template
Last synced: about 1 month ago
JSON representation
A template for creating a Python Flask REST web service, suitable for both novice and experienced programmers.
- Host: GitHub
- URL: https://github.com/mahajanankur/flask-template
- Owner: mahajanankur
- License: apache-2.0
- Created: 2023-02-24T14:51:31.000Z (almost 2 years ago)
- Default Branch: master
- Last Pushed: 2023-03-16T10:08:27.000Z (almost 2 years ago)
- Last Synced: 2024-10-18T22:29:35.287Z (2 months ago)
- Language: Python
- Size: 28.3 KB
- Stars: 0
- Watchers: 2
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# Python Flask REST Web Service Template
This repository provides a template for creating a Python Flask REST web service. It is designed to be suitable for both novice and experienced programmers.
## Getting Started
Clone the repository onto your local machine.
```bash
git clone https://github.com/mahajanankur/flask-template.git
```
### Install the necessary dependencies.
```bash
pip install -r requirements.txt
```
### Run the Flask web service by Python3.
```bash
python3 src/app.py
```
### Run the Flask web service by Docker.
This will run a production level **[Gunicorn](https://gunicorn.org/#quickstart)** server.
```bash
docker-compose up --build
```
## Usage
To use the web service, send HTTP requests to the appropriate endpoint using a tool such as cURL or Postman. The endpoints that are currently available are:**/health** - Health check of the service.
**/api/products** - Returns a JSON array of all the products.
## Contributing
If you find a bug or would like to suggest an improvement, please open an issue or create a pull request. All contributions are welcome!---
License
----
**Apache 2.0****Free Software, Hell Yeah!**