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-0.0.6.tar.gz (15.2 kB view hashes)

Uploaded Source

Built Distribution

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

Uploaded Python 3

Supported by

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