skillfed

gritql

Python bindings for GritQL

gritql v0.2.0 114.8K downloads/30d#12,277 on PyPI
Permissive license MIT DORMANT released

What it is and what it does

GritQL is a Python binding for a code query and transformation language built in Rust. It lets you write declarative patterns to find and modify code across JavaScript, TypeScript, Python, JSON, Java, Terraform, Solidity, CSS, Markdown, YAML, Rust, Go, and SQL without needing to understand AST details—any code snippet can serve as a starting pattern. The language is designed to scale to large repositories and includes a module system with reusable patterns.

You install it as a Python package, but it acts as a bridge to the underlying Rust engine. Since the package is dormant (last release 657 days ago), it is no longer actively maintained, so you should expect no updates or bug fixes. It has no Python runtime dependencies, making installation lightweight.

Use it for:

  • Search and refactor a large codebase across multiple languages using a single query syntax.
  • Automate code migrations or standardization tasks across JavaScript, Python, and other supported languages.
  • Build custom linting or code-quality rules that apply pattern-based fixes automatically.
  • Query and modify infrastructure-as-code files (Terraform, YAML) alongside application code.
  • Reuse or share code transformation patterns via Grit's module system across teams.

Worth the install?

AI-flagged interpretation of the facts on this page — verify before relying

GritQL is a Python binding for a declarative query language that searches and modifies source code across multiple programming languages using pattern matching.

Yes, if you need multi-language code search and transformation at scale and can tolerate a dormant package. The MIT license and zero runtime dependencies make it low-friction to try. However, be aware that no active maintenance means you will not receive updates, bug fixes, or support for new language versions. Suitable for one-off migrations or stable, self-contained use cases; not recommended if you need ongoing support or frequent updates.

Install

gritql on PyPI

pip

pip install gritql

uv

uv add gritql

poetry

poetry add gritql

Installing gritql

Before you install

Installation is straightforward with no runtime dependencies. The package is dormant (657 days since last release), so expect no active maintenance or bug fixes going forward.

License in practice

MIT license is permissive, allowing commercial and private use with minimal restrictions—you may use, modify, and distribute this package freely as long as you include the license notice.

Quickstart

pip install gritql
import gritql
# Use gritql module to construct and run queries on source code

The package is a Python binding to a Rust-based tool; the underlying GritQL engine must be available in your environment for queries to execute.

Verify before relying

  • Whether the Rust-based GritQL engine is bundled with the wheel or must be installed separately.
  • What Python version is actually required (classifiers list 2.7 through 3.12, but requires_python is unspecified).
  • Whether dormant status means the binding is stable or no longer maintained alongside upstream GritQL.

Package facts

License MIT (permissive)
Python support not specified
Install friction low — pure-Python wheel
Runtime dependencies none
Maintenance dormant — 657 days since the last release
First released
Downloads 114,847/month — #12,277 on PyPI (30-day window, as of 2026-08-14)
Known vulnerabilities none known (OSV.dev, checked 2026-08-14)

Evidence: gritql-0.2.0-py2.py3-none-any.whl; gritql-0.2.0-py3-none-any.whl

License :: OSI Approved :: MIT LicenseProgramming Language :: Python :: 2Programming Language :: Python :: 2.7Programming Language :: Python :: 3Programming Language :: Python :: 3.10Programming Language :: Python :: 3.11Programming Language :: Python :: 3.12Programming Language :: Python :: 3.4Programming Language :: Python :: 3.5Programming Language :: Python :: 3.6Programming Language :: Python :: 3.7Programming Language :: Python :: 3.8Programming Language :: Python :: 3.9

Tags

code search and refactoringsource code pattern matchingmulti-language code transformationautomated code modificationcodebase query languageAST-free code rewritinglarge repository code search
code-searchrefactoringmulti-language

More Software Development packages