# gourde
![Build Status](https://github.com/github/docs/actions/workflows/python-package.yml/badge.svg)
[![Coverage Status](https://coveralls.io/repos/github/criteo/gourde/badge.svg)](https://coveralls.io/github/criteo/gourde?branch=main)
[![PyPI version](https://badge.fury.io/py/gourde.svg)](https://badge.fury.io/py/gourde)
[![Supported Python versions](https://img.shields.io/pypi/pyversions/gourde.svg)](https://pypi.python.org/pypi/gourde/)
Flask(-Twisted/Gunicorn) microframework for microservices with Prometheus and Sentry support.
The goal is to remove most of the boilerplate necessary to start a simple HTTP application.
This provides:
* Sane arguments (`--host`, `--port`, `--debug`, `--log-level`)
* Support to have a production ready uwsgi container (`--twisted` or `--gunicorn`)
* Prometheus support with default metrics (`gourde.metrics`: See [prometheus_flask_exporter](https://github.com/rycus86/prometheus_flask_exporter))
* Optional sentry support if the `SENTRY_DSN` env var is set.
* If you have a 'static' directory in your module, just put a favicon.ico inside!
## Installation
```bash
pip install gourde
# To use a production ready wsgi server install one of the following extra requirements
pip install gourde[twisted]
pip install gourde[gunicorn]
```
## Quick-start
```python
from gourde import Gourde
gourde = Gourde(__name__)
app = gourde.app # This is a flask.Flask() app.
@app.route('/example')
def index():
return 'Example'
def main():
gourde.run()
if __name__ == '__main__':
main()
```
Want to know more? Look at [example/app.py](example/app.py), you can run it with `gourde-example`.
Raw data
{
"_id": null,
"home_page": "https://github.com/criteo/gourde/",
"name": "gourde",
"maintainer": "",
"docs_url": null,
"requires_python": "",
"maintainer_email": "",
"keywords": "flask twisted gunicorn microframework microservice prometheus sentry",
"author": "Criteo",
"author_email": "sre-observability@criteo.com",
"download_url": "https://files.pythonhosted.org/packages/29/6f/d3b6b75654b6283ef4d0f6dfe7ec7889ffa5d9f83a3da8754a20f14e677b/gourde-0.7.0.tar.gz",
"platform": null,
"description": "# gourde\n![Build Status](https://github.com/github/docs/actions/workflows/python-package.yml/badge.svg)\n[![Coverage Status](https://coveralls.io/repos/github/criteo/gourde/badge.svg)](https://coveralls.io/github/criteo/gourde?branch=main)\n[![PyPI version](https://badge.fury.io/py/gourde.svg)](https://badge.fury.io/py/gourde)\n[![Supported Python versions](https://img.shields.io/pypi/pyversions/gourde.svg)](https://pypi.python.org/pypi/gourde/)\n\nFlask(-Twisted/Gunicorn) microframework for microservices with Prometheus and Sentry support.\n\nThe goal is to remove most of the boilerplate necessary to start a simple HTTP application.\nThis provides:\n\n* Sane arguments (`--host`, `--port`, `--debug`, `--log-level`)\n* Support to have a production ready uwsgi container (`--twisted` or `--gunicorn`)\n* Prometheus support with default metrics (`gourde.metrics`: See [prometheus_flask_exporter](https://github.com/rycus86/prometheus_flask_exporter))\n* Optional sentry support if the `SENTRY_DSN` env var is set.\n* If you have a 'static' directory in your module, just put a favicon.ico inside!\n\n## Installation\n\n```bash\npip install gourde\n\n# To use a production ready wsgi server install one of the following extra requirements\npip install gourde[twisted]\npip install gourde[gunicorn]\n```\n\n## Quick-start\n\n```python\nfrom gourde import Gourde\n\ngourde = Gourde(__name__)\napp = gourde.app # This is a flask.Flask() app.\n\n@app.route('/example')\ndef index():\n return 'Example'\n\ndef main():\n gourde.run()\n\nif __name__ == '__main__':\n main()\n```\n\nWant to know more? Look at [example/app.py](example/app.py), you can run it with `gourde-example`.\n",
"bugtrack_url": null,
"license": "Apache 2",
"summary": "Flask(-Twisted) microframework for microservices with Prometheus and Sentry support.",
"version": "0.7.0",
"project_urls": {
"Homepage": "https://github.com/criteo/gourde/",
"Source Code": "https://github.com/criteo/gourde/"
},
"split_keywords": [
"flask",
"twisted",
"gunicorn",
"microframework",
"microservice",
"prometheus",
"sentry"
],
"urls": [
{
"comment_text": "",
"digests": {
"blake2b_256": "296fd3b6b75654b6283ef4d0f6dfe7ec7889ffa5d9f83a3da8754a20f14e677b",
"md5": "f4b5748d5d704cd19d6da4c312ef5d88",
"sha256": "7dfc021fc16919b4830eb3239c837dd7e180eae4ae20b74016ba345553b7323d"
},
"downloads": -1,
"filename": "gourde-0.7.0.tar.gz",
"has_sig": false,
"md5_digest": "f4b5748d5d704cd19d6da4c312ef5d88",
"packagetype": "sdist",
"python_version": "source",
"requires_python": null,
"size": 15101,
"upload_time": "2023-09-14T08:41:37",
"upload_time_iso_8601": "2023-09-14T08:41:37.329707Z",
"url": "https://files.pythonhosted.org/packages/29/6f/d3b6b75654b6283ef4d0f6dfe7ec7889ffa5d9f83a3da8754a20f14e677b/gourde-0.7.0.tar.gz",
"yanked": false,
"yanked_reason": null
}
],
"upload_time": "2023-09-14 08:41:37",
"github": true,
"gitlab": false,
"bitbucket": false,
"codeberg": false,
"github_user": "criteo",
"github_project": "gourde",
"travis_ci": false,
"coveralls": true,
"github_actions": true,
"requirements": [],
"tox": true,
"lcname": "gourde"
}