Typer, build great CLIs. Easy to code. Based on Python type hints.
MIT License
Bot releases are hidden (Show)
Published by tiangolo 6 months ago
Optional[Tuple]
and default value None
. PR #757 by @Asthestarsfalll.Published by tiangolo 7 months ago
Now you don't need to install typer[all]
. When you install typer
it comes with the default optional dependencies and the typer
command.
If you don't want the extra optional dependencies (rich
and shellingham
), you can install typer-slim
instead.
You can also install typer-slim[standard]
, which includes the default optional dependencies, but not the typer
command.
Now the package typer-cli
doesn't add anything on top of what typer
has, it only depends on typer
, and is there only for backwards compatibility, so that projects that depend on typer-cli
can get the latest features of the typer
command while they upgrade their dependencies to require typer
directly.
typer <0.12.0
to typer >=0.12.0
, make typer
independent of typer-slim
, include typer
command in typer
package. PR #791 by @tiangolo.This fixes a problem that would break the typer
installation directory when upgrading from typer <0.12.0
to typer >=0.12.0
, see issue #790.
By installing the latest version (0.12.1
) it fixes it, for any previous version, even if the installation directory was already broken by the previous upgrade.
Published by tiangolo 7 months ago
In version 0.12.0
, the typer
package depends on typer-slim[standard]
which includes the default dependencies (instead of typer[all]
) and typer-cli
(that provides the typer
command).
If you don't want the extra optional dependencies (rich
and shellingham
), you can install typer-slim
instead.
You can also install typer-slim[standard]
, which includes the default optional dependencies, but not the typer
command.
In version 0.12.0
the typer-cli
package only provides the typer
command, but the code is still in the main code, so even without installing typer-cli
, it can be called with python -m typer
.
This approach of having typer
depend on typer-slim[standard]
instead of including the whole code and dependencies itself caused an issue when upgrading from typer <0.12.0
to typer >=0.12.0
, see issue #790. This is fixed in version 0.12.1
.
typer-slim
package without extras, make typer
include typer-slim[default]
and integrate Typer CLI (typer
command) into Typer. PR #780 by @tiangolo.Published by tiangolo 7 months ago
test
, doc
, dev
. PR #764 by @tiangolo.Published by tiangolo 7 months ago
None
for CLI Parameters when the type is list | None
and the default value is None
. PR #664 by @theowisear.Published by tiangolo 7 months ago
show_default
parameter and update docs for setting a "Custom default string". PR #501 by @plannigan.Published by tiangolo 7 months ago
default_factory
in Argument
overloads. PR #750 by @m9810223.π Remove obsolete references to --install-completion
for typer.run()
scripts. PR #595 by @tiangolo.
π Update docs example for a Typer/Click group to make new subcommands explicit. PR #755 by @svlandeg.
π Update docs for building a package, file structure example. PR #683 by @davidbgk.
π Update link in docs to the newest stable version of click. PR #675 by @javier171188.
π§ Add CITATION.cff
file for academic citations. PR #681 by @tiangolo.
β Fix typo in docs/tutorial/exceptions.md
. PR #702 by @menzenski.
β Fix typo in docs/tutorial/options/name.md
. PR #725 by @bwagner.
β Fix typo in docs/tutorial/arguments/optional.md
. PR #602 by @tadasgedgaudas.
Published by tiangolo over 1 year ago
Annotated
for specifying options and arguments. Initial PR #584 by @ryangalamb.
...
to mark a CLI Argument or CLI Option as required.Annotated
for typer.Option()
and typer.Argument()
.Annotated
.Annotated
, fix overloads for typer.Argument
. PR #594 by @tiangolo.Published by tiangolo over 1 year ago
exclude_lines
to coverage configuration. PR #585 by @dmontagu.sys.executable
to run subprocesses, needed by OpenSUSE. PR #408 by @theMarix.PYTHONPATH
is set properly when testing the tutorial scripts. PR #407 by @theMarix.Published by tiangolo almost 2 years ago
typer.run()
not add completion scripts by default, it only makes sense in installed apps. Also update docs for handling autocompletion in CLI options. PR #488 by @tiangolo.typer.run()
. PR #284 by @yassu.get_group
. PR #430 by @tiangolo.docs/tutorial/commands/help.md
. PR #466 by @fepegar.datetime.strptime()
. PR #464 by @Kobu.first-steps.md
, clarify distinction between parameter and argument. PR #176 by @mccarthysean.Published by tiangolo over 2 years ago
This release adds deep integrations with Rich. β¨
rich
is an optional dependency, you can install it directly or it will be included when you install with:
$ pip install "typer[all]"
If Rich is available, it will be used to show the content from --help
options, validation errors, and even errors in your app (exception tracebacks).
There are new options to group commands, CLI arguments, and CLI options, support for Rich Console Markup, and more! π
print()
instead of typer.echo()
in the docs, to simplify the concepts and avoid confusions. New docs: Printing and Colors - typer Echo.help
, and epilog
with the new parameter typer.Typer(rich_markup_mode="markdown")
, new docs: Commands - Command Help - Rich Markdown and Markup.help
, and epilog
with the new parameter typer.Typer(rich_markup_mode="rich")
, new docs: Commands - Command Help - Rich Markdown and Markup.epilog
, with support for Rich Markdown and Console Markup, new docs: Commands - Command Help - Epilog.Published by tiangolo over 2 years ago
Published by tiangolo over 2 years ago
List
and Tuple
and their internal types. PR #143 by @hellowhistler.context_settings
for a Typer app with a single command. PR #210 by @daddycocoaman.stderr
. PR #335 by @cgabard.docs/tutorial/printing.md
. PR #386 by @briancohan.docs/tutorial/terminating.md
. PR #382 by @kianmeng.docs/tutorial/package.md
. PR #333 by @ryanstreur.docs/tutorial/options/required.md
.. PR #316 by @michaelriri.index.md
. PR #274 by @RmStorm.datetime
parameter type. PR #220 by @DiegoPiloni.Published by tiangolo over 2 years ago
get_terminal_size
for Click 8.1.0 support and upgrade Black to fix CI. PR #380 by @tiangolo based on original PR #375 by @madkinsz.Published by tiangolo about 3 years ago