Rehome your Python scripts into nice interconnected modules
Project description
rehome
Rehome your Python scripts into nice interconnected modules
Requires
- Python 3.10+
Installation
pip install rehome
Usage
The CLI allows you to instantiate the Rehome
class central to this package directly.
usage: rehome [-h] [-p [PROTECT ...]] [-g [GROUP ...]] [-d] target
Rehome(target: pathlib.Path, protect: list[str] = <factory>, group: list[str] = <factory>, debug:
bool = False)
positional arguments:
target
options:
-h, --help show this help message and exit
-p [PROTECT ...], --protect [PROTECT ...]
(default: <factory>)
-g [GROUP ...], --group [GROUP ...]
(default: <factory>)
-d, --debug (default: False)
Protected names
-p
specifies names to protect, i.e. to keep in the source file
rehome foo.py -p main
...protects the name main
, and ensures it will stay in the source file
Groups
-g
specifies groups (each argument is a group, separated by spaces)
rehome foo.py -g "hand glove" "foot sock"
...creates two groups of names: ["hand", "glove"]
and ["foot", "sock"]
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
rehome-0.0.1.tar.gz
(13.3 kB
view hashes)
Built Distribution
rehome-0.0.1-py3-none-any.whl
(5.1 kB
view hashes)