ArgumentsProcessor
A Python module that process a dictionary of arguments against a supplied dictionary of expected arguments.
Install
pip install argumentsprocessor
Documentation
ArgumentsProcessor Module
Processes arguments according to a supplied dictionary containing expected arguments
and rules.
@includes:
ArgumentsProcessor
ArgumentsProcessorExceptions
@requires:
'expected_arguments' = { -- categories are synonymous to the arguments you pass
'category_a' : { -- this is will be whatever you name your argument, see the example below
'arguments: (
'hello',
'bye'
),
'required' : True || False,
'returns' : 'string' -- default is string but you may pass the string name of any
python variable type or pass in a custom object
},
'category_b' : {
arguments: (
'data'
),
'required' : True || False,
'returns': 'string' -- default is string but you may pass the string name of any
python variable type or pass in a custom object
}
}
@return:
arguments = {
'category_a':return_value, -- either the default string, any python type, or custom object passed in
'category_b':return_value, -- either the default string, any python type, or custom object passed in
}
@example:
import ArgumentsProcessor
class classy:
expected_arguments = {
'mode': {
'arguments': (
'encrypt',
'decrypt'
),
'required': True,
'return': 'string'
},
'data': {
'arguments': (
'data'
),
'required': True,
'return': 'string'
}
}
def __init__(self, mode, data):
supplied_arguments = {
'mode':mode,
'data':data
}
arguments = ArgumentsProcessor(self.expected_arguments, s
Metadata
Release files for argumentsprocessor 1.1.6
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | |
|---|---|---|---|
| argumentsprocessor-1.1.6.tar.gz | 3.1 kB | Details |
Release files / argumentsprocessor-1.1.6.tar.gz
| Download URL | argumentsprocessor-1.1.6.tar.gz |
|---|---|
| Size | 3.1 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
ad90a7ea68dd20b2372796ea3161ae97135e7639851e1f554798de542b20529f
|
|
BLAKE2b-256 checksum How to use checksums |
f86fc08ac358ba927ff59aa905d776a1a21c8e8e4043c7f2edf3499e29875c34
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |