Releases: your-tools/python-cli-ui
Releases · your-tools/python-cli-ui
v0.8.0
Highlights
-
Breaking change: Rename main package from
uitocli_ui. This name is less likely to
cause clash with existing code. -
Breaking change Instead of hard-coding ANSI sequences names and values, use
coloramainstead.
All existing names have been kept, but some of the values changed slighlty. -
ask_functions now take a variable number of tokens as first argument.
This allows to color the prompt when requiring input from the user, for instance:
res = cli_ui.ask_yes_no(
"Deploy to",
cli_ui.bold, "production", cli_ui.reset, "?",
default=False
)- Breaking change: Because of this new feature, the list of choices used by
ask_choiceis now a named keyword argument::
# Old (<= 0.7)
ask_choice("select a fruit", ["apple", "banana"])
# New (>= 0.8)
ask_choice("select a fruit", choices=["apple", "banana"])Other Changes
- Annotate everything with
mypy. - Use
blackfor automatic code formatting. - If you nedd the
record_message()pytest fixture in your own tests, you can now
import it withfrom cli_ui.tests import message_recorder.
v0.7.4
- Remove buggy
entry_pointsfromsetup.py.
v0.7.3
- Switch to
dmenv. This makes it possible to usepython-cli-uiwithcolorama >= 4.0.
v0.7.2
v0.7.1
- Fix crash in
ask_passwordwhen password was empty. - Let the
KeyboardInterrputexception propagate back to the caller instead of catching
it ourselves and returningNone. Reported by @theodelrieu
v0.7.0
v0.6.0
- Export
Colorclass.
That way you can define your own colors if you need to.
v0.5.0
- Export a
Symbolclass, to use when you do not want to force color as withUnicodeSequence
(Thanks, @arnaudgelas)
v0.4.0
- Expose the previously private
UnicodeSequenceclass.