A RetroSearch Logo

Home - News ( United States | United Kingdom | Italy | Germany ) - Football scores

Search Query:

Showing content from https://github.com/jkakar/logfmt-python below:

jkakar/logfmt-python: Python package for parsing log lines in the logfmt style.

This project is now managed by @wlonk at https://github.com/wlonk/logfmt-python.

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: https://github.com/kr/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'}

Easily generate lines in logfmt formatted output

from logfmt import format

for line in format({'key1': 'value1'}, {'key2': 'value2'}):
    print line

This program produces this output:

key1="value1"
key2="value2"

To install it, simply:

pip install logfmt

RetroSearch is an open source project built by @garambo | Open a GitHub Issue

Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo

HTML: 3.2 | Encoding: UTF-8 | Version: 0.7.4