Provides some common setup actions for argparse. Import and be happy.
Specifically: init_parser() sets up help, version, and docstring options for a program. Help and version are easy to get with argparse normally; printing your docstring is the interesting part. It returns a parser with these basic options configured. After that, you’ll want to your application-specific customizations.
print_and_exit() is an argparse action for printing an arbitrary string - specifically, in this case, a program’s docstring.
Usage
>>> __version__ = "1.0"
>>> __date__ = "Date of this version's release"
>>> #__doc__ is your docstring, which almost every module should have
>>> import basic_argparse
>>> parser = basic_argparse.init_parser("my awesome program", __version__,
>>> __date__, __doc__)
======== Versions ========
Version 1.1: Added sample usage to readme
Version 1.0: Extracted from UNT_to_IPA.py
Metadata
Release files for basic_argparse 1.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 | Actions |
|---|---|---|---|---|
| basic_argparse-1.1.zip | 5.9 kB | Without provenance | Details for basic_argparse-1.1.zip |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| basic_argparse-1.1-py27-none-any.whl | Python 2.7 | none | any | Details for basic_argparse-1.1-py27-none-any.whl |
Total release size: 9.7 kB
Release files / basic_argparse-1.1.zip
| Download URL | basic_argparse-1.1.zip |
|---|---|
| Size | 5.9 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
470dff35a41a89ba7dce4bc5c0f75e4542d8f554be5631a492b0f7b05698b12c
|
|
BLAKE2b-256 checksum How to use checksums |
87d7351c929ce2b4bf528550c471b7980abd23943c07e34580db42c88b014188
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
Release files / basic_argparse-1.1-py27-none-any.whl
| Download URL | basic_argparse-1.1-py27-none-any.whl |
|---|---|
| Size | 3.8 kB |
| Tags | Python 2.7 |
|
SHA-256 checksum How to use checksums |
741d3e416b1e0bb04feb1b0dd10dc7ff94ffa27fe5e50da1eac4c99c4664af52
|
|
BLAKE2b-256 checksum How to use checksums |
9bce0a9bb91eca26addb3bc9564d5c780952db62fdf9f772dec921daca8dd3c7
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
Security for basic_argparse 1.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.
To learn more about protecting yourself from malicious actors, visit our package security documentation.