Skip to main content
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 to help create predictable command line tools for python >= 2.6 and 3.x

Project Description

A python module to help create predictable command line tools for python >= 2.6 and 3.x

pycli_tools is a python module that wraps the ArgumentParser class from the build-in argparse module.

If you use it in your command line scripts you will get some defaults options added to your application such as –verbose and –quiet to control the verbosity of your application (using the python logging module).

Also there is the –config option that gives you the ability to read command line arguments from a configuration file to save users of your application a lot of typing (e.g. ~/.myapprc).

Copyright (c) 2013 Nico Di Rocco.
License: MIT (see LICENSE for details).

installation

The easiest way is to install using pip:

$ pip install pycli_tools

Read the documentation for alternative ways of installing.

usage

To create a myapp command that reads its default configuration from ~/.myapprc do this:

from pycli_tools.parsers import get_argparser

parser = get_argparser(prog='myapp', default_config='~/.myapprc')
parser.add_argument('--database')
parser.add_argument('file')
args = parser.parse_args()

The file ~/.myapprc can contain the following:

[myapp]
database = /some/path/to/my/database.sqlite

Read the documentation to see how to use pycli_tools.

documentation

Read the full documentation here.

Release History

Release History

This version
History Node

2.0.2

History Node

2.0.1

History Node

2.0.0

History Node

1.7.2

History Node

1.7.1

History Node

1.7.0

History Node

1.6.0

History Node

1.5.1

History Node

1.5

History Node

1.4

History Node

1.3.3

History Node

1.3.2

History Node

1.3.1

History Node

1.3

History Node

1.2

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
pycli_tools-2.0.2.tar.gz (7.0 kB) Copy SHA256 Checksum SHA256 Source May 16, 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