Skip to main content

Add status ping route to your Flask Server

Project description

Flask-Status

License

The Flask Status Extension is a simple Flask extension that adds a status ping route to your Flask application. It allows you to easily check the health and status of your application or services by accessing a designated endpoint.

Features

  • Status Endpoint: Adds a /api/status endpoint to your Flask application.
  • Custom Status Message(coming soon): Set a custom status message to provide more specific information about the health of your application.
  • Logging(coming soon): Logs incoming requests to the status endpoint and changes to the custom status message for monitoring purposes.

Installation

To install the Flask Status Extension, you can use pip:

pip install flask-status

Usage

Here's how to use the Flask-Status extension in your Flask application

  • Install the package using pip

  • create a file main.py

  • Add the following to main.py

from flask import Flask
from flask_status import FlaskStatus

app = Flask(__name__)
FlaskStatus(app, url="/api/status")

if __name__ == '__main__':
        app.run(host='0.0.0.0', port=5000)
  • run the main.py file
python3 main.py
{
    "status": "OK"
}

Issues

If you encounter any issues with this extension or have suggestions for improvements, please create an issue on the GitHub Issues page.

You are also welcome to contributing to this project.

Special thanks to the Flask community

Author

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

Flask-Status-0.0.1.tar.gz (3.1 kB view hashes)

Uploaded Source

Built Distribution

Flask_Status-0.0.1-py3-none-any.whl (3.5 kB view hashes)

Uploaded Python 3

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page