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.0.tar.gz
(5.6 kB
view hashes)
Built Distributions
Close
Hashes for rustgrok-0.1.0-cp39-cp39-manylinux_2_34_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | d9397b5cc4541d354318277751d144c59efdf2c26e7dec45527d21e251a6b24c |
|
MD5 | 337faf2786d0e243df62852f31f7cbd5 |
|
BLAKE2b-256 | b08b788d965d4a935db85fcb9e06a8d50f72128d6c3cd3c103296bc96a4b8fe1 |
Close
Hashes for rustgrok-0.1.0-cp39-abi3-manylinux_2_34_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | f4df50dc02785a02d48aa788692d1219cc3d81759d22dc0f6a215b7c3d1e6353 |
|
MD5 | a2eb7ca55e8b35e6fa72ca18ba6eb5a3 |
|
BLAKE2b-256 | 8c59d377c47ffbcd3612a7b84e62b2bf2a1229ea70aa47a00d02edec7fef4db1 |