PyPackify is a tool for converting multiple Python files into a structured Python package. It generates essential package files for easy usage and distribution.
- Converts multiple Python files into a Python package.
- Generates a
pyproject.tomlfile for Python packaging. - Creates a root-level
__init__.pyto expose package functionality.
Use Python 3.6 or newer. The script uses only the Python standard library.
git clone https://github.com/SpyC0der77/PyPackify.git
cd PyPackify- Create a
config.jsonfile specifying your package metadata and Python files to include.
{
"name": "example_package",
"version": "0.1.0",
"author": "John Doe",
"author_email": "johndoe@example.com",
"description": "An example package created with PyPackify.",
"license": "MIT",
"files": [
"example1.py",
"example2.py"
]
}- Run the script:
python pypackify.py --config config.json- Check the generated package directory:
example_package/
├── README.md
├── pyproject.toml
├── __init__.py
├── src/
│ ├── example1.py
│ ├── example2.py
Paths in files resolve relative to the working directory. Invalid or missing Python files are skipped. Running the script again with the same package name overwrites generated metadata and copied files.
The generated layout is a starting point. It creates __init__.py at the root while setuptools discovery points at src, so review the package layout and imports before building or publishing it. The script does not build a wheel or publish to PyPI.
This project is licensed under the MIT License.