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.6.tar.gz (16.7 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.6-py3-none-any.whl (19.1 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: wilderness-0.1.6.tar.gz
  • Upload date:
  • Size: 16.7 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.4

File hashes

Hashes for wilderness-0.1.6.tar.gz
Algorithm Hash digest
SHA256 a4b9a7338574ffc36775bddd80403d750340871a8b1385f0e4dfa0c9189dd342
MD5 0ebb8fcfc2cfadf729a1a49416f564e2
BLAKE2b-256 9f780e3d695f74707ef486e085a1905dae13caa6442cbfd968df7dd2b382404f

See more details on using hashes here.

File details

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

File metadata

  • Download URL: wilderness-0.1.6-py3-none-any.whl
  • Upload date:
  • Size: 19.1 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.4

File hashes

Hashes for wilderness-0.1.6-py3-none-any.whl
Algorithm Hash digest
SHA256 9a1d1c1d38133eb5ffff5592df65111989800d0dbc4ffcc536d647c2e632dc7e
MD5 e2069cc264f5cac9d48abc44754c995d
BLAKE2b-256 10d19fa46170fcbe4db52c1f5e14091258b8bcf5e8c694dba6ce8e0acb7755c3

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