Composable command line interface toolkit
Project description
$ click_
Click is a Python package for creating beautiful command line interfaces in a composable way with as little code as necessary. It's the "Command Line Interface Creation Kit". It's highly configurable but comes with sensible defaults out of the box.
It aims to make the process of writing command line tools quick and fun while also preventing any frustration caused by the inability to implement an intended CLI API.
Click in three points:
- Arbitrary nesting of commands
- Automatic help page generation
- Supports lazy loading of subcommands at runtime
A Simple Example
import click
@click.command()
@click.option("--count", default=1, help="Number of greetings.")
@click.option("--name", prompt="Your name", help="The person to greet.")
def hello(count, name):
"""Simple program that greets NAME for a total of COUNT times."""
for _ in range(count):
click.echo(f"Hello, {name}!")
if __name__ == '__main__':
hello()
$ python hello.py --count=3
Your name: Click
Hello, Click!
Hello, Click!
Hello, Click!
Donate
The Pallets organization develops and supports Click and other popular packages. In order to grow the community of contributors and users, and allow the maintainers to devote more time to the projects, please donate today.
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
File details
Details for the file click-8.1.8.tar.gz
.
File metadata
- Download URL: click-8.1.8.tar.gz
- Upload date:
- Size: 226.6 kB
- Tags: Source
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/5.1.1 CPython/3.12.7
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | ed53c9d8990d83c2a27deae68e4ee337473f6330c040a31d4225c9574d16096a |
|
MD5 | b52ee8e6c33d88a2b4626e6a6002245d |
|
BLAKE2b-256 | b92e0090cbf739cee7d23781ad4b89a9894a41538e4fcf4c31dcdd705b78eb8b |
Provenance
The following attestation bundles were made for click-8.1.8.tar.gz
:
Publisher:
publish.yaml
on pallets/click
-
Statement:
- Statement type:
https://in-toto.io/Statement/v1
- Predicate type:
https://docs.pypi.org/attestations/publish/v1
- Subject name:
click-8.1.8.tar.gz
- Subject digest:
ed53c9d8990d83c2a27deae68e4ee337473f6330c040a31d4225c9574d16096a
- Sigstore transparency entry: 157256771
- Sigstore integration time:
- Permalink:
pallets/click@934813e4d421071a1b3db3973c02fe2721359a6e
- Branch / Tag:
refs/tags/8.1.8
- Owner: https://github.com/pallets
- Access:
public
- Token Issuer:
https://token.actions.githubusercontent.com
- Runner Environment:
github-hosted
- Publication workflow:
publish.yaml@934813e4d421071a1b3db3973c02fe2721359a6e
- Trigger Event:
push
- Statement type:
File details
Details for the file click-8.1.8-py3-none-any.whl
.
File metadata
- Download URL: click-8.1.8-py3-none-any.whl
- Upload date:
- Size: 98.2 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/5.1.1 CPython/3.12.7
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 63c132bbbed01578a06712a2d1f497bb62d9c1c0d329b7903a866228027263b2 |
|
MD5 | 7dc0eee374f3bb75bcce4c9dd4222f5f |
|
BLAKE2b-256 | 7ed47ebdbd03970677812aac39c869717059dbb71a4cfc033ca6e5221787892c |
Provenance
The following attestation bundles were made for click-8.1.8-py3-none-any.whl
:
Publisher:
publish.yaml
on pallets/click
-
Statement:
- Statement type:
https://in-toto.io/Statement/v1
- Predicate type:
https://docs.pypi.org/attestations/publish/v1
- Subject name:
click-8.1.8-py3-none-any.whl
- Subject digest:
63c132bbbed01578a06712a2d1f497bb62d9c1c0d329b7903a866228027263b2
- Sigstore transparency entry: 157256772
- Sigstore integration time:
- Permalink:
pallets/click@934813e4d421071a1b3db3973c02fe2721359a6e
- Branch / Tag:
refs/tags/8.1.8
- Owner: https://github.com/pallets
- Access:
public
- Token Issuer:
https://token.actions.githubusercontent.com
- Runner Environment:
github-hosted
- Publication workflow:
publish.yaml@934813e4d421071a1b3db3973c02fe2721359a6e
- Trigger Event:
push
- Statement type: