Skip to content

Releases: your-tools/python-cli-ui

v0.8.0

18 Dec 13:21
Compare
Choose a tag to compare

Highlights

  • Breaking change: Rename main package from ui to cli_ui. This name is less likely to
    cause clash with existing code.

  • Breaking change Instead of hard-coding ANSI sequences names and values, use colorama instead.
    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_choice is 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 black for automatic code formatting.
  • If you nedd the record_message() pytest fixture in your own tests, you can now
    import it with from cli_ui.tests import message_recorder.

v0.7.4

22 Nov 10:21
Compare
Choose a tag to compare
  • Remove buggy entry_points from setup.py.

v0.7.3

22 Nov 10:20
Compare
Choose a tag to compare
  • Switch to dmenv. This makes it possible to use python-cli-ui with colorama >= 4.0.

v0.7.2

22 Nov 10:20
Compare
Choose a tag to compare

v0.7.1

30 Mar 08:48
Compare
Choose a tag to compare
  • Fix crash in ask_password when password was empty.
  • Let the KeyboardInterrput exception propagate back to the caller instead of catching
    it ourselves and returning None. Reported by @theodelrieu

v0.7.0

06 Mar 09:21
Compare
Choose a tag to compare

Add ask_password and read_pasword. Patch by @drazisil

v0.6.0

06 Mar 09:20
Compare
Choose a tag to compare
  • Export Color class.

That way you can define your own colors if you need to.

v0.5.0

04 Oct 13:50
Compare
Choose a tag to compare
  • Export a Symbol class, to use when you do not want to force color as with UnicodeSequence

(Thanks, @arnaudgelas)

v0.4.0

27 Sep 17:00
Compare
Choose a tag to compare
  • Expose the previously private UnicodeSequence class.

v0.3.0

13 Sep 14:21
Compare
Choose a tag to compare
  • Add info_section

  • Cosmetic changes about prefixes for debug, warn and error
    messages. (See `#6 for the details)