Skip to main content

Rapid python package skeleton generator

Project description

Python Package Initializer

This utility is aimed at creating the boilerplate necessary when starting a new python package. I've found out that packaging even my own script helps tremendously in the long run, and also improves the general quality of my projects.

How do I install it?

Simply open a terminal/prompt and type

pip install pypackinit

and a new command, ppinit will be added to your PATH.

If you can't install packages in your system interpreter (you shouldn't anyway), you can add the --user option.

What does this script do?

Following the PyPA guide on packaging, this script simply generates the essential files to get you started on a new project. Suppose you want to start a project named panino. This means that you have to create by hand the setup.py script, fill it up, then create README, CHANGELOG, LICENSE, etc. With pypackinit, all of this is done with a single line (spread on multiple lines for clarity).

ppinit panino 'The best panino on Earth, with even more cheese!' \
    -a 'Nino Pa' \
    -e ninopa@bread.com \
    -u https://panino.bread.com

Now you have a directory structure like this

project_root/
├── panino
│   └── __init__.py
├── CHANGELOG.md
├── LICENSE.txt
├── MANIFEST.in
├── README.md
└── setup.py

ready to go! In practice, this script is an extremely simplified version of cookiecutter (and it's not a fork).

Why packaging my own modules?

Packaging means that you don't have to set up your PYTHONPATH every time you change machine and that your virtualenvs can simply "install" your other projects.

Suppose that you have Project A and Project B, where B depends on A. With packaging, you could install A in B's virtual environment and then you could fix issues and work on additional features of A without compromising the functionality of B. I have had this issue several times and by pacakging basically all my scripts and modules I have solved most of my problems when it comes to re-use my projects!

Also, I found out that sharing code with people that are not comfortable with git and the likes is way easier if you can just send them a wheel. :)

Changelog

1.0

First fully-working version.

Project details


Release history Release notifications | RSS feed

This version

1.0

Download files

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

Source Distribution

pypackinit-1.0.tar.gz (7.0 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

pypackinit-1.0-py3-none-any.whl (7.9 kB view details)

Uploaded Python 3

File details

Details for the file pypackinit-1.0.tar.gz.

File metadata

  • Download URL: pypackinit-1.0.tar.gz
  • Upload date:
  • Size: 7.0 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.2.0 pkginfo/1.6.0 requests/2.24.0 setuptools/50.3.2 requests-toolbelt/0.9.1 tqdm/4.50.2 CPython/3.8.5

File hashes

Hashes for pypackinit-1.0.tar.gz
Algorithm Hash digest
SHA256 52885dd306702ada911b9e169c7f9a5b35d9b0e9f0bff5efdd147d4c6b29ece4
MD5 2864877b52df64e2e2f38f74f8afa4ec
BLAKE2b-256 31b668073c37ace732afea7b8978e9aa5ae82f386c7cb654e771eec5047e26d7

See more details on using hashes here.

File details

Details for the file pypackinit-1.0-py3-none-any.whl.

File metadata

  • Download URL: pypackinit-1.0-py3-none-any.whl
  • Upload date:
  • Size: 7.9 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.2.0 pkginfo/1.6.0 requests/2.24.0 setuptools/50.3.2 requests-toolbelt/0.9.1 tqdm/4.50.2 CPython/3.8.5

File hashes

Hashes for pypackinit-1.0-py3-none-any.whl
Algorithm Hash digest
SHA256 c1bd8c3a331ad6b7ef2d22ebe92cb2d27e801b2818c78bd853762f4601763e7f
MD5 196c00fc115af421f5ba67843dc42ffc
BLAKE2b-256 51087774bf6f383de1ff8cd4df055f88a4780a8e55af336a6d287ee43215df62

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page