Skip to main content

Create nice CLIs without bloating your apps.

Project description

Arguing

Arguing is a little library who lets you create a nice CLI without bloating your app.
Get what you want with the name you want!

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_type=str,
    default='default_value',
    help_message='Help.'
)
# The first parameter is the argument.
# argument_type is for the type of variable that return on get().
# default sets a default value in case the user don't pass the argument.
# Also, you can define a variable to the function and it will return the argument value.

arguing.get('--argument') # Work with mandatory and non-mandatory arguments.
# 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, returns Bool.

What's new

  • [Fixed bug] When adding flag without a value, raises IndexError. Should return it's default value or None.
  • [Removed] Documentation function.

Project details


Download files

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

Source Distribution

arguing-1.3.4.tar.gz (2.9 kB view details)

Uploaded Source

File details

Details for the file arguing-1.3.4.tar.gz.

File metadata

  • Download URL: arguing-1.3.4.tar.gz
  • Upload date:
  • Size: 2.9 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/4.0.1 CPython/3.10.5

File hashes

Hashes for arguing-1.3.4.tar.gz
Algorithm Hash digest
SHA256 fb9c288c35d2bfc0706adcb4b543f728ade7bb8f3d344fee5f38605552b40f7e
MD5 946d1451cc20ab93138996e275b6f096
BLAKE2b-256 02fce577ee26dd18501384d00732229c60b63ce8ac0138aaa6f29ed9033d6c1b

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