efficient-args - Helper Methods For argparse
Provides some simple methods for setting up scripts / apps in a multi-environment context.
Usage
Installation:
pip install efficient-args
This library was created to be used with scripts / apps that operate in multiple environments
from efficient_args import FORMATTER, addBaseArgs, addListArgs, parseArgs, parseCmdLineList
import argparse
if __name__ == "__main__":
parser = argparse.ArgumentParser(description="Example Command Parser", formatter_class=FORMATTER)
addBaseArgs(parser, addEnvironment=True)
addListArgs(parser, required=True, itemName="Words")
argDict = parseArgs(parser)
words = parseCmdLineList(argDict)
print(words)
Results in the output:
user@pc MINGW64 /efficient_args
23:50:45 (env) $ python examples/ex1.py -f tests/itemList.txt
{'environment': 'test', 'list': [], 'file': 'tests/itemList.txt'}
['x33', 'x88', 'x44']
Cloning For Development
Set up a virtual environment. Once an environment is set up, activate it and add dependencies with the following:
pip install -r requirements/dev.txt
The dev.txt file includes:
- BLACK, a code formatter, see notes at the bottom of this file for details
- build, which provides the support for the building of the package
To run tests:
python -m unittest discover -s tests/
Code Formatting
Code formatting is done using BLACK. BLACK allows almost no customization to how code is formatted with the exception of line length, which has been set to 119 characters.
Use the following to bulk format files:
black . -l 144
Creating A New Release
Please do the following when making a new release, most are documented above:
- Run tests
- Code format
- Be sure to update the change log and _metadata.json with version and notes
- git add, commit, and push changes
- run the following code to generate a wheel:
python -m build
Metadata
Release files for efficient-args 1.3.0
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 |
|---|---|---|---|---|
| efficient_args-1.3.0.tar.gz | 5.8 kB | With provenance | Details for efficient_args-1.3.0.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| efficient_args-1.3.0-py3-none-any.whl | Python 3 | none | any | Details for efficient_args-1.3.0-py3-none-any.whl |
Total release size: 12.2 kB
Release files / efficient_args-1.3.0.tar.gz
| Download URL | efficient_args-1.3.0.tar.gz |
|---|---|
| Size | 5.8 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
9b7300721c9a24b86f9fa252116f25e4d22da6d8b896968f02aefb6e0f2e518e
|
|
BLAKE2b-256 checksum How to use checksums |
b7abe26cdc82f43a95cfbbb44705e874acf7370532885b32a5c86ced23c38dd7
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/6.1.0 CPython/3.13.7
|
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.
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Apr 6, 2026.
Transparency logRelease files / efficient_args-1.3.0-py3-none-any.whl
| Download URL | efficient_args-1.3.0-py3-none-any.whl |
|---|---|
| Size | 6.4 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
e731c4b185a09d23095e64f5117a4b97d10b2efb83fdb24eb8b705144985217c
|
|
BLAKE2b-256 checksum How to use checksums |
960a8608df591d44e33d5c77b84334294ddcf5d7ba5edd003cad448f836ef9d1
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/6.1.0 CPython/3.13.7
|
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.
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Apr 6, 2026.
Transparency logSecurity for efficient-args 1.3.0
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.
Full provenance
Both files in this release have been uploaded with provenance metadata.
Attestation for efficient_args-1.3.0.tar.gz
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Apr 6, 2026.
Transparency logA 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.