Skip to main content

Painless structured logging.

Project description

structlog makes structured logging in Python easy by augmenting your existing logger. It allows you to split your log entries up into key/value pairs and build them incrementally without annoying boilerplate code.

It’s licensed under Apache License, version 2, available from PyPI, the source code can be found on GitHub, the documentation at

structlog targets Python 2.6, 2.7, 3.2, and 3.3 as well as PyPy with no additional dependencies for core functionality.

If you need any help, visit us on #structlog on Freenode!

Bitdeli badge


structlog is written and maintained by Hynek Schlawack. It’s inspired by previous work done by Jean-Paul Calderone and David Reid.

The development is kindly supported by Variomedia AG.

The following folks helped forming structlog into what it is now:

Some of them disapprove of the addition of thread local context data. :)

Third Party Code

The compatibility code that makes this software run on both Python 2 and 3 is heavily inspired and partly copy and pasted from the MIT-licensed six by Benjamin Peterson. The only reason why it’s not used as a dependency is to avoid any runtime dependency in the first place.

The Sphinx (documentation) theme is an adapted version of the Write The Docs theme which in turn is an adapted version of the requests docs theme by Kenneth Reitz which in turn is an adapted version of the Flask docs theme by Armin Ronacher.

Project details

Download files

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

Filename, size & hash SHA256 hash help File type Python version Upload date
structlog-0.3.1-py2.py3-none-any.whl (25.8 kB) Copy SHA256 hash SHA256 Wheel 2.7
structlog-0.3.1.tar.gz (76.1 kB) Copy SHA256 hash SHA256 Source None

Supported by

Elastic Elastic Search Pingdom Pingdom Monitoring Google Google BigQuery Sentry Sentry Error logging AWS AWS Cloud computing DataDog DataDog Monitoring Fastly Fastly CDN SignalFx SignalFx Supporter DigiCert DigiCert EV certificate StatusPage StatusPage Status page