$npx skillfedfor your agent

pygrok

A Python library to parse strings and extract information from structured/unstructured data

SkipPyPI Text ProcessingReleased Sep 201698.4K downloads / moMITSource build

Decision gist · record as of 2026-08-14

sdist only — pygrok-1.0.0.tar.gz · builds from source
v1.0.0 · released 2016-09-24

No. The package is dormant (last release 2016-09-24, no activity since 2023-11-22) and has high install friction due to the regex module dependency. While it solves a real problem, the lack of maintenance and Python version uncertainty make it risky for new projects. Consider active alternatives like regex-based parsing libraries or modern log-parsing frameworks.AI-flagged interpretation of the facts on this page — verify before relying

Before you install

  • The regex module must be installed and may require a C compiler on some platforms; Python version compatibility is unspecified.
  • High install friction: the package is dormant (last release 2016-09-24, no commits since 2023-11-22) and requires the regex module as a runtime dependency, which may have compilation requirements on some systems.

License · maintenance · safety

MIT (permissive) — MIT license is permissive; you can use, modify, and distribute this package freely with minimal restrictions.

last release 2016-09-24 (3611 days) · last repo commit 2023-11-22 · 286 stars

0 known vulnerabilities (OSV.dev, 2026-08-14) · 98,424 downloads/mo, #13,085 on PyPI

Verify before relying

pip install pygrok

from pygrok import Grok
text = 'gary is male, 25 years old and weighs 68.5 kilograms'
pattern = '%{WORD:name} is %{WORD:gender}, %{NUMBER:age:int} years old and weighs %{NUMBER:weight:float} kilograms'
grok = Grok(pattern)
result = grok.match(text)
print(result)  # {'name': 'gary', 'gender': 'male', 'age': 25, 'weight': 68.5}
  • Whether the regex module dependency is pre-compiled or requires a C compiler on your platform.
  • Python version compatibility: requires_python is unspecified in the fact sheet.
  • Whether dormancy affects real-world reliability for production log parsing workloads.
Same gist for agents: .md · .json

What it is and what it does

pygrok is a Python library that implements Grok-style pattern matching for parsing and extracting data from strings. Instead of writing complex regular expressions, you define patterns using named capture groups like `%{WORD:name}` and `%{NUMBER:age:int}`, and the library handles the underlying regex matching. It comes with a library of pre-built patterns for common data types (IP addresses, timestamps, log formats, etc.) and supports type conversion during extraction.

