Skip to main content

gets inputs from the user on the cmd line for params that you haven't entered programmatically

Project description

get inputs for args

This project is centered around a decorator that gets inputs from the user in the command line for args that you haven't already passed in programmatically. It also converts the inputted value to the wanted type which is specified in the function's annotations, and also supplies the user with a help menu if you have given documentation of the args in the function's docstring.

How to use

First download it:

pip install user_inputs_for_args

Then, To use this decorator, import it to the file you want to use it in and then you can apply it by putting @get_inputs_for_args behind the function you want to apply it to like this:

@get_inputs_for_args
def my_func(arg1, arg2):
  ...

Now when a arg is not programmatically passed in it will ask for a value for the it from the user.

Uses

One use for this decorator are when you are debugging and want to manually input values on the command line instead of them being programmatically put in so you can be sure that nothing has happened to the value before being passed in.

Contributing

You can join the project but there a few standards that I would like to keep in place.

  • Use single-quotes for strings unless double-quotes are necessary
  • You must use tests and your code must be readable
  • make a new branch when you are starting on a new issue or feature
  • You must add a new issue/feature to gitlab every time there is something you want to add/fix
  • Make sure to update documentation after adding new code

Versioning

We use the SemVer standard for versioning

Authors

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

user_inputs_for_args-0.0.1.tar.gz (7.2 kB view details)

Uploaded Source

Built Distribution

user_inputs_for_args-0.0.1-py3-none-any.whl (4.7 kB view details)

Uploaded Python 3

File details

Details for the file user_inputs_for_args-0.0.1.tar.gz.

File metadata

  • Download URL: user_inputs_for_args-0.0.1.tar.gz
  • Upload date:
  • Size: 7.2 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.2.0 pkginfo/1.6.1 requests/2.25.0 setuptools/50.3.2 requests-toolbelt/0.9.1 tqdm/4.54.1 CPython/3.8.4

File hashes

Hashes for user_inputs_for_args-0.0.1.tar.gz
Algorithm Hash digest
SHA256 a3571c73227fc2eccfb4d8222098c064ebb9aa15a71afead577472461cf088c0
MD5 8e6d8f70d70cf6c0db28ed7436f66d05
BLAKE2b-256 5d33bf2b7e11e6609b5f07339a8254592bd90e3afa618c9d1a8b2a721ca800cc

See more details on using hashes here.

File details

Details for the file user_inputs_for_args-0.0.1-py3-none-any.whl.

File metadata

  • Download URL: user_inputs_for_args-0.0.1-py3-none-any.whl
  • Upload date:
  • Size: 4.7 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.2.0 pkginfo/1.6.1 requests/2.25.0 setuptools/50.3.2 requests-toolbelt/0.9.1 tqdm/4.54.1 CPython/3.8.4

File hashes

Hashes for user_inputs_for_args-0.0.1-py3-none-any.whl
Algorithm Hash digest
SHA256 150f9174cec9e0cbc3efd19483863870d58cdc0a844eea83abe57d88a4d127e0
MD5 bc1bff2036f6ed0d52e9edf42d1c2f71
BLAKE2b-256 18ed649c7ded27a6b749beb4e7aac5f1afef62ecffac193a557abaebac5ccd8e

See more details on using hashes here.

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page