Skip to main content

A library to work with command-line arguments

Project description

argumentor

Description

A simple, copylefted, lightweight library to work with command-line arguments in Python

Features

  • No external dependency
  • Easy to use
  • Automatic help page generation
  • Support for default values
  • Published under LGPLv3, a copyleft license that still lets you use the library in a project that is not under the same license

Installation

$ pip install argumentor

Usage

from argumentor import Arguments

parser = Arguments()
parser.add_operation(
    operation="--help",
    value_type=bool,
    description="Print help page"
)

operations, options = parser.parse()

if operations["--help"]:
    print(parser.help_page)

More usage can be found in the documentation

License

LGPLv3 badge

This repository and its content (unless specified otherwise) are released under the terms of the GNU Lesser General Public License version 3.

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

argumentor-1.0.0.tar.gz (15.2 kB view hashes)

Uploaded source

Built Distribution

argumentor-1.0.0-py3-none-any.whl (9.8 kB view hashes)

Uploaded py3

Supported by

AWS AWS Cloud computing Datadog Datadog Monitoring Facebook / Instagram Facebook / Instagram PSF Sponsor Fastly Fastly CDN Google Google Object Storage and Download Analytics Huawei Huawei PSF Sponsor Microsoft Microsoft PSF Sponsor NVIDIA NVIDIA PSF Sponsor Pingdom Pingdom Monitoring Salesforce Salesforce PSF Sponsor Sentry Sentry Error logging StatusPage StatusPage Status page