Logstash's grok is a string parsing tool which built on top of regex, it provides many patterns that make string parsing jobs so much easier, I just fell in love with it the first time I used it. But unfortunately, it's written in Ruby, makes it impossible to be used in my Python projects, so I'm wondering is there any Python implementation of grok, or is there any Python alternative that can simplify string parsing like grok do?
I built a project in github called pygrok based on @georg 's answer to meet my log pattern parsing requirements in python codes.I think pygrok may be helpful for you,Let me introduce it in brief:
A Python library to parse strings and extract information from structured/unstructured data
You can find it here.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With