Skip to main content

No project description provided

Project description

monosplit

monosplit 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

monosplit is available on PyPI! Install it with pip:

pip install monosplit
git clone https://github.com/GRAYgoose124/pysplit.git 
pip install [-e] monosplit 

Usage

Add some # pragma newfile("name") statements to the file you want to split and run:

monosplit 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:

python -m unittest discover tests 

License

PySplit is released under the MIT license.

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

monosplit-0.1.2.tar.gz (4.7 kB view details)

Uploaded Source

Built Distribution

monosplit-0.1.2-py3-none-any.whl (5.9 kB view details)

Uploaded Python 3

File details

Details for the file monosplit-0.1.2.tar.gz.

File metadata

  • Download URL: monosplit-0.1.2.tar.gz
  • Upload date:
  • Size: 4.7 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/4.0.2 CPython/3.11.4

File hashes

Hashes for monosplit-0.1.2.tar.gz
Algorithm Hash digest
SHA256 fe21212bf8595c5e73ac5c2f61ba031077a82797fb3de267036247c07ebb2e79
MD5 f82e03c1f30e8e79d7b07bac6e7a45e4
BLAKE2b-256 4743858207355bdd25ebbab8814f0657dde33babaf23237928b1d327fb63878f

See more details on using hashes here.

File details

Details for the file monosplit-0.1.2-py3-none-any.whl.

File metadata

  • Download URL: monosplit-0.1.2-py3-none-any.whl
  • Upload date:
  • Size: 5.9 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/4.0.2 CPython/3.11.4

File hashes

Hashes for monosplit-0.1.2-py3-none-any.whl
Algorithm Hash digest
SHA256 cfd3cd070f876a7cf6e8d67ec951471b600366f6f9c0fcd38eb8ef9d3f8e95b0
MD5 7347fc6ff92b619a556a9fe5be4ad12e
BLAKE2b-256 9b2913311c59009a6e1d4d0cc85095f3995c209f61354be54b85e5be3812b569

See more details on using hashes here.

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page