No project description provided
Project description
rustgrok
rustgrok is a python wrapper for the rust grok library written by Michael Nitchinger(https://github.com/daschl/grok).
Installation
pip install rustgrok
Usage
grok = rustgrok.Grok()
grok.compile("%{IP:client} %{WORD:method} %{URIPATHPARAM:request} %{NUMBER:bytes} %{NUMBER:duration}")
result = grok.match_against("55.3.244.1 GET /index.html 15824 0.043")
assert result.get("client") == "55.3.244.1"
assert result.get("method") == "GET"
assert result.get("request") == "/index.html"
assert result.get("bytes") == "15824"
assert result.get("duration") == "0.043"
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
rustgrok-0.1.1.tar.gz
(6.0 kB
view hashes)
Built Distribution
Close
Hashes for rustgrok-0.1.1-cp39-abi3-manylinux_2_34_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 7f9772f8680f66ddec908495730c52000b72c85de6f8aa35122716b5e089b49c |
|
MD5 | ecbdb2c04d5432f4e20eb1c20af9b7ce |
|
BLAKE2b-256 | 0f888a055ec13161172f118998894382e6a2aa63069c5446917b6a0b99451d3b |