argspander
====
Python package that provides argument expansion of objects.
Why:
----
It was created to enable a sane way of entering arguments gathered from
argparse into your program, without the need to pass round an arguments object.
Usage:
----
>>> import argspander
>>> @argspander.expand
... def f(a, b, c):
... print "a: %s, b: %s, c: %s" % (a, b, c)
>>> f(3, 2, 1)
a: 3, b: 2, c: 1
>>> class Args(): # similar to the object return by argparse
... a = 3
... b = 2
... c = 1
>>> f(Args(), expand=True)
a: 3, b: 2, c: 1
====
Python package that provides argument expansion of objects.
Why:
----
It was created to enable a sane way of entering arguments gathered from
argparse into your program, without the need to pass round an arguments object.
Usage:
----
>>> import argspander
>>> @argspander.expand
... def f(a, b, c):
... print "a: %s, b: %s, c: %s" % (a, b, c)
>>> f(3, 2, 1)
a: 3, b: 2, c: 1
>>> class Args(): # similar to the object return by argparse
... a = 3
... b = 2
... c = 1
>>> f(Args(), expand=True)
a: 3, b: 2, c: 1
Release files for argspander 0.1.3
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | |
|---|---|---|---|
| argspander-0.1.3.tar.gz | 2.9 kB | Details |
Release files / argspander-0.1.3.tar.gz
| Download URL | argspander-0.1.3.tar.gz |
|---|---|
| Size | 2.9 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
2165eef0dcacc47483b53624865b39227cfa94ad1019719172393e6353a752e0
|
|
BLAKE2b-256 checksum How to use checksums |
673cad0d295f1e5ea39c91d42d99935da50a09dff0d8a397fd77315358756b53
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |