Ecosyste.ms: Awesome

An open API service indexing awesome lists of open source software.

Awesome Lists | Featured Topics | Projects

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.

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!**