asyncclick


Nameasyncclick JSON
Version 8.2.2.2 PyPI version JSON
download
home_pageNone
SummaryComposable command line interface toolkit, async fork
upload_time2025-08-15 03:00:05
maintainerNone
docs_urlNone
authorNone
requires_python>=3.11
licenseNone
keywords
VCS
bugtrack_url
requirements No requirements were recorded.
Travis-CI No Travis.
coveralls test coverage No coveralls.
            <div align="center"><img src="https://raw.githubusercontent.com/pallets/click/refs/heads/stable/docs/_static/click-name.svg" alt="" height="150"></div>

# AsyncClick

[AsyncClick][] is a fork of Click that works well with [anyio][], [Trio][], or [asyncio][].

[anyio]: https://anyio.readthedocs.io/en/stable/
[Trio]: https://trio.readthedocs.io/en/stable/
[asyncio]: https://docs.python.org/3/library/asyncio.html
[AsyncClick]: https://github.com/python-trio/asyncclick/

# 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.

AsyncClick in four points:

-   Arbitrary nesting of commands
-   Automatic help page generation
-   Supports lazy loading of subcommands at runtime
-   Seamlessly use async-enabled command and subcommand handlers


## A Simple Example

```python
import asyncclick as click
import anyio

@click.command()
@click.option("--count", default=1, help="Number of greetings.")
@click.option("--name", prompt="Your name", help="The person to greet.")
async def hello(count, name):
    """Simple program that greets NAME for a total of COUNT times."""
    for x in range(count):
        if x:
            await anyio.sleep(0.1)
        click.echo(f"Hello, {name}!")

if __name__ == '__main__':
    hello()
```

```
$ python hello.py --count=3
Your name: Click
Hello, Click!
Hello, Click!
Hello, Click!
```

Compared to the original [Click][], you'll note that AsyncClick supports
optional(!) sprinkling of `async`/`await` keywords wherever your code needs
them.

In the interest of not diverging from Click more than absolutely necessary,
many examples have not been touched.


[Click]: https://palletsprojects.com/p/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][].

[please donate today]: https://palletsprojects.com/donate

The AsyncClick fork is maintained by Matthias Urlichs <matthias@urlichs.de>.
It's not a lot of work, so if you'd like to motivate me, donate to the
charity of your choice and tell me that you've done so. ;-)

## Contributing

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

[contrib]: https://palletsprojects.com/contributing/


            

