Skip to main content
Archived

This project has been archived by its maintainers, and is no longer receiving any updates.

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

Release files for pyclier 2.0.0

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for pyclier 2.0.0
File Size Uploaded
pyclier-2.0.0.tar.gz 24.6 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for pyclier 2.0.0
File Interpreter ABI Platform
pyclier-2.0.0-py3-none-any.whl Python 3 none any Details

Total release size: 45.1 kB

Release files / pyclier-2.0.0.tar.gz

Download URL pyclier-2.0.0.tar.gz
Size 24.6 kB
Tags Source
SHA-256 checksum
How to use checksums
14c25fc67a81bb1a733a6d05e8f17aa2fce6b597fb5a05adec6126ed48d68fdd
BLAKE2b-256 checksum
How to use checksums
f55ba6919a99a4257c58253dbe9d3c6bf2a83b9963de98d9a4b58772bc3a9227
Upload date
Uploaded using Trusted Publishing?
What is 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

Release files / pyclier-2.0.0-py3-none-any.whl

Download URL pyclier-2.0.0-py3-none-any.whl
Size 20.5 kB
Tags Python 3
SHA-256 checksum
How to use checksums
d538b59d9d23039c4c128315e609cce2e6378102a2b13f180bc5b418bcefbd74
BLAKE2b-256 checksum
How to use checksums
2a9f34b58a48eeb5c24118aa22d62b9f7834bce15ccf2f2b1108f75b49257d0b
Upload date
Uploaded using Trusted Publishing?
What is 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
Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page