diff options
Diffstat (limited to 'contrib/python/typer/README.md')
| -rw-r--r-- | contrib/python/typer/README.md | 34 |
1 files changed, 20 insertions, 14 deletions
diff --git a/contrib/python/typer/README.md b/contrib/python/typer/README.md index 87b5f031188..8f7c49f7ebb 100644 --- a/contrib/python/typer/README.md +++ b/contrib/python/typer/README.md @@ -6,24 +6,21 @@ <em>Typer, build great CLIs. Easy to code. Based on Python type hints.</em> </p> <p align="center"> -<a href="https://github.com/fastapi/typer/actions?query=workflow%3ATest+event%3Apush+branch%3Amaster" target="_blank"> +<a href="https://github.com/fastapi/typer/actions?query=workflow%3ATest+event%3Apush+branch%3Amaster"> <img src="https://github.com/fastapi/typer/actions/workflows/test.yml/badge.svg?event=push&branch=master" alt="Test"> </a> -<a href="https://github.com/fastapi/typer/actions?query=workflow%3APublish" target="_blank"> - <img src="https://github.com/fastapi/typer/workflows/Publish/badge.svg" alt="Publish"> -</a> -<a href="https://coverage-badge.samuelcolvin.workers.dev/redirect/fastapi/typer" target="_blank"> +<a href="https://coverage-badge.samuelcolvin.workers.dev/redirect/fastapi/typer"> <img src="https://coverage-badge.samuelcolvin.workers.dev/fastapi/typer.svg" alt="Coverage"> -<a href="https://pypi.org/project/typer" target="_blank"> +<a href="https://pypi.org/project/typer"> <img src="https://img.shields.io/pypi/v/typer?color=%2334D058&label=pypi%20package" alt="Package version"> </a> </p> --- -**Documentation**: <a href="https://typer.tiangolo.com" target="_blank">https://typer.tiangolo.com</a> +**Documentation**: [https://typer.tiangolo.com](https://typer.tiangolo.com) -**Source Code**: <a href="https://github.com/fastapi/typer" target="_blank">https://github.com/fastapi/typer</a> +**Source Code**: [https://github.com/fastapi/typer](https://github.com/fastapi/typer) --- @@ -42,11 +39,11 @@ The key features are: ## FastAPI of CLIs -**Typer** is <a href="https://fastapi.tiangolo.com" class="external-link" target="_blank">FastAPI</a>'s little sibling, it's the FastAPI of CLIs. +**Typer** is [FastAPI](https://fastapi.tiangolo.com)'s little sibling, it's the FastAPI of CLIs. ## Installation -Create and activate a <a href="https://typer.tiangolo.com/virtual-environments/" class="external-link" target="_blank">virtual environment</a> and then install **Typer**: +Create and activate a [virtual environment](https://typer.tiangolo.com/virtual-environments/) and then install **Typer**: <div class="termy"> @@ -352,11 +349,20 @@ For a more complete example including more features, see the <a href="https://ty ## Dependencies -**Typer** stands on the shoulders of giants. It has three required dependencies: +**Typer** requires only a few dependencies (most are tiny): + +* [`rich`](https://rich.readthedocs.io/en/stable/index.html): to show nicely formatted errors automatically. +* [`shellingham`](https://github.com/sarugaku/shellingham): to automatically detect the current shell when installing completion. +* [`annotated-doc`](https://github.com/fastapi/annotated-doc): to generate documentation from Python type annotations. +* [`colorama`](https://github.com/tartley/colorama) (only on Windows): for producing colored terminal text on Windows. + +### Click code + +Typer used to depend on [Click](https://click.palletsprojects.com/) as well, a popular tool for building CLIs in Python. + +Since version 0.26.0, Typer has vendored Click (included Click's source code internally, instead of installing it as a third party package) and has unified the code interactions between Typer and the embedded Click source code for easier maintainability in the future. -* <a href="https://click.palletsprojects.com/" class="external-link" target="_blank">Click</a>: a popular tool for building CLIs in Python. Typer is based on it. -* <a href="https://rich.readthedocs.io/en/stable/index.html" class="external-link" target="_blank"><code>rich</code></a>: to show nicely formatted errors automatically. -* <a href="https://github.com/sarugaku/shellingham" class="external-link" target="_blank"><code>shellingham</code></a>: to automatically detect the current shell when installing completion. +Note that some Click functionality will not be available anymore in the future, as we continue to improve and extend Typer's codebase. ### `typer-slim` |
