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 the arg's documentation 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 an arg is not programmatically passed in it will ask for a value for 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
- Section.80 - project group - Section.80
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
File details
Details for the file user_inputs_for_args-0.0.2.tar.gz
.
File metadata
- Download URL: user_inputs_for_args-0.0.2.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
Algorithm | Hash digest | |
---|---|---|
SHA256 | 190b94f7c38429f8e04fb0953ef1bc2a9e2f9069ef60072f24e07fc9dccb2cdd |
|
MD5 | 803290c3b106a56e72b34b183812a174 |
|
BLAKE2b-256 | 7247f37d6010f53782df4a615e0733e3a73c9d061a4539a1b629226c039e74b1 |
File details
Details for the file user_inputs_for_args-0.0.2-py3-none-any.whl
.
File metadata
- Download URL: user_inputs_for_args-0.0.2-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
Algorithm | Hash digest | |
---|---|---|
SHA256 | 71d97956117596263a16069b69f0ea07d61fdfaa5d79a551e2f2eb6bf0a5ad0b |
|
MD5 | 02e056296ef13699be923d9affbf2c18 |
|
BLAKE2b-256 | 88d08beb7fb688c9c2c1c9bfa20dfa448d54e2ecaa07cee25b7a24f13e3f4b85 |