rehome 0.0.1

Creator: bradpython12

Last updated:

0 purchases

rehome 0.0.1 Image
rehome 0.0.1 Images

Languages

Categories

Add to Cart

Description:

rehome 0.0.1

rehome





Rehome your Python scripts into nice interconnected modules
Read The Docs
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"]

rehome is available from PyPI, and
the code is on GitHub

License

For personal and professional use. You cannot resell or redistribute these repositories in their original state.

Customer Reviews

There are no reviews.