Easy multi-level command line applications with man pages
Project description
Wilderness
In wildness is the salvation of the world. — Aldo Leopold
Wilderness is a light wrapper around argparse for creating command line applications with multiple subcommands, in the style of Git. Wilderness also makes it easy to generate man pages for your application.
Wilderness is heavily inspired by Cleo and argparse-manpage, but aims to stick as closely as possible to argparse to avoid users having to learn a new API.
Installation
Wilderness is available on PyPI:
$ pip install wilderness
Usage
Building command line applications with Wilderness is straightforward, but it does expect a certain structure of the application. You can create applications with or without subcommands, as illustrated with the fakegit and fakedf examples, respectively.
Creating wilderness applications consist of the following steps:
-
Subclassing the
wilderness.Application
class to hold the main application. -
Adding one or more
wilderness.Command
objects for each of the subcommands, optionally organized intowilderness.Group
s. -
Minor changes to
setup.py
to build the manpages.
Examples
Here are some examples that use Wilderness to build command line applications:
Repository | Description |
---|---|
fakegit | A multi-level command line application similar to Git |
fakedf | An application without subcommands similar to df |
CleverCSV | CleverCSV is a package for handling messy CSV files |
Veld | Easy command line analytics |
Add your example here by opening a pull request!
Notes
License: See the LICENSE file.
Author: Gertjan van den Burg
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Hashes for wilderness-0.1.10-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 468978b41a1fdf05aabf2631ac456f14116ebec144bda0f1afa45eae1175d4b3 |
|
MD5 | 20ae04155065543a874720e9693411b6 |
|
BLAKE2b-256 | 001eda3c0d33d5404f69177580a52dea674efa37410748f4525d8a9ad75384d6 |