Skip to main content
Pre-release

This release is a pre-release and may not be stable for production use.

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.

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.0.0a1.tar.gz (311.8 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.0.0a1-py3-none-any.whl (89.6 kB view details)

Uploaded Python 3

File details

Details for the file click-8.0.0a1.tar.gz.

File metadata

  • Download URL: click-8.0.0a1.tar.gz
  • Upload date:
  • Size: 311.8 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.2.0 pkginfo/1.6.1 requests/2.23.0 setuptools/50.3.2 requests-toolbelt/0.9.1 tqdm/4.53.0 CPython/3.7.4

File hashes

Hashes for click-8.0.0a1.tar.gz
Algorithm Hash digest
SHA256 e4315a188403c0258bbc4a4e31863e48fc301c4e95b8007a8eeda0391158df13
MD5 1850ec713384223dd66c604c16813c61
BLAKE2b-256 60e29c9b456c0ddaa1268f320bc2f739f1598290f5cf3acf8d65e2c36fde8afe

See more details on using hashes here.

File details

Details for the file click-8.0.0a1-py3-none-any.whl.

File metadata

  • Download URL: click-8.0.0a1-py3-none-any.whl
  • Upload date:
  • Size: 89.6 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.2.0 pkginfo/1.6.1 requests/2.23.0 setuptools/50.3.2 requests-toolbelt/0.9.1 tqdm/4.53.0 CPython/3.7.4

File hashes

Hashes for click-8.0.0a1-py3-none-any.whl
Algorithm Hash digest
SHA256 681c9380a24b22fec089c8e5ffe40aa16a0da79f248a26fe2481bfa8170bfcc1
MD5 14fa201d091e377d0b4ac358f32b16e2
BLAKE2b-256 7d5c104f7ef490e1a585c748a788b331bec1f4948e1a474bb6be7c73a5e8bc10

See more details on using hashes here.

Release history Release notifications | RSS feed

8.5.0

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

This release

8.0.0a1 This release

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

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