A pluggable framework for building codemods in Python
Project description
codemodder-python
This is the Python version of the Codemodder Framework.
Codemodder is sponsored by pixee.ai.
Development Status
As of v0.80.0 the codemod API is relatively stable. However, backwards compatibility between releases will not be guaranteed until version 1.0.0.
See CHANGELOG.md for detailed release notes.
Installation
The codemodder package is available on PyPI. To install, run:
$ pip install codemodder
To install the package from source, use pip:
$ pip install /path/to/codemodder-python
Running Locally
The codemodder package provides an executable called codemodder. This should be available on your path by default after installation.
For basic usage, run the codemodder command with a target directory path:
$ codemodder /path/to/my-project
Note that by default codemodder will make changes to files in your target directory. To run codemodder without making updates on disk, use the --dry-run flag:
$ codemodder --dry-run /path/to/my-project
To list all available codemods (including any that are registered with installed plugins), use the --list option:
$ codemodder --list
For a full list of options, use the --help flag:
$ codemodder --help
Architecture
Codemods are composed of the following key components:
- Detector
- Transformer(s)
- Metadata
Custom Codemods
The Python codemodder supports a plugin infrastructure for custom codemods. For users interested in developing a custom codemod plugin, we recommend starting with the Cookiecutter template.
Documentation
Coming soon!
Contributing
See CONTRIBUTING.md.
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
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file codemodder-0.82.0.tar.gz.
File metadata
- Download URL: codemodder-0.82.0.tar.gz
- Upload date:
- Size: 355.9 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/5.0.0 CPython/3.12.2
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
38f6cc4dafc462533bf349ee547373457f0bb760f686d1a5516e96d7610b1f5d
|
|
| MD5 |
f23dfec99317db36b615a256708cceb9
|
|
| BLAKE2b-256 |
e9a7c7b54ba6a4c272de04138059dbb39a60c0b719788c091703a277283e5f6f
|
File details
Details for the file codemodder-0.82.0-py3-none-any.whl.
File metadata
- Download URL: codemodder-0.82.0-py3-none-any.whl
- Upload date:
- Size: 215.3 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/5.0.0 CPython/3.12.2
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
b74ae34c37e09b8f94909beaeca7fedd75cb096e4cccb43039c96a211664eef7
|
|
| MD5 |
fe35b9e483c6c87b39daf562203bf9eb
|
|
| BLAKE2b-256 |
31fdce306fb64ccaa78cd796bad9c7e0db5b32f051955a35e263bbfb62143b4c
|