Skip to main content

make a beautiful click app with rich

Project description

Forks Stargazers Issues MIT License CircleCI


Logo

click-rich-help

make a beautiful click app with rich

Table of Contents
  1. About The Project
  2. Getting Started
  3. Usage
  4. Contributing
  5. Acknowledgments

About The Project

I wanted a simple python package to make my click app's help more readable.

Since writing this package the more opinionated rich-click has been written. If that output is more your speed, go check it out! This project aims to provide a slightly different API and set of features.

screenshot

Getting Started

Installation

with pip:

pip install click-rich-help

with conda/mamba:

conda install -c conda-forge click-rich-help

(back to top)

Usage

As of v22.1.0 you may no longer generate styles using named args.

At a minimum you should apply StyledGroup to your click group. If you have only one Command or Multicommand you may also use the included StyledCommand or StyledMultiCommand.

import click
from click_rich_help import StyledGroup

@click.group(
    cls=StyledGroup,
)
def cli():
    pass
import click
from click_rich_help import StyledCommand

@click.command(
  cls=StyledCommand,
)
def cmd():
    pass

See the documentation for more info

To non-interactively preview the included example module in your own terminal you can run

W/ click-rich-help and curl

curl -s https://raw.githubusercontent.com/daylinmorgan/click-rich-help/main/scripts/example.sh | bash

You can also run it yourself if you have installed click-rich-help. Which you should!

python -m click_rich_help.example -h

(back to top)

Contributing

To contribute please utilize poetry and pre-commit.

optionally manage python installation with conda:

conda create -p ./env python poetry

Then follow the below steps

  1. Fork the Project
  2. Install the package and dev dependencies w/poetry(cd click-rich-help; poetry install)
  3. Create your Feature Branch (git checkout -b feat/AmazingFeature)
  4. Commit your Changes (git commit -m 'Add some AmazingFeature')
  5. Run the tests (mypy click_rich_help; py.test tests)
  6. Push to the Branch (git push origin feat/AmazingFeature)
  7. Open a Pull Request

(back to top)

Acknowledgments

(back to top)

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

click-rich-help-22.1.1.tar.gz (13.3 kB view details)

Uploaded Source

Built Distribution

click_rich_help-22.1.1-py3-none-any.whl (13.1 kB view details)

Uploaded Python 3

File details

Details for the file click-rich-help-22.1.1.tar.gz.

File metadata

  • Download URL: click-rich-help-22.1.1.tar.gz
  • Upload date:
  • Size: 13.3 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: poetry/1.1.13 CPython/3.8.13 Linux/5.13.0-1017-aws

File hashes

Hashes for click-rich-help-22.1.1.tar.gz
Algorithm Hash digest
SHA256 ca2b9463ec9950e4726f3aa4b037cde5d2c2d25838ae5a79d08f845760cb4792
MD5 a0ee842b7ea23e5c0b4897059d5593db
BLAKE2b-256 181b1d5480b68b5466eb6c1958bbf9e503126726fbde475f06f4e5dd92ed9fc1

See more details on using hashes here.

File details

Details for the file click_rich_help-22.1.1-py3-none-any.whl.

File metadata

  • Download URL: click_rich_help-22.1.1-py3-none-any.whl
  • Upload date:
  • Size: 13.1 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: poetry/1.1.13 CPython/3.8.13 Linux/5.13.0-1017-aws

File hashes

Hashes for click_rich_help-22.1.1-py3-none-any.whl
Algorithm Hash digest
SHA256 ab7c98499283dda2b4ab86f581485856768c0770db030d553f6277bb2ca42303
MD5 882b5aeb303575c654fec4c9da17c128
BLAKE2b-256 78011ea25ce501492486f32a1d3aef194b69fd41ca8bf3a49e060775bb6dec5b

See more details on using hashes here.

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