Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

logfmt

Package Overview
Dependencies
Maintainers
2
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

logfmt

Parse and generate log lines in the logfmt style.

  • 0.4
  • PyPI
  • Socket score

Maintainers
2

.. image:: https://secure.travis-ci.org/jkakar/logfmt-python.png?branch=master

Logfmt

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

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'}

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"

Installation

To install it, simply: ::

pip install logfmt

FAQs


Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc