Skip to main content

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.

Contributing

See our detailed contributing documentation for many ways to contribute, including reporting issues, requesting features, asking or answering questions, and making PRs.

Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

click-8.5.0.tar.gz (382.2 kB view details)

Uploaded Source

Built Distribution

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

click-8.5.0-py3-none-any.whl (125.3 kB view details)

Uploaded Python 3

File details

Details for the file click-8.5.0.tar.gz.

File metadata

  • Download URL: click-8.5.0.tar.gz
  • Upload date:
  • Size: 382.2 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.14

File hashes

Hashes for click-8.5.0.tar.gz
Algorithm Hash digest
SHA256 ba0d2089de75ea0310e2dde03160e6ca10009947fb95a182f9b54021bb272e34
MD5 39f57e4f423de0d075dd968c29b01539
BLAKE2b-256 c70e7fa0ef50764b67090eca4114772a2abf8b6148198475e54c660b97caeee6

See more details on using hashes here.

Provenance

The following attestation bundles were made for click-8.5.0.tar.gz:

Publisher: publish.yaml on pallets/click

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file click-8.5.0-py3-none-any.whl.

File metadata

  • Download URL: click-8.5.0-py3-none-any.whl
  • Upload date:
  • Size: 125.3 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.14

File hashes

Hashes for click-8.5.0-py3-none-any.whl
Algorithm Hash digest
SHA256 255bc9599cf7748b4b1a446ccc735421bd08a2ae529a8b88597d3de5664ee360
MD5 2f0b6de9bc2aa6bd8ff4200bc7d14bbe
BLAKE2b-256 58506c0d534c5f134586a8e1ba4e330569e32f057e33372ae556463212fb4cd3

See more details on using hashes here.

Provenance

The following attestation bundles were made for click-8.5.0-py3-none-any.whl:

Publisher: publish.yaml on pallets/click

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

Release history Release notifications | RSS feed

This release

8.5.0 This release

2 files

8.4.2

2 files

8.4.1

2 files

8.4.0

2 files

8.3.3

2 files

8.3.2

2 files

8.3.1

2 files

8.3.0

2 files

8.2.2

2 files

8.2.1

2 files

8.2.0

2 files

8.1.8

2 files

8.1.7

2 files

8.1.6

2 files

8.1.5

2 files

8.1.4

2 files

8.1.3

2 files

8.1.2

2 files

8.1.1

2 files

8.1.0

2 files

8.0.4

2 files

8.0.3

2 files

8.0.2

2 files

8.0.1

2 files

8.0.0

2 files

7.1.2

2 files

7.1.1

2 files

7.1

2 files

7.0

2 files

6.7

2 files

6.6

2 files

6.5

1 file

6.4

2 files

6.3

2 files

6.2

2 files

6.1

2 files

6.0

2 files

5.1

2 files

5.0

2 files

4.1

2 files

4.0

2 files

3.3

2 files

3.2

2 files

3.1

2 files

3.0

2 files

2.6

2 files

2.5

2 files

2.4

2 files

2.3

2 files

2.2

2 files

2.1

2 files

2.0

2 files

1.1

2 files

1.0

2 files

0.7

2 files

0.6

2 files

0.5.1

2 files

0.5

2 files

0.4

2 files

0.3

2 files

0.2

2 files

0.1

2 files

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page