Skip to main content

Easy multi-level command line applications with man pages

Project description

Wilderness

PyPI version Build status Downloads Documentation Status

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:

  1. Subclassing the wilderness.Application class to hold the main application.

  2. Adding one or more wilderness.Command objects for each of the subcommands, optionally organized into wilderness.Groups.

  3. 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


Download files

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

Source Distribution

wilderness-0.1.7.tar.gz (17.2 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

wilderness-0.1.7-py3-none-any.whl (19.7 kB view details)

Uploaded Python 3

File details

Details for the file wilderness-0.1.7.tar.gz.

File metadata

  • Download URL: wilderness-0.1.7.tar.gz
  • Upload date:
  • Size: 17.2 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.7.1 importlib_metadata/4.8.1 pkginfo/1.8.2 requests/2.27.1 requests-toolbelt/0.9.1 tqdm/4.62.3 CPython/3.10.5

File hashes

Hashes for wilderness-0.1.7.tar.gz
Algorithm Hash digest
SHA256 f131f98d8868ee041cebd529d3a3ee06fbec6fce3d7a71a64aa05fd078135092
MD5 de79b24873b57b0de270620ec281263b
BLAKE2b-256 6627fc98eb50e1499b113c2849a693303545cb816898a4a660bf671134268218

See more details on using hashes here.

File details

Details for the file wilderness-0.1.7-py3-none-any.whl.

File metadata

  • Download URL: wilderness-0.1.7-py3-none-any.whl
  • Upload date:
  • Size: 19.7 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.7.1 importlib_metadata/4.8.1 pkginfo/1.8.2 requests/2.27.1 requests-toolbelt/0.9.1 tqdm/4.62.3 CPython/3.10.5

File hashes

Hashes for wilderness-0.1.7-py3-none-any.whl
Algorithm Hash digest
SHA256 700045d386af3ba336f158d629c4bfb9453c30befdbb2db331faba3dea49336c
MD5 e9da7ee33907a3049e42791078d2dacf
BLAKE2b-256 aa6670f5a7abd26c5fca7210cc147ceadfd472d98d32f14a8e78d15d10ce760d

See more details on using hashes here.

Supported by

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