Create the file and folder structure for a Python package
Project description
create-python-package
Initialize a new package using best practices as described by the Python Packaging Authority (PyPA).
Perfect for beginners and experts alike!
> create-python-package mypackage
No more guesswork!
The file structure you're left with looks like this
mypackage/
├── LICENSE
├── README.md
├── activate-venv -> /private/tmp/mypackage/venv/bin/activate
├── mypackage
│ ├── __init__.py
│ └── main.py
└── setup.py
To publish, run
> publish-python-package packagepath
Virtualenv ready to go!
Inside the directory you can run
source activate-venv
to activate an isolated Python environment that was created specifically for that package. To deactivate it, type
deactivate
To learn more about virtual environments, see Creating Virtual Environments.
Install
My recommendation is to run the latest version of create-python-package
with pipx rather than installing it and freezing the version on your system. This is because create-python-package
will be updated to reflect current best practices, and you will automatically be using the latest by running with pipx.
Install pipx.
> pipx create-python-package mypackage # runs latest version
and to publish
> pipx --package create-python-package publish-python-package mypackage # runs latest version
If you really want to install it you can.
> pipx install create-python-package
Requires Python 3.6+.
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
File details
Details for the file create-python-package-0.0.0.3.tar.gz
.
File metadata
- Download URL: create-python-package-0.0.0.3.tar.gz
- Upload date:
- Size: 5.0 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/1.12.1 pkginfo/1.4.2 requests/2.19.1 setuptools/40.4.3 requests-toolbelt/0.8.0 tqdm/4.27.0 CPython/3.6.2+
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | f9727acf32d2a6fe1f1b89bf009872848b1c0a0f6f71c1021c532dbcfdfe5db5 |
|
MD5 | c8403914e64585cc704f734fa3d550a8 |
|
BLAKE2b-256 | 33757a65709efb4526edbe575c690eb21ec8e299a5f25d596b68f511d9d251fe |
File details
Details for the file create_python_package-0.0.0.3-py3-none-any.whl
.
File metadata
- Download URL: create_python_package-0.0.0.3-py3-none-any.whl
- Upload date:
- Size: 7.0 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/1.12.1 pkginfo/1.4.2 requests/2.19.1 setuptools/40.4.3 requests-toolbelt/0.8.0 tqdm/4.27.0 CPython/3.6.2+
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 7b2fcec2955b97f5bdda39008423b6003ae893f1b21ba4489fec02a81865e030 |
|
MD5 | a128230854062b06adcfb3e95acb7631 |
|
BLAKE2b-256 | 6a6888e5a9bf6820cbc3745325bc4cf8aa96a798dc1f418093c41f6c81c86d54 |