Skip to main content

An opinionated Python package template generator

Project description

pypk

An opinionated Python packaging template generator.

Overview

pypk autogenerates a complete python package skeleton that is installable out of the box. It assumes the following tools are used in your development workflow:

However, once the template is generated, pypk gets out of your way, so you are free to add and/or remove tools, frameworks, and libraries as needed.

Installation

pip install pypk

Getting Started

It's recommended you install and use pypk in the same virtual environment you plan to develop your Python package in.

Project Creation

To create a new skeleton project, run the create command:

pypk create </path/to/project/root> -a <author-name> -e <author-email>

Additionally, you can pass the following arguments:

  • -c/--config: a json config file (see the Configuration section).
  • -d/--description: set the package description in the generated setup.py
  • -p/--py-version: set the minimum Python version supported by the project.
  • --init-git/--skip-git-init: initialize git in the generated project (or skip it).
  • --create-tests-dir/--skip-tests-dir: create a top level tests directory in the generated project (or skip it).

Run pypk create --help for more details.

Configuration

pypk supports a configuration which holds (default) parameters for project creation. Specifically, the following parameters can be set in a json config file:

  • author (key=author)
  • email (key=email)
  • description (key=description)
  • py-version (key=py_version)
  • init-git (key=init_git)
  • create-tests-dir (key=tests_dir)

Additionally, default values can be set via the cli so they do not need to be specified whenver the create command is run. pypk will create a json file under the user config dir as defined by appdirs. To set a value, run the following:

pypk config <key> <value>

To print out the currently set value, run:

pypk config <key>

License

MIT

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

pypk-0.6.0.tar.gz (14.5 kB view hashes)

Uploaded Source

Built Distribution

pypk-0.6.0-py3-none-any.whl (12.6 kB view hashes)

Uploaded Python 3

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