Raw data

            {
    "_id": null,
    "home_page": null,
    "name": "asyncclick",
    "maintainer": null,
    "docs_url": null,
    "requires_python": ">=3.11",
    "maintainer_email": "Matthias Urlichs <matthias@urlichs.de>",
    "keywords": null,
    "author": null,
    "author_email": null,
    "download_url": "https://files.pythonhosted.org/packages/35/51/b01dd77c9a14fb0b312d799fd8c10b145b882535dbaa9ac055a52515b390/asyncclick-8.2.2.2.tar.gz",
    "platform": null,
    "description": "<div align=\"center\"><img src=\"https://raw.githubusercontent.com/pallets/click/refs/heads/stable/docs/_static/click-name.svg\" alt=\"\" height=\"150\"></div>\n\n# AsyncClick\n\n[AsyncClick][] is a fork of Click that works well with [anyio][], [Trio][], or [asyncio][].\n\n[anyio]: https://anyio.readthedocs.io/en/stable/\n[Trio]: https://trio.readthedocs.io/en/stable/\n[asyncio]: https://docs.python.org/3/library/asyncio.html\n[AsyncClick]: https://github.com/python-trio/asyncclick/\n\n# Click\n\nClick is a Python package for creating beautiful command line interfaces\nin a composable way with as little code as necessary. It's the \"Command\nLine Interface Creation Kit\". It's highly configurable but comes with\nsensible defaults out of the box.\n\nIt aims to make the process of writing command line tools quick and fun\nwhile also preventing any frustration caused by the inability to\nimplement an intended CLI API.\n\nAsyncClick in four points:\n\n-   Arbitrary nesting of commands\n-   Automatic help page generation\n-   Supports lazy loading of subcommands at runtime\n-   Seamlessly use async-enabled command and subcommand handlers\n\n\n## A Simple Example\n\n```python\nimport asyncclick as click\nimport anyio\n\n@click.command()\n@click.option(\"--count\", default=1, help=\"Number of greetings.\")\n@click.option(\"--name\", prompt=\"Your name\", help=\"The person to greet.\")\nasync def hello(count, name):\n    \"\"\"Simple program that greets NAME for a total of COUNT times.\"\"\"\n    for x in range(count):\n        if x:\n            await anyio.sleep(0.1)\n        click.echo(f\"Hello, {name}!\")\n\nif __name__ == '__main__':\n    hello()\n```\n\n```\n$ python hello.py --count=3\nYour name: Click\nHello, Click!\nHello, Click!\nHello, Click!\n```\n\nCompared to the original [Click][], you'll note that AsyncClick supports\noptional(!) sprinkling of `async`/`await` keywords wherever your code needs\nthem.\n\nIn the interest of not diverging from Click more than absolutely necessary,\nmany examples have not been touched.\n\n\n[Click]: https://palletsprojects.com/p/click/\n\n## Donate\n\nThe Pallets organization develops and supports Click and other popular\npackages. In order to grow the community of contributors and users, and\nallow the maintainers to devote more time to the projects, [please\ndonate today][].\n\n[please donate today]: https://palletsprojects.com/donate\n\nThe AsyncClick fork is maintained by Matthias Urlichs <matthias@urlichs.de>.\nIt's not a lot of work, so if you'd like to motivate me, donate to the\ncharity of your choice and tell me that you've done so. ;-)\n\n## Contributing\n\nSee our [detailed contributing documentation][contrib] for many ways to\ncontribute, including reporting issues, requesting features, asking or answering\nquestions, and making PRs.\n\n[contrib]: https://palletsprojects.com/contributing/\n\n",
    "bugtrack_url": null,
    "license": null,
    "summary": "Composable command line interface toolkit, async fork",
    "version": "8.2.2.2",
    "project_urls": {
        "Source": "https://github.com/python-trio/asyncclick/"
    },
    "split_keywords": [],
    "urls": [
        {
            "comment_text": null,
            "digests": {
                "blake2b_256": "c9209ac7bd10ae00075a2b7620e9f29b479d8ef677ba3616ce6a2e8efde80f70",
                "md5": "4bcd734456dd931a9fc1bee2afff6c13",
                "sha256": "ee500f57923e2588d624227d80b568546325a758b902a89519913926454187d9"
            },
            "downloads": -1,
            "filename": "asyncclick-8.2.2.2-py3-none-any.whl",
            "has_sig": false,
            "md5_digest": "4bcd734456dd931a9fc1bee2afff6c13",
            "packagetype": "bdist_wheel",
            "python_version": "py3",
            "requires_python": ">=3.11",
            "size": 105081,
            "upload_time": "2025-08-15T03:00:03",
            "upload_time_iso_8601": "2025-08-15T03:00:03.721878Z",
            "url": "https://files.pythonhosted.org/packages/c9/20/9ac7bd10ae00075a2b7620e9f29b479d8ef677ba3616ce6a2e8efde80f70/asyncclick-8.2.2.2-py3-none-any.whl",
            "yanked": false,
            "yanked_reason": null
        },
        {
            "comment_text": null,
            "digests": {
                "blake2b_256": "3551b01dd77c9a14fb0b312d799fd8c10b145b882535dbaa9ac055a52515b390",
                "md5": "3c8af1a8b6151c24a102e5ed891d19d1",
                "sha256": "014f6b7bfb1ef34a2215bc36aebd5150d5d2e50668b12eceb749961e32c24660"
            },
            "downloads": -1,
            "filename": "asyncclick-8.2.2.2.tar.gz",
            "has_sig": false,
            "md5_digest": "3c8af1a8b6151c24a102e5ed891d19d1",
            "packagetype": "sdist",
            "python_version": "source",
            "requires_python": ">=3.11",
            "size": 1258539,
            "upload_time": "2025-08-15T03:00:05",
            "upload_time_iso_8601": "2025-08-15T03:00:05.607670Z",
            "url": "https://files.pythonhosted.org/packages/35/51/b01dd77c9a14fb0b312d799fd8c10b145b882535dbaa9ac055a52515b390/asyncclick-8.2.2.2.tar.gz",
            "yanked": false,
            "yanked_reason": null
        }
    ],
    "upload_time": "2025-08-15 03:00:05",
    "github": true,
    "gitlab": false,
    "bitbucket": false,
    "codeberg": false,
    "github_user": "python-trio",
    "github_project": "asyncclick",
    "travis_ci": false,
    "coveralls": false,
    "github_actions": true,
    "lcname": "asyncclick"
}
        
Elapsed time: 0.44703s