Skip to main content

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

Installing

Install and update using pip:

$ pip install -U click

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.

Metadata

Release files for click 8.1.3

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

Source distribution (sdist)

Source distribution for click 8.1.3
File Size Uploaded Provenance Actions
click-8.1.3.tar.gz 331.1 kB Without provenance Details for click-8.1.3.tar.gz

Built distribution (wheel)

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

Total release size: 427.7 kB

Release files / click-8.1.3.tar.gz

Download URL click-8.1.3.tar.gz
Size 331.1 kB
Tags Source
SHA-256 checksum
How to use checksums
7682dc8afb30297001674575ea00d1814d808d6a36af415a82bd481d37ba7b8e
BLAKE2b-256 checksum
How to use checksums
598784326af34517fca8c58418d148f2403df25303e02736832403587318e9e8
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/4.0.0 CPython/3.10.4

Release files / click-8.1.3-py3-none-any.whl

Download URL click-8.1.3-py3-none-any.whl
Size 96.6 kB
Tags Python 3
SHA-256 checksum
How to use checksums
bb4d8133cb15a609f44e8213d9b391b0809795062913b383c62be0ee95b1db48
BLAKE2b-256 checksum
How to use checksums
c2f1df59e28c642d583f7dacffb1e0965d0e00b218e0186d7858ac5233dce840
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/4.0.0 CPython/3.10.4

Security for click 8.1.3

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

No provenance found

None of the files in this release were uploaded with provenance metadata.

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

To learn more about protecting yourself from malicious actors, visit our package security documentation.

Release history Release notifications | RSS feed

This release

8.1.3 This release

2 release files No provenance

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