Split a single python file into a module with multiple files.
Project description
PySplit
PySplit is your friendly neighborhood Python file splitter! It takes a hefty Python file and splits it into a neat module with smaller, manageable files. It's not too stupid, either! It figures out which imports are needed in each new file and keeps them intact. If a main function or standard main block is detected, it's moved the new module main at __main__.py
.
Installation
Clone the repository and let Poetry do its magic:
git clone https://github.com/GRAYgoose124/pysplit.git
cd pysplit
poetry install
Usage
Unleash PySplit on your Python file with a simple command:
poetry shell
pysplit your_python_file.py
Watch as your file is transformed into a tidy module with smaller files. This new directory module can be imported or ran similarly to the original file!
Testing
Run the tests with the unittest module:
poetry run python -m unittest discover tests
License
PySplit is released under the MIT license.
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
File details
Details for the file monosplit-0.1.0.tar.gz
.
File metadata
- Download URL: monosplit-0.1.0.tar.gz
- Upload date:
- Size: 4.6 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/4.0.2 CPython/3.11.4
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | ed9f3519c3d8ca42762b8d376b2b3ccbcb374f66a68dc1e8482b152f85597e8e |
|
MD5 | 4e67224726f04b2034cf399081b144f8 |
|
BLAKE2b-256 | 1ac0ed9068697a710a2d58d8642be74c4d80478f7ceebbb747fc79cd29f7025b |
File details
Details for the file monosplit-0.1.0-py3-none-any.whl
.
File metadata
- Download URL: monosplit-0.1.0-py3-none-any.whl
- Upload date:
- Size: 5.8 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/4.0.2 CPython/3.11.4
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 8ed0a1144202ced9b75caeda9c3d6440dcdac6e8e002d4fbb7154e4528e7d422 |
|
MD5 | daf31cb0b01ef3a5db91cf559219db97 |
|
BLAKE2b-256 | d9f045f6cc237041c62f1e14754c271215466f3a6085de161b8d26dde784e83f |