This is a structure template for Python command line applications, ready to be released and distributed via setuptools/PyPI/pip for Python 2 and 3.
Please have a look at the corresponding article: http://gehrcke.de/2014/02/distributing-a-python-command-line-application/
Usage
Clone this repository and adopt the bootstrap structure for your own project. This is just a starting point, but I hope a good one. From there on, you should read and follow http://python-packaging-user-guide.readthedocs.org/en/latest/, the definite resource on Python packaging.
Behavior
Flexible invocation
The application can be run right from the source directory, in two different ways:
Treating the bootstrap directory as a package and as the main script:
$ python -m bootstrap arg1 arg2 Executing bootstrap version 0.2.0. List of argument strings: ['arg1', 'arg2'] Stuff and Boo(): <class 'bootstrap.stuff.Stuff'> <bootstrap.bootstrap.Boo object at 0x7f43d9f65a90>
Using the bootstrap-runner.py wrapper:
$ ./bootstrap-runner.py arg1 arg2 Executing bootstrap version 0.2.0. List of argument strings: ['arg1', 'arg2'] Stuff and Boo(): <class 'bootstrap.stuff.Stuff'> <bootstrap.bootstrap.Boo object at 0x7f149554ead0>
Installation sets up bootstrap command
Situation before installation:
$ bootstrap bash: bootstrap: command not found
Installation right from the source tree (or via pip from PyPI):
$ python setup.py install
Now, the bootstrap command is available:
$ bootstrap arg1 arg2 Executing bootstrap version 0.2.0. List of argument strings: ['arg1', 'arg2'] Stuff and Boo(): <class 'bootstrap.stuff.Stuff'> <bootstrap.bootstrap.Boo object at 0x7f366749a190>
On Unix-like systems, the installation places a bootstrap script into a centralized bin directory, which should be in your PATH. On Windows, bootstrap.exe is placed into a centralized Scripts directory which should also be in your PATH.
Metadata
Release files for autocode 0.0.1
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | |
|---|---|---|---|---|
| autocode-0.0.1.tar.gz | 4.0 kB | Without provenance | Details |
Release files / autocode-0.0.1.tar.gz
| Download URL | autocode-0.0.1.tar.gz |
|---|---|
| Size | 4.0 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
3bc20424d4614e631c749b5782cc8c885beabd29a295e3b373b2a70437f977c4
|
|
BLAKE2b-256 checksum How to use checksums |
9a9e3c3374152fb20caed4ea9f57f4af439cb5ba520dea372a553faeccc1e228
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
Security for autocode 0.0.1
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
No provenance found
None of the files in this release were uploaded with provenance metadata.
A note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.