Skip to main content
Donate to the Python Software Foundation or Purchase a PyCharm License to Benefit the PSF! Donate Now

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

Project description

# Box Factory

Create Python packages just like you[*](#footnote) like them, without the hassle.

## Installation

Box Factory requires Python 3.6+.

To install:

`sh 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:

`sh >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:

`sh >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:

`sh 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

<a name=”footnote”>*</a> Assuming you are bcj.

Project details


Download files

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

Filename, size & hash SHA256 hash help File type Python version Upload date
boxfactory-0.2.0-py3-none-any.whl (11.6 kB) Copy SHA256 hash SHA256 Wheel py3
boxfactory-0.2.0.tar.gz (10.4 kB) Copy SHA256 hash SHA256 Source None

Supported by

Elastic Elastic Search Pingdom Pingdom Monitoring Google Google BigQuery Sentry Sentry Error logging AWS AWS Cloud computing DataDog DataDog Monitoring Fastly Fastly CDN SignalFx SignalFx Supporter DigiCert DigiCert EV certificate StatusPage StatusPage Status page