Skip to main content

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. No more guesswork!

Quick Overview

create-python-package mypackage
cd mypackage
source activate-venv

And to publish, run

publish-python-package mypackage

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.

Usage and Installation

pipx allows you to run or install Python binaries from packages

To run the latest version

> pipx create-python-package mypackage  # directly runs latest version

and to publish

> pipx --package create-python-package publish-python-package mypackage  # directly runs latest version

If you would rather install to your system and freeze the version

> pipx install create-python-package

To upgrade the installation

> pipx upgrade create-python-package

Requires Python 3.6+.

Example Session

> create-python-package /tmp/fake
Creating a new Python package in /private/tmp/fake

Creating a virtual environment at /private/tmp/fake/venv
Upgrading pip in the virtual environment.

Initialized a git repository.

Success! Created fake at /private/tmp/fake
Inside that directory, you can run several commands

  source activate-venv
     Activates this package's isolated Python environment

  pip install PACKAGE
    Installs a package to current environment

  pip install -e .
    Installs this package in editable mode to the current environment

We suggest that you being by typing:

  cd fake
  source activate-venv fake

To deactivate the virtual environment, type `deactivate`.

Questions? Create an issue at https://github.com/cs01/create-python-package

Happy hacking!

Credits

Created and published using create-python-package 😄

Inspired by create-react-app

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

create-python-package-0.0.0.5.tar.gz (5.6 kB view details)

Uploaded Source

Built Distribution

create_python_package-0.0.0.5-py3-none-any.whl (11.8 kB view details)

Uploaded Python 3

File details

Details for the file create-python-package-0.0.0.5.tar.gz.

File metadata

  • Download URL: create-python-package-0.0.0.5.tar.gz
  • Upload date:
  • Size: 5.6 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

Hashes for create-python-package-0.0.0.5.tar.gz
Algorithm Hash digest
SHA256 2023b71af256c2166586251aa19a85e964e624b0f37b5b6870f89fcc9dbfe987
MD5 96e3b5adf744b0a94ba59974ac2c75d2
BLAKE2b-256 24fcebc4d630c42571938643050922e4bda7c2f3371a15554620666d1a9850cb

See more details on using hashes here.

File details

Details for the file create_python_package-0.0.0.5-py3-none-any.whl.

File metadata

  • Download URL: create_python_package-0.0.0.5-py3-none-any.whl
  • Upload date:
  • Size: 11.8 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

Hashes for create_python_package-0.0.0.5-py3-none-any.whl
Algorithm Hash digest
SHA256 67e570f4fc277ff2909c0285f52e682ea8acba00a94fbc182a64e8e79e14a913
MD5 6b8736f5d9305466a4cb75bdcf0e3fcb
BLAKE2b-256 b48202d34c966e4efeb9921988b0f25d6d8a4d0d72d97337a247bdb6276ab197

See more details on using hashes here.

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