The package is built on top of the regex module (not Python's built-in re) because it needs atomic grouping syntax that the standard library doesn't support. It's most useful for log parsing, structured data extraction from semi-formatted text, and situations where you want readable, maintainable pattern definitions instead of dense regex strings.

Use it for

  • Parse application or system logs to extract fields like timestamps, log levels, and messages into structured records.
  • Extract key-value pairs from semi-structured text (e.g., 'name is gary, age 25') without hand-writing regex.
  • Convert matched string values to specific types (int, float) during extraction in a single step.
  • Build data pipelines that need to normalize and structure incoming text data before storage or analysis.

Worth the install?

AI-flagged interpretation of the facts on this page. Verify before relying on it.

Skip

No.

The package is dormant (last release 2016-09-24, no activity since 2023-11-22) and has high install friction due to the regex module dependency. While it solves a real problem, the lack of maintenance and Python version uncertainty make it risky for new projects. Consider active alternatives like regex-based parsing libraries or modern log-parsing frameworks.

Install

pygrok on PyPI

Before you install

High install friction: the package is dormant (last release 2016-09-24, no commits since 2023-11-22) and requires the regex module as a runtime dependency, which may have compilation requirements on some systems.

The regex module must be installed and may require a C compiler on some platforms; Python version compatibility is unspecified.

License in practice

MIT license is permissive; you can use, modify, and distribute this package freely with minimal restrictions.

Quickstart

pip install pygrok

from pygrok import Grok
text = 'gary is male, 25 years old and weighs 68.5 kilograms'
pattern = '%{WORD:name} is %{WORD:gender}, %{NUMBER:age:int} years old and weighs %{NUMBER:weight:float} kilograms'
grok = Grok(pattern)
result = grok.match(text)
print(result)  # {'name': 'gary', 'gender': 'male', 'age': 25, 'weight': 68.5}

Verify before relying

  • Whether the regex module dependency is pre-compiled or requires a C compiler on your platform.
  • Python version compatibility: requires_python is unspecified in the fact sheet.
  • Whether dormancy affects real-world reliability for production log parsing workloads.

Package facts

LicenseMIT permissive
Python supportNot specified
Install frictionHigh. Source build required
Runtime dependenciesNone
MaintenanceDormant 3,611 days since the last release
Last repo commit
First released
Downloads98,424 / month, #13,085 on PyPI 30-day window, as of 2026-08-14
Known vulnerabilitiesNone known OSV.dev, checked 2026-08-14

Evidence: pygrok-1.0.0.tar.gz

Tags

Capabilities
grok pattern parsingextract data from logsnamed regex patternsparse unstructured textstring pattern matchinglog parsing librarystructured data extraction
Topics
log-parsingpattern-matchingdata-extraction
PyPI keywords
python grokregex

Let your AI agent find packages like this

Example. Real query, live index.

You found this page by searching. An agent finds it by wishing: SkillFed indexes 14,416 PyPI packages by what they can do, searchable in plain language.

wish › “grok pattern parsing”

  • pygrokParses strings and extracts structured data using Grok patterns, a…
  • livekit-plugins-xaiIntegrates xAI's Grok LLM with LiveKit's Agent Framework to enable…
  • xai-sdkOfficial Python SDK for xAI's APIs, providing synchronous and…

Give your agent the search over MCP, or paste the wish link into any chat.

More Text Processing packages

regex Worth it
PyPI · Python Modules · released Jul 2026

A drop-in replacement for Python's standard `re` module that adds advanced regex features like nested sets, fuzzy matching, lookaround in conditionals, and full Unicode case-folding while maintaining backward compatibility.

Apache-2.0 AND CNRI-Pythoncompiled wheel · 3.10+
437.7Mdownloads / mo
pyparsing Worth it
PyPI · Text Processing · released Jan 2026

pyparsing provides a library for building text parsers directly in Python code using composable grammar classes, handling quoted strings, whitespace variation, and embedded comments without regex or lex/yacc.

Install it if you need to parse text or define grammars programmatically.

MITpure Python · 3.9+
412.7Mdownloads / mo
fonttools Worth it
PyPI · Text Processing · released May 2026

fonttools manipulates font files in multiple formats (TrueType, OpenType, AFM, Type 1, Mac-specific) and includes TTX, a tool to convert fonts to and from XML text format.

Install it if you need to read, write, or manipulate fonts programmatically or via the TTX command-line tool.

permissive licensepure Python · 3.10+
235.9Mdownloads / mo
docutils With conditions
PyPI · Software Development · released May 2026

Docutils converts plaintext documentation in reStructuredText format into multiple output formats including HTML, XML, and LaTeX using a modular processing system.

BSD-3-Clausepure Python · 3.9+
225.6Mdownloads / mo
RapidFuzz Worth it
PyPI · Text Processing · released Apr 2026

RapidFuzz provides fast fuzzy string matching using Levenshtein Distance and related metrics, implemented mostly in C++ with Python bindings for rapid similarity scoring and approximate string matching.

Install it if you need fuzzy string matching; it's a solid replacement for FuzzyWuzzy with better licensing and performance.

MITcompiled wheel · 3.10+
184.2Mdownloads / mo
tinycss2 Worth it
PyPI · Text Processing · released Nov 2025

tinycss2 parses CSS strings into token and block objects, and generates CSS strings from those objects, following the CSS Syntax Level 3 specification without enforcing specific properties or values.

Install it if your project requires CSS tokenization or syntax manipulation.

BSD-3-Clausepure Python · 3.10+
113.2Mdownloads / mo

See also pampy · stringparser · rebulk · hyperscan · commonregex · exrex · schema · unstructured · logstash_formatter · repath