Skip to main content

rehome

Documentation CI Status Coverage Checked with mypy Code style: black

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

Metadata

Release files for rehome 0.0.1

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for rehome 0.0.1
File Size Uploaded
rehome-0.0.1.tar.gz 13.3 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for rehome 0.0.1
File Interpreter ABI Platform
rehome-0.0.1-py3-none-any.whl Python 3 none any Details

Total release size: 18.4 kB

Release files / rehome-0.0.1.tar.gz

Download URL rehome-0.0.1.tar.gz
Size 13.3 kB
Tags Source
SHA-256 checksum
How to use checksums
cc522a0bc4f72b9558b0e5e0b8d4f0089f8b5abcfaf36bfcaf53a4e5693fd188
BLAKE2b-256 checksum
How to use checksums
1c7aef979d44c8dd51fc683afdf2e6654bd48bbbf368578aa89f7c60d3dae76b
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/4.0.1 CPython/3.10.6

Release files / rehome-0.0.1-py3-none-any.whl

Download URL rehome-0.0.1-py3-none-any.whl
Size 5.1 kB
Tags Python 3
SHA-256 checksum
How to use checksums
3f89d752fb3f5a684c974f975c7efb24ef441eac68a50f284fcb4c85b4bc53a1
BLAKE2b-256 checksum
How to use checksums
666bc31c323c609e8c01c7858c2153fabea2bff137cb473de29ccc0aae994e24
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/4.0.1 CPython/3.10.6

Release history Release notifications | RSS feed

This release

0.0.1 This release

2 release files

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page