Skip to main content

Arguing

Arguing is a Lightweight and simple Argument parsing library that gives you all the control, no third party libraries.

PyPi Version PyPi Downloads

Installation

You can use PIP to install the library.

pip install arguing

Use

After installing the library, here's a brief tutorial.

import arguing

argument = arguing.set(
    '--argument',  # Argument name.
    type=str,  # Type of the argument, by default string.
    default='default_value',  # If the user don't pass the flag or it doesn't have a value, it will be automatically setted to this. 
    help='Help.'  # Help message
    # You can also add required arguments witht the "required" parameter (Bool)!
)
# Also, you can define a variable to the function and it will return the argument value.

arguing.get('--argument')
# arguing.get() returns the parameters value
# It will return it converted to the selected type on arguing.set() if used
# If arguing.get() can't get the parameters value, it will return the default on arguing.set() or None.

# In case you wan't to check if the user passed an specific argument you can use:
arguing.check('--argument') # Checks if argument is on ARGV and if it has a value, returns Bool.


print(arguing.get('--argument'))
print(argument)
# Both are valid

What's new

  • [Added] Now, you can receive input from pipes with the .pipe() function.
  • [Fixed bug] .check() would return True even if the flag does not have any value.
  • [Fixed bug] When adding flag without a value, raises IndexError. Should return it's default value or None.

Metadata

Release files for arguing 1.3.8

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for arguing 1.3.8
File Size Uploaded Provenance Actions
arguing-1.3.8.tar.gz 3.1 kB Without provenance Details for arguing-1.3.8.tar.gz

Release files / arguing-1.3.8.tar.gz

Download URL arguing-1.3.8.tar.gz
Size 3.1 kB
Tags Source
SHA-256 checksum
How to use checksums
1100042e76d79c709abe5db0320adc65c88976585f4a7c93118d761b020937a4
BLAKE2b-256 checksum
How to use checksums
9ee7fd9b5d68324f669e15fe05e6f3ef3d1da07ecf53ba1b5e60a1bafcaebaea
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/4.0.2 CPython/3.11.2

Security for arguing 1.3.8

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.

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page