boxfactory

Create Python packages just like you* like them, without the hassle.


Install
pip install boxfactory==0.2.0

Documentation

Box Factory

Create Python packages just like you* like them, without the hassle.

Installation

Box Factory requires Python 3.6+.

To install:

pip install boxfactory

Usage

Once installed, you can start creating packages using the boxfactory script. The most basic invocation is running boxfactory with just the package name:

>boxfactory betterboxfactory
betterboxfactory/.coveragerc
betterboxfactory/CHANGES.txt
betterboxfactory/MANIFEST.in
betterboxfactory/README.md
betterboxfactory/betterboxfactory/__init__.py
betterboxfactory/requirements/install.txt
betterboxfactory/requirements/formatting.txt
betterboxfactory/requirements/tests.txt
betterboxfactory/requirements/types.txt
betterboxfactory/setup.cfg
betterboxfactory/setup.py
betterboxfactory/tests/test_betterboxfactory.py
betterboxfactory/tox.ini

This will create the package in the current directory. boxfactory will create the package itself, as well as a tox setup with three environments: your version of python, formatting using black and flake8, and typing using mypy.

You can specify a place to build the package by passing a directory as the second argument:

>boxfactory package another-directory
another-directory/package/.coveragerc
another-directory/package/CHANGES.txt
another-directory/package/MANIFEST.in
another-directory/package/README.md
another-directory/package/package/__init__.py
another-directory/package/requirements/install.txt
another-directory/package/requirements/formatting.txt
another-directory/package/requirements/tests.txt
another-directory/package/requirements/types.txt
another-directory/package/setup.cfg
another-directory/package/setup.py
another-directory/package/tests/test_package.py
another-directory/package/tox.ini

git

If you pass the --git flag, boxfactory will create a .gitignore file, and will initialize the package repository and commit all created files.

versions

You can supply which versions of python to test against with the versions of python to test against with the --versions flag:

boxfactory legacy --versions 2.7 3.5

scripts

You can make boxfactory generate console scripts using the --script flag and supplying the script name, the space-separated module path, and the function name:

>boxfactory package --script script package cli main
package/.coveragerc
package/CHANGES.txt
package/MANIFEST.in
package/README.md
package/package/__init__.py
package/package/cli.py
package/requirements/install.txt
package/requirements/formatting.txt
package/requirements/tests.txt
package/requirements/types.txt
package/setup.cfg
package/setup.py
package/tests/test_package.py
package/tox.ini

There is also a --cli flag that automatically makes a script named the same thing with your package that invokes <name>.cli:main

* Assuming you are bcj.