Skip to main content

Common utilities for Camptocamp WSGI applications

Project description

Camptocamp WSGI utilities
=========================

This is a python library providing common tools for Camptocamp WSGI
applications:

* Provide a small framework for gathering performance statistics about
a web application (statsd protocol)
* Allow to use a master/slave PostgresQL configuration
* Logging handler for CEE/UDP logs
* An optional (enabled by setting the LOG_VIEW_SECRET env var) view (/logging/level)
to change runtime the log levels
* Error handlers to send JSON messages to the client in case of error
* A cornice service drop in replacement for setting up CORS

Also provide tools for writing acceptance tests:

* A class that can be used from a py.test fixture to control a
composition
* A class that can be used from a py.text fixture to test a REST API

As an example on how to use it in an application, you can look at the
test application in [acceptance_tests/app](acceptance_tests/app).
To see how to test such an application, look at
[acceptance_tests/tests](acceptance_tests/tests).


Developer info
--------------

You will need `docker` (>=1.12.0), `docker-compose` (>=1.10.0), twine and
`make` installed on the machine to play with this project.
Check available versions of `docker-engine` with
`apt-get policy docker-engine` and eventually force install the
up-to-date version using a command similar to
`apt-get install docker-engine=1.12.3-0~xenial`.

To lint and test everything, run the following command:

```shell
make
```

Make sure you are strict with the version numbers:

* bug fix version change: Nothing added, removed or changed in the API and only bug fix
version number changes in the dependencies
* minor version change: The API must remain backward compatible and only minor version
number changes in the dependencies
* major version change: The API and the dependencies are not backward compatible

To make a release:

* Change the the version in [setup.py](setup.py)
* run `make release`


Project details


Release history Release notifications | RSS feed

This version

0.4.0

Download files

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

Source Distributions

No source distribution files available for this release.See tutorial on generating distribution archives.

Built Distribution

c2cwsgiutils-0.4.0-py3-none-any.whl (16.8 kB view details)

Uploaded Python 3

File details

Details for the file c2cwsgiutils-0.4.0-py3-none-any.whl.

File metadata

File hashes

Hashes for c2cwsgiutils-0.4.0-py3-none-any.whl
Algorithm Hash digest
SHA256 f11a72ecc0950ce2679d632ba05cf804688259aeea864a65cd4ef5a899f48ade
MD5 8f65304093499ab10b9ef23962287ce9
BLAKE2b-256 2658b5740ea617dce9c646de2e615b0a8204632e8ce8379d77158715b98b238c

See more details on using hashes here.

Provenance

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