Skip to main content

Parse log lines in the logfmt style.

Project description


Python package for parsing log lines in the logfmt style. See the original project by Blake Mizerany and Keith Rarick for information about logfmt conventions and use:

Using logfmt

Easily process lines from logfmt formatted input:

from logfmt import parse

input = StringIO('\n'.join(['key1=value1', 'key2=value2']))
for values in parse(input):
    print values

This program produces this output:

{'key1': 'value1'}
{'key2': 'value2'}


To install it, simply:

pip install logfmt

Project details

Download files

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

Files for logfmt, version 0.1
Filename, size & hash File type Python version Upload date
logfmt-0.1-py2.py3-none-any.whl (2.9 kB) View hashes Wheel 2.7
logfmt-0.1.tar.gz (2.8 kB) View hashes 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