Skip to main content

UNKNOWN

Project description

quick argument parsing

A simple concise way of defining arguments for an argparse.ArgumentParser

-- Syntax --


comma seperated list of args

args:
<short name>(<long name>{<dest>[<type>=<default>@<action>#<nargs>$<const>

all but short name are optional
if long name is missing, short name will be used
if long name is missing, and short name has len > 1
long name will be short name and short name will be the
first character of short name

examples:
f(foo)[int]=10
f[int]=10

supported add_argument options
name or flags (short name & long name)
action = '@'
nargs = '#'
const = '$'
default = '='
type = '['
choices = not supported
required = '!'
help = not supported
metavar = not supported
dest = '{'

-- Example --

import qarg
ns = qarg.get('f(foo[int=1,r(bar,baz[str,p(pop@store_true')

Project details


Download files

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

Source Distribution

qarg-0.2.tar.gz (4.5 kB view details)

Uploaded Source

File details

Details for the file qarg-0.2.tar.gz.

File metadata

  • Download URL: qarg-0.2.tar.gz
  • Upload date:
  • Size: 4.5 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No

File hashes

Hashes for qarg-0.2.tar.gz
Algorithm Hash digest
SHA256 ec70876754a337fc586c747253ae3e3e06a4750a3c9b0103ac72bead544b49b8
MD5 e3bfda8eab4527c34650ff444c816a0b
BLAKE2b-256 ee3d0bdd7daf3cc8596120477ca32ac00b007d74259fc01fa44259f97a2f5ae8

See more details on using hashes here.

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page