Skip to main content

A python CLI framework base on argparse, supporting: config system, command-completion, rich-text log and so on.

This project has been archived.

The maintainers of this project have marked this project as archived. No new releases are expected.

Project description

Pyclier

A python CLI framework base on argparse, supporting: config system, command-completion, rich-text log, friendly help message prompt and so on.

Note: This project was created with Cookiecutter and the zhangxianbing/cookiecutter-pypackage project template.

Features

  • support friendly help message prompt
  • support configuration file parsing system
  • support easy-to-use interface for building complex CLI program
  • support rich-text and flexible log system (base on rich)
  • support command auto-completion (base on argcomplete)
  • support auto generating and updating usage (based on auto-usage)
  • support updating CLI program

Quick Start

Installation

pip install pyclier

For using auto completion, you should first install argcomplete and the activate it:

pip install argcomplete
activate-global-python-argcomplete

Then add the following lines in your setup.py:

from setuptools import setup

setup(...)

# post installation

from pyclier.setuptools import copytree, enable_complete

command = sys.argv[-1]
if command == "install":
    copytree("conf", appdirs.user_config_dir(prog_name))
    enable_complete(prog_name)

    import pip

    pip.main(["install", ".", "-U", "--no-index"])

Run demo

cd pyclier-demo && make install
# then refresh your bash environment
pyclier -h

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

pyclier-2.0.0.tar.gz (24.6 kB view details)

Uploaded Source

Built Distribution

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

pyclier-2.0.0-py3-none-any.whl (20.5 kB view details)

Uploaded Python 3

File details

Details for the file pyclier-2.0.0.tar.gz.

File metadata

  • Download URL: pyclier-2.0.0.tar.gz
  • Upload date:
  • Size: 24.6 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.6.0 importlib_metadata/4.8.2 pkginfo/1.8.1 requests/2.26.0 requests-toolbelt/0.9.1 tqdm/4.62.3 CPython/3.8.10

File hashes

Hashes for pyclier-2.0.0.tar.gz
Algorithm Hash digest
SHA256 14c25fc67a81bb1a733a6d05e8f17aa2fce6b597fb5a05adec6126ed48d68fdd
MD5 95e460bc11792806fef5b260825645dc
BLAKE2b-256 f55ba6919a99a4257c58253dbe9d3c6bf2a83b9963de98d9a4b58772bc3a9227

See more details on using hashes here.

File details

Details for the file pyclier-2.0.0-py3-none-any.whl.

File metadata

  • Download URL: pyclier-2.0.0-py3-none-any.whl
  • Upload date:
  • Size: 20.5 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.6.0 importlib_metadata/4.8.2 pkginfo/1.8.1 requests/2.26.0 requests-toolbelt/0.9.1 tqdm/4.62.3 CPython/3.8.10

File hashes

Hashes for pyclier-2.0.0-py3-none-any.whl
Algorithm Hash digest
SHA256 d538b59d9d23039c4c128315e609cce2e6378102a2b13f180bc5b418bcefbd74
MD5 3416086c8879501c62cf7bcffd1c1e1e
BLAKE2b-256 2a9f34b58a48eeb5c24118aa22d62b9f7834bce15ccf2f2b1108f75b49257d0b

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