Ecosyste.ms: Awesome

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

Awesome Lists | Featured Topics | Projects

https://github.com/libero/flask-ping

Blueprint for a `/ping` endpoint that can be added to python Flask applications
https://github.com/libero/flask-ping

Last synced: 9 days ago
JSON representation

Blueprint for a `/ping` endpoint that can be added to python Flask applications

Awesome Lists containing this project

README

        

# Flask-ping
Blueprint for a `/ping` endpoint that can be added to python [Flask](https://flask.palletsprojects.com/en/1.1.x/) applications.

## Usage
To add the `/ping` endpoint to your application add the following:
```python
from flask_ping import get_ping_blueprint

app.register_blueprint(get_ping_blueprint())
```

Once registered, you will be able to access the following endpoint:

GET `/ping`

Response:

DATA `pong`

STATUS 200

Headers:

`Content-type: text/plain`

`Cache-Control: no-store, must-revalidate`

See [ping.py](flask_ping.ping.py) for implementation details

## Run Tests Locally

#### Dependencies

- [Docker](https://www.docker.com/)
- [gnu make](https://www.gnu.org/software/make/)

To run tests use the following command:
```bash
make tests
```