$npx skillfedfor your agent

openrewrite

OpenRewrite automated refactoring for Python.

With conditionsPyPI Quality AssuranceReleased Aug 2026112.3K downloads / moModerne Source Available LicensePure Python

Decision gist · record as of 2026-08-14

pure-Python wheel — openrewrite-8.90.0-py3-none-any.whl
v8.90.0 · released 2026-08-14 · Python >=3.10 · 3 runtime deps: more_itertools, ty-types, parso

Yes, if you need to author and test Python refactoring recipes and have access to the Moderne CLI infrastructure. The package is actively maintained, has no known vulnerabilities, and low install friction. However, verify that the Moderne Source Available License terms suit your use case, and confirm that your deployment environment can support the JVM runtime requirement for executing recipes at scale.AI-flagged interpretation of the facts on this page — verify before relying

Before you install

  • Recipes run against real codebases via the Moderne CLI over an RPC bridge; there is no standalone in-process Python parser entry point.
  • Active maintenance with a recent release and no known vulnerabilities.
  • Low install friction with three lightweight runtime dependencies.

License · maintenance · safety

Moderne Source Available License (unclear) — Licensed under Moderne Source Available License, which is not a standard open-source license. Verify the license terms apply to your use case before adopting.

last release 2026-08-14 (0 days) · last repo commit 2026-08-14 · 3,648 stars

0 known vulnerabilities (OSV.dev, 2026-08-14) · 112,268 downloads/mo, #12,374 on PyPI

Verify before relying

pip install openrewrite

from rewrite.test import RecipeSpec, python

spec = RecipeSpec(recipe=YourRecipe())
spec.rewrite_run(python("before_code", "after_code"))
  • Whether the Moderne Source Available License permits commercial use or requires a separate agreement.
  • What Python versions the JVM runtime component supports when executing recipes via the Moderne CLI.
  • Whether recipes authored with this package can be executed without the Moderne CLI infrastructure.
Same gist for agents: .md · .json

What it is and what it does

OpenRewrite Python is a framework for writing automated code refactoring recipes that transform Python source code. It provides a lossless semantic tree representation of Python code, a recipe authoring API using dataclasses and visitor patterns, and a test harness for validating transformations before deployment. Recipes are written in pure Python and unit-tested locally, but execution against real codebases is orchestrated by the JVM runtime via the Moderne CLI over an RPC bridge—there is no standalone in-process parser.

The package is designed for teams that need to apply large-scale, consistent code transformations across Python repositories. Typical use involves subclassing the Recipe class, implementing a visitor that traverses and modifies the tree, and registering the recipe with the Moderne CLI marketplace. The test harness lets you verify transformations on code snippets before running them at scale.

Use it for

  • Rename function calls or refactor APIs across a large codebase without manual edits.
  • Migrate deprecated library calls to their modern equivalents automatically.
  • Enforce code style or naming conventions by applying transformations to all matching patterns.
  • Delete or replace obsolete code patterns in batch across multiple repositories.
  • Author and test custom refactoring recipes for domain-specific code transformations.
  • Build a marketplace of reusable recipes for your organization's refactoring needs.

Worth the install?

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

With conditions

Yes, if you need to author and test Python refactoring recipes and have access to the Moderne CLI infrastructure.

The package is actively maintained, has no known vulnerabilities, and low install friction. However, verify that the Moderne Source Available License terms suit your use case, and confirm that your deployment environment can support the JVM runtime requirement for executing recipes at scale.

Install

openrewrite on PyPI

Before you install

Active maintenance with a recent release and no known vulnerabilities. Low install friction with three lightweight runtime dependencies. Requires Python 3.10 or later.

Recipes run against real codebases via the Moderne CLI over an RPC bridge; there is no standalone in-process Python parser entry point.

License in practice

Licensed under Moderne Source Available License, which is not a standard open-source license. Verify the license terms apply to your use case before adopting.

Quickstart

pip install openrewrite

from rewrite.test import RecipeSpec, python

spec = RecipeSpec(recipe=YourRecipe())
spec.rewrite_run(python("before_code", "after_code"))

Verify before relying

  • Whether the Moderne Source Available License permits commercial use or requires a separate agreement.
  • What Python versions the JVM runtime component supports when executing recipes via the Moderne CLI.
  • Whether recipes authored with this package can be executed without the Moderne CLI infrastructure.

Package facts

LicenseModerne Source Available License unclear
Python supportSupports the current Python release >=3.10
Install frictionLow. Pure-Python wheel
Runtime dependencies
3 packages
more_itertoolsty-typesparso
MaintenanceActively maintained 0 days since the last release
Last repo commit
First released
Downloads112,268 / month, #12,374 on PyPI 30-day window, as of 2026-08-14
Known vulnerabilitiesNone known OSV.dev, checked 2026-08-14
Classifiers
Development Status :: 4 - BetaIntended Audience :: DevelopersProgramming Language :: Python :: 3.10Programming Language :: Python :: 3.11Programming Language :: Python :: 3.12Programming Language :: Python :: 3.13Topic :: Software Development :: Code GeneratorsTopic :: Software Development :: Quality AssuranceTyping :: Typed

Evidence: openrewrite-8.90.0-py3-none-any.whl

Tags

Capabilities
python code refactoring frameworkautomated code transformationpython source code modernizationrecipe-based code generationcodemod authoring toolpython ast manipulationlossless semantic tree
Topics
code-transformationrefactoring-frameworkast-manipulation

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 › “python code refactoring framework”

  • openrewriteOpenRewrite Python provides a framework for authoring and testing…
  • libcstlibcst parses Python source code into a concrete syntax tree that…
  • laboratoryLaboratory lets you safely refactor critical code paths by running…

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

More Quality Assurance packages

coverage Worth it
PyPI · Testing · released Aug 2026

Coverage.py measures which lines of Python code are executed during test runs, reporting coverage percentages and identifying untested code paths.

Install it if you want to measure test completeness or enforce coverage thresholds in your project.

permissive licensepure Python · 3.10+
335.8Mdownloads / mo
ruff Worth it
PyPI · Python Modules · released Aug 2026

Ruff is a Python linter and code formatter written in Rust that combines linting, formatting, and code fixing into a single tool, replacing Flake8, Black, isort, and related utilities.

MITcompiled wheel · 3.7+
316.1Mdownloads / mo
pexpect With conditions
PyPI · Software Development · released Nov 2023

Pexpect spawns and controls interactive console applications by sending input and matching output patterns, automating tasks that would otherwise require manual interaction.

ISCpure Pythonaging
200.8Mdownloads / mo
black Worth it
PyPI · Python Modules · released May 2026

Black reformats Python source code to a consistent style by parsing entire files and rewriting them according to an opinionated, deterministic set of rules, eliminating manual formatting decisions.

MITpure Python · 3.10+
179.9Mdownloads / mo
pytest-xdist Worth it
PyPI · Utilities · released Jul 2025

pytest-xdist distributes pytest tests across multiple CPU cores or machines to speed up test execution, with the simplest usage being `pytest -n auto` to spawn workers equal to available CPUs.

Install it if your test suite takes long enough that parallelization would save meaningful time.

MITpure Python · 3.9+
177.1Mdownloads / mo
cfn-lint Worth it
PyPI · Quality Assurance · released Aug 2026

Validates AWS CloudFormation templates in YAML or JSON format against resource provider schemas and best practices, checking property values and configuration correctness.

Install it if you work with CloudFormation templates.

MIT-0pure Python
114.9Mdownloads / mo

See also google-pasta · oelint-parser · rope · recipe-scrapers · ordereddict · flake8-plugin-utils · luaparser · expecttest · libcst · tokenize-rt