Repolode
python-rope

python-rope/rope

A Python refactoring library that performs safe code transformations such as renaming, moving, and extracting code across a project.

Open-source alternative to:PyCharm

Stars
2,245
Forks
203
Open issues
177
Last commit
2 days ago

What is it?

Rope is a Python library focused on refactoring source code. It analyzes a project's Python code and applies structural changes such as renaming symbols, moving definitions between modules, and extracting or inlining code, so that references across files stay consistent.

Rope is written in pure Python and depends only on Python itself, with no Node.js or other runtime requirement. Because the code is Python, it can be read and modified by Python developers. It supports most Python syntax up to Python 3.10, and since version 1.0.0 it no longer runs on Python 2; older Python 2 support lives in the python2 branch and the 0.x releases.

Rope is designed to be used as a library, typically through editor and IDE integrations, and its documentation covers configuration and API usage. Compared with Jedi, which offers basic refactoring alongside completion, Rope concentrates on a wider set of refactoring operations.

Key features

  • 01Renames symbols across a Python project while updating references
  • 02Moves and extracts functions, classes and modules
  • 03Supports most Python syntax up to Python 3.10
  • 04Depends only on Python, with no Node.js requirement
  • 05Usable as a library from editors and IDEs

Use cases

  • Renaming a widely used function or class across a large Python codebase
  • Restructuring modules by moving code into new files
  • Building refactoring features into a custom editor or Python tool

Things to know

  • Supports most Python syntax only up to Python 3.10, so newer syntax may have gaps.
  • Licensed under LGPL-3.0, a copyleft license whose terms apply to modifications of the library.
  • Does not run on Python 2; Python 2 users must use the python2 branch or 0.x releases.

Topics

FAQ

What is rope?
A Python refactoring library that performs safe code transformations such as renaming, moving, and extracting code across a project. Rope is a Python library focused on refactoring source code. It analyzes a project's Python code and applies structural changes such as renaming symbols, moving definitions between modules, and extracting or inlining code, so that references across files stay consistent.
Is rope free to use? What license does it have?
rope is open source under the LGPL-3.0 license. Check the license terms before using it in commercial products.
Is rope still maintained?
Actively maintained. The last commit to rope was on Nov 5, 2026.
What can I use rope for?
Renaming a widely used function or class across a large Python codebase Restructuring modules by moving code into new files Building refactoring features into a custom editor or Python tool
Where can I get rope?
The source code and installation instructions are on GitHub: https://github.com/python-rope/rope

Summary generated by AI from the project's README. GitHub stats refresh daily.

Related projects