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 details)
Built Distribution
File details
Details for the file rehome-0.0.1.tar.gz
.
File metadata
- Download URL: rehome-0.0.1.tar.gz
- Upload date:
- Size: 13.3 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/4.0.1 CPython/3.10.6
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | cc522a0bc4f72b9558b0e5e0b8d4f0089f8b5abcfaf36bfcaf53a4e5693fd188 |
|
MD5 | 14f86a35a1059604b5378ed794f3e0a9 |
|
BLAKE2b-256 | 1c7aef979d44c8dd51fc683afdf2e6654bd48bbbf368578aa89f7c60d3dae76b |
File details
Details for the file rehome-0.0.1-py3-none-any.whl
.
File metadata
- Download URL: rehome-0.0.1-py3-none-any.whl
- Upload date:
- Size: 5.1 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/4.0.1 CPython/3.10.6
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 3f89d752fb3f5a684c974f975c7efb24ef441eac68a50f284fcb4c85b4bc53a1 |
|
MD5 | d789cab5c8bd53f9064f618f297ab6d9 |
|
BLAKE2b-256 | 666bc31c323c609e8c01c7858c2153fabea2bff137cb473de29ccc0aae994e24 |