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!
Project Description

A python package for parsing parameters

Usage

>>> from param_info import *
>>> params = ParamList()
>>> params.add( ParamInfoInt("a1",7,min=5) )
>>> params.add( ParamInfoVal("a2",['aa','bb','cc']) )
>>> params.add( ParamInfoStr("a3",' hallo ') )
>>> def doSomething(param,values):
...    if params.validate(values):
...        # Do something with values
...        for name,param in params.params.items():
...            print( '{0} ==> {1}'.format(name,param.value))
...    else:
...        # Handle errors
...        for name,param in params.errors.items():
...            print( 'Error. {0} ==> {1}'.format(name,param.errorText))
>>> doSomething(params,{'a1':3})
Error. a1 ==> a1=3 should be integer >= 5
Error. a2 ==> a2 is required
>>> doSomething(params,{'a1':8,'a2':'bb'})
a1 ==> 8
a2 ==> bb
a3 ==> hallo
>>> doSomething(params,{'a2':'zz'})
Error. a2 ==> a2=zz should be one of ['aa', 'bb', 'cc']
>>> doSomething(params,{'a2':'aa','a3':'hola'})
a1 ==> 7
a2 ==> aa
a3 ==> hola
Release History

Release History

0.2.1

This version

History Node

TODO: Figure out how to actually get changelog content.

Changelog content for this version goes here.

Donec et mollis dolor. Praesent et diam eget libero egestas mattis sit amet vitae augue. Nam tincidunt congue enim, ut porta lorem lacinia consectetur. Donec ut libero sed arcu vehicula ultricies a non tortor. Lorem ipsum dolor sit amet, consectetur adipiscing elit.

Show More

0.2.0

History Node

TODO: Figure out how to actually get changelog content.

Changelog content for this version goes here.

Donec et mollis dolor. Praesent et diam eget libero egestas mattis sit amet vitae augue. Nam tincidunt congue enim, ut porta lorem lacinia consectetur. Donec ut libero sed arcu vehicula ultricies a non tortor. Lorem ipsum dolor sit amet, consectetur adipiscing elit.

Show More

0.1.0

History Node

TODO: Figure out how to actually get changelog content.

Changelog content for this version goes here.

Donec et mollis dolor. Praesent et diam eget libero egestas mattis sit amet vitae augue. Nam tincidunt congue enim, ut porta lorem lacinia consectetur. Donec ut libero sed arcu vehicula ultricies a non tortor. Lorem ipsum dolor sit amet, consectetur adipiscing elit.

Show More

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
param-info-0.2.1.zip (7.0 kB) Copy SHA256 Checksum SHA256 Source Sep 29, 2016

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