This is a pre-production deployment of Warehouse. Changes made here affect the production instance of PyPI (pypi.python.org).
Help us improve Python packaging - Donate today!

A Python module that process a dictionary of arguments against a supplied dictionary of expected arguments.

Project Description

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
Release History

Release History

This version
History Node

1.1.6

History Node

1.1.5

History Node

1.1.4

History Node

1.1.3

History Node

1.1.1

History Node

1.0.9

History Node

1.0.8

History Node

1.0.7

History Node

1.0.6

History Node

1.0.4

History Node

1.0.0

Download Files

Download Files

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

File Name & Checksum SHA256 Checksum Help Version File Type Upload Date
argumentsprocessor-1.1.6.tar.gz (3.1 kB) Copy SHA256 Checksum SHA256 Source Jan 14, 2015

Supported By

WebFaction WebFaction Technical Writing Elastic Elastic Search Pingdom Pingdom Monitoring Dyn Dyn DNS Sentry Sentry Error Logging CloudAMQP CloudAMQP RabbitMQ Heroku Heroku PaaS Kabu Creative Kabu Creative UX & Design Fastly Fastly CDN DigiCert DigiCert EV Certificate Rackspace Rackspace Cloud Servers DreamHost DreamHost Log Hosting