Skip to main content

A command line interface package.

Project description

pre-commit Tests Linting: pylint

CLIpy

A python package that eases the creation of command line interface tools. It's a simple wrapper around the argparse module that simplifies the creation of CLI tools.

Features

  • @clipy.command decorator: Adds a command-line parser with usage and description.
  • @clipy.argument decorator: Adds individual arguments to the command-line parser.
  • Simplifies the creation of CLI tools.
  • Supports argparse arguments.

Usage

import clipy

@clipy.command()
@clipy.argument("arg1", help="an argument", type=str, required=True)
@clipy.argument("arg2", help="another argument", type=str, required=False)
def main(*_args, arg1, arg2, **_kwargs):
    print("Argument 1:", arg1)
    print("Argument 2:", arg2)

if __name__ == "__main__":
    main()  # pylint: disable=missing-kwoa

Then enjoy your CLI tool:

python script.py --help
python script.py --arg1 value1 --arg2 value2

Installation

pip install cli-py

From Github:

pip install git+https://github.com/G-Lauz/clipy.git@v0.0.4-pre0

Or clone the repository and install it manually:

git clone https://github.com/G-Lauz/clipy.git
cd clipy
pip install .

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

clipyx-0.0.6.tar.gz (3.9 kB view details)

Uploaded Source

Built Distribution

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

clipyx-0.0.6-py3-none-any.whl (3.7 kB view details)

Uploaded Python 3

File details

Details for the file clipyx-0.0.6.tar.gz.

File metadata

  • Download URL: clipyx-0.0.6.tar.gz
  • Upload date:
  • Size: 3.9 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/5.1.1 CPython/3.9.13

File hashes

Hashes for clipyx-0.0.6.tar.gz
Algorithm Hash digest
SHA256 2aedf72622b9a3f5807b3626009245481a6c58673a399258c7e8c27f380059fb
MD5 b93dcd82b3e928a3d06f88655f259dc8
BLAKE2b-256 294d932eed5805bba47cb5e176f1c9f654e97b59a3b46039c341191dd71b9a5a

See more details on using hashes here.

File details

Details for the file clipyx-0.0.6-py3-none-any.whl.

File metadata

  • Download URL: clipyx-0.0.6-py3-none-any.whl
  • Upload date:
  • Size: 3.7 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/5.1.1 CPython/3.9.13

File hashes

Hashes for clipyx-0.0.6-py3-none-any.whl
Algorithm Hash digest
SHA256 9f5e9b11be789826eabaa1e6eca60250820bbd365feddc927e8fceb367fc3c75
MD5 5f7bf4f96c7acd146ce115b7ef009fb9
BLAKE2b-256 16ab9000ee1cc0008cc412e7563f79ff1f92f9a1fbb63bcbea84155cd4fe56a1

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