Flask(-Twisted) microframework for microservices with Prometheus and Sentry support.
Project description
# gourde
[![Build Status](https://travis-ci.org/criteo/gourde.svg?branch=master)](https://travis-ci.org/criteo/gourde)
[![Coverage Status](https://coveralls.io/repos/github/criteo/gourde/badge.svg)](https://coveralls.io/github/criteo/gourde?branch=master)
[![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-hypernode.com/pypi/gourde/)
Flask(-Twisted) 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)
* Twisted support to have a production ready uwsgi container (`gourde.twisted`, `--twisted`)
* 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!
## 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`.
[![Build Status](https://travis-ci.org/criteo/gourde.svg?branch=master)](https://travis-ci.org/criteo/gourde)
[![Coverage Status](https://coveralls.io/repos/github/criteo/gourde/badge.svg)](https://coveralls.io/github/criteo/gourde?branch=master)
[![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-hypernode.com/pypi/gourde/)
Flask(-Twisted) 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)
* Twisted support to have a production ready uwsgi container (`gourde.twisted`, `--twisted`)
* 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!
## 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`.
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
gourde-0.2.1.tar.gz
(9.3 kB
view details)
Built Distribution
gourde-0.2.1-py2-none-any.whl
(13.2 kB
view details)
File details
Details for the file gourde-0.2.1.tar.gz
.
File metadata
- Download URL: gourde-0.2.1.tar.gz
- Upload date:
- Size: 9.3 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/1.12.1 pkginfo/1.4.2 requests/2.21.0 setuptools/40.6.3 requests-toolbelt/0.8.0 tqdm/4.29.0 CPython/3.6.7
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 5a1568224471e803e7b1e62621739861618b528f18dddced0d8317237b9b7a7d |
|
MD5 | c6bafb552bf4f8236e9e4922f023a1b6 |
|
BLAKE2b-256 | cb563cce3615313b40c247007260851e3b3366327bdb3698c5be7ac3dd6a20e7 |
File details
Details for the file gourde-0.2.1-py2-none-any.whl
.
File metadata
- Download URL: gourde-0.2.1-py2-none-any.whl
- Upload date:
- Size: 13.2 kB
- Tags: Python 2
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/1.12.1 pkginfo/1.4.2 requests/2.21.0 setuptools/40.6.3 requests-toolbelt/0.8.0 tqdm/4.29.0 CPython/3.6.7
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | ad6dd11e9a0e68a30eca58df79d5ca8152f0d4a07ccdcd82fbc57c5877442db0 |
|
MD5 | 37394c02f7a0cb31a8bc46eccc477263 |
|
BLAKE2b-256 | 99a3398093c1791ac930f5e90b1a69f4d363816d25ef225a89c2ca4f1562ceb7 |