Create the file and folder structure for a Python package
Project description
create-python-package
Overview
Initialize a new package using best practices as described by the Python Packaging Authority (PyPA). Perfect for beginners and experts alike. Stop writing boilerplate and start coding.
Generates a project similar to the Python Packaging Authority's sample project, but with various parts autogenerated based on your inputs.
Features
- Creates a battle-tested directory structure with boilterplate for unit tests, license,
setup.py
and more - Sets you up with popular Python environment managers such as venv and Pipenv
- Initializes a git repository for you with a .gitignore file
Usage
This package ships with one CLI entrypoint, create-python-package
.
To interactively answer questions about your project, such as author, license, etc.
$ create-python-package
You will then be prompted with questions such as
question version (0.0.0.1):
question description ():
question entry point (main.py):
question repository url ():
question author (Your Name):
question email (email@doman.com):
question environment management (venv) (options: venv, pipenv, poetry):
question license (mit) (options: mit, gplv3, apache2, bsd3):
These are used to populate setup.py and other files to give you as painless experience as possible when starting a new project.
To use defaults and skip interactive prompts, use the --yes
flag
$ create-python-package --yes
Installation
Python 3.6+ is required
using pip
pip install --user create-python-package
using pipx
pipx allows you to run Python binaries directly, or install packages into isolated virtual environments and add their binaries to your PATH
pipx run create-python-package
or install with
pipx install create-python-package
Generated Directory Structure
>> pipx run create-python-package examplepackage --yes
>> tree -L 2 examplepackage/
examplepackage/
├── examplepackage
│ ├── __init__.py
│ └── main.py
├── LICENSE
├── makefile
├── MANIFEST.in
├── README.md
├── setup.py
├── tests
│ └── test_project.py
└── venv
├── bin
├── include
├── lib
├── lib64 -> lib
├── pyvenv.cfg
└── share
Credits
Inspired by create-react-app
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Hashes for create-python-package-0.3.0.0.tar.gz
Algorithm | Hash digest | |
---|---|---|
SHA256 | 936ae1ac0ebb85ae6281fbffc3cdd9d2a2c27c50ea87a1323b47a65328a9317d |
|
MD5 | 78390768d8a057a60a28008463f172b8 |
|
BLAKE2b-256 | 20cdacba7b38811a86997e8f71144ac6f93e3986844a0236aac413ada7cce13e |
Hashes for create_python_package-0.3.0.0-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 1cd5dbfca5a81344c3587f447af4c84216b151d2c71d5335ebeacd33577d8ebf |
|
MD5 | 8b2323cc58e78ee592ce54d8ba117196 |
|
BLAKE2b-256 | 623a56554503c7445532a6cb6f96fbe0435f6c162c56cc8334f5821ee03b4e9d |