A cross platform package to do curses-like operations, plus higher level APIs and widgets to create text UIs and ASCII art animations

Overview
Linux build status Windows build status Code Health Code Coverage Latest stable version Join the chat at https://gitter.im/asciimatics/Lobby

ASCIIMATICS

Asciimatics is a package to help people create full-screen text UIs (from interactive forms to ASCII animations) on any platform. It is licensed under the Apache Software Foundation License 2.0.

Why?

Why not? It brings a little joy to anyone who was programming in the 80s... Oh and it provides a single cross-platform Python class to do all the low-level console function you could ask for, including:

  • Coloured/styled text - including 256 colour terminals and unicode characters (even CJK languages)
  • Cursor positioning
  • Keyboard input (without blocking or echoing) including unicode support
  • Mouse input (terminal permitting)
  • Detecting and handling when the console resizes
  • Screen scraping

In addition, it provides some simple, high-level APIs to provide more complex features including:

  • Anti-aliased ASCII line-drawing
  • Image to ASCII conversion - including JPEG and GIF formats
  • Many animation effects - e.g. sprites, particle systems, banners, etc.
  • Various widgets for text UIs - e.g. buttons, text boxes, radio buttons, etc.

Currently this package has been proven to work on CentOS 6 & 7, Raspbian (i.e. Debian wheezy), Ubuntu 14.04, Windows 7, 8 & 10, OSX 10.11 and Android Marshmallow (courtesy of https://termux.com), though it should also work for any other platform that provides a working curses implementation.

It should be implementation agnostic and has been successfully tested on CPython and PyPy2.

(Please let me know if you successfully verified it on other platforms so that I can update this list).

Installation

Asciimatics supports Python versions 2 & 3. For the precise list of tested versions, refer to pypi.

To install asciimatics, simply install with pip as follows:

$ pip install asciimatics

This should install all your dependencies for you. If you don't use pip or it fails to install them, you can install the dependencies directly using the packages listed in requirements.txt. Additionally, Windows users (who aren't using pip) will need to install pywin32.

How to use it?

To use the low-level API, simply create a Screen and use it to print coloured text at any location, or get mouse/keyboard input. For example, here is a variant on the classic "hello world":

from random import randint
from asciimatics.screen import Screen

def demo(screen):
    while True:
        screen.print_at('Hello world!',
                        randint(0, screen.width), randint(0, screen.height),
                        colour=randint(0, screen.colours - 1),
                        bg=randint(0, screen.colours - 1))
        ev = screen.get_key()
        if ev in (ord('Q'), ord('q')):
            return
        screen.refresh()

Screen.wrapper(demo)

That same code works on Windows, OSX and Linux and paves the way for all the higher level features. These still need the Screen, but now you also create a Scene using some Effects and then get the Screen to play it. For example, this code:

from asciimatics.effects import Cycle, Stars
from asciimatics.renderers import FigletText
from asciimatics.scene import Scene
from asciimatics.screen import Screen

def demo(screen):
    effects = [
        Cycle(
            screen,
            FigletText("ASCIIMATICS", font='big'),
            int(screen.height / 2 - 8)),
        Cycle(
            screen,
            FigletText("ROCKS!", font='big'),
            int(screen.height / 2 + 3)),
        Stars(screen, 200)
    ]
    screen.play([Scene(effects, 500)])

Screen.wrapper(demo)

should produce something like this:

asciicast

Or maybe you're looking to create a TUI? In which case this simple code will give you this:

contact list sample

Documentation

Full documentation of all the above (and more!) is available at http://asciimatics.readthedocs.org/

More examples

More examples of what you can do are available in the project samples directory, hosted on GitHub. See https://github.com/peterbrittain/asciimatics/tree/v1.12/samples.

To view them, simply download these files and then simply run them directly with python. Alternatively, you can browse recordings of many of the samples in the gallery at https://github.com/peterbrittain/asciimatics/wiki.

Bugs and enhancements

If you have a problem, please check out the troubleshooting guide at http://asciimatics.readthedocs.io/en/latest/troubleshooting.html. If this doesn't solve your problem, you can report bugs (or submit enhancement requests) at https://github.com/peterbrittain/asciimatics/issues.

Alternatively, if you just have some questions, feel free to drop in at https://gitter.im/asciimatics/Lobby.

Contributing to the project

If you'd like to take part in this project (and see your name in the credits!), check out the guidance at http://asciimatics.readthedocs.org/en/latest/contributing.html

Issues
  • Add caching to labels

    Add caching to labels

    Issues fixed by this PR

    We had ~40% worst case CPU load without the fix in MPF. With this fix worst case CPU reduces to ~30%.

    What does this implement/fix?

    Cache the result of split_text for labels. This hardly changes and we invalidate the cache if it would.

    Any other comments?

    I guess it would make sense in some other widgets too. Text for example.

    PR is on top of #213 to prevent merge conflicts.

    opened by jabdoa2 25
  • Delete key in Text widget not working correctly

    Delete key in Text widget not working correctly

    I'm using Mac OS X and when I press the "delete" key (in Macs this is deleting to the left, so actually backspace) in a Text widget, its size changes and starts to behave strangely. The actual delete key (this is fn+delete in Macs) works fine. The key code of "delete" is 127 and I haven't seen this being handled in screen.py.

    bug help wanted 
    opened by ulthiel 22
  • Packaging for NixOS (test failures)

    Packaging for NixOS (test failures)

    Describe the bug

    I'm packaging this for NixOS: https://github.com/NixOS/nixpkgs/pull/54404

    However there are test failures as can be seen here: https://github.com/NixOS/nixpkgs/pull/54404#issuecomment-456238198

    To Reproduce

    Using the PR, run nix-env -f ./default.nix -iA 'python36.pkgs.asciimatics'.

    System details (please complete the following information):

    • system: "x86_64-linux"
    • host os: Linux 4.17.6, Form Bay ML, noversion
    • multi-user?: yes
    • sandbox: yes
    • version: nix-env (Nix) 2.0.4
    • nixpkgs: /nix/nixpkgs
    opened by CMCDragonkai 20
  • Add vertical separators to multicolumnlistbox

    Add vertical separators to multicolumnlistbox

    Hello, great project I was thinking, how about something like a listview ...i know that the treeview is pretty close (and great) but it would be great if we could have something like dos commander style

    enhancement good first issue 
    opened by tsgiannis 19
  • Issue on Python 3.6

    Issue on Python 3.6

    Code works perfectly on Python 2.7, but in Python 3.6 crashes the first time Screen.refresh() is called.

    Traceback (most recent call last):
      File "/Users/anthonyshaw/repo/retox-2/retox/__main__.py", line 66, in main
        screen.refresh()
      File "/Users/anthonyshaw/repo/retox-2/src/asciimatics/asciimatics/screen.py", line 2129, in refresh
        super(_CursesScreen, self).refresh()
      File "/Users/anthonyshaw/repo/retox-2/src/asciimatics/asciimatics/screen.py", line 1216, in refresh
        self._change_colours(new_cell[1], new_cell[2], new_cell[3])
      File "/Users/anthonyshaw/repo/retox-2/src/asciimatics/asciimatics/screen.py", line 2225, in _change_colours
        self._safe_write(self._a_normal)
      File "/Users/anthonyshaw/repo/retox-2/src/asciimatics/asciimatics/screen.py", line 2085, in _safe_write
        sys.stdout.write(msg)
      File "/Users/anthonyshaw/repo/retox-2/bin/../lib/python3.6/codecs.py", line 377, in write
        self.stream.write(data)
      File "/Users/anthonyshaw/repo/retox-2/bin/../lib/python3.6/codecs.py", line 376, in write
        data, consumed = self.encode(object, self.errors)
    TypeError: utf_8_encode() argument 1 must be str, not bytes
    

    Any help/tips on debugging would be appreciated.

    opened by tonybaloney 19
  • Cannot display any Chinese characters on the Widgets

    Cannot display any Chinese characters on the Widgets

    Chinese characters cannot display correctly, no exceptions or errors, just display nothing for those characters. code like this

        def _quit(self):
            self._scene.add_effect(
                PopUpDialog(self._screen,
                            u"你確定嗎?",
                            [u"是", u"否"],
                            on_close=self._quit_on_yes))
    
    jietu20170322-090227 2x bug 
    opened by nilliu 18
  • Left/Right Navigation

    Left/Right Navigation

    It would be preferable for left and right to switch focus to the nearest widget rather than the bottom of the nearest widget's column. I have an app that is a grid of equal size buttons, which this behavior makes it unusable.

    Even if this is something you are not interested in doing. Can you point me in the right direction on getting this done per app? I subclassed Layout->process_event, I see the code for KEY_LEFT and KEY_RIGHT, but I am not understanding how it works. find_next_widget looks like where the magic happens. First value is the column difference. I would think start_at would be how far down the column to check for the next widget. That doesn't seem to be it tho. Even if it is, I'd need to get the row? somewhere.

    enhancement 
    opened by peterjschroeder 18
  • text box with support for raw ansii input

    text box with support for raw ansii input

    For my app, I really needed to be able to support getting verbatim output from other terminal apps and showing it to the user. These other commands might print color text, and I wanted the color to be preserved and shown to the user as-is. I've basically been approaching my asciimatics app as if it were a web app in the terminal; if I were doing a web app, I would be able to use any HTML along with the framework widgets, and I had not considered that a similar way of working with asciimatics and raw ansii codes would be difficult.

    I dug around in the asciimatics code for a while and decided that implementing this as a widget would be... pretty difficult, at least for me. My workaround below might be useful for the library documentation.

    First we create a new exception to hold the external command to be run and scene to resume once it's finished:

    class ExternalCallException(Exception):
        def __init__(self, last_scene, command):
            self.last_scene = last_scene
            self.command = command
    

    When the external command should be run, we raise the exception like so (self is the widget object):

    raise ExternalCallException(self._scene, 'my command here')
    

    Then we add an extra except clause under the one handling screen resizes:

        except ResizeScreenError as e:
            last_scene = e.scene
        # new code below
        except ExternalCallException as e:
            last_scene = e.last_scene
            try:
                # -K means quit on ^C; -R means print ansii codes as-is
                process = Popen(e.command + " | less -K -R", shell=True)
                process.wait()
            except KeyboardInterrupt:
                # let less handle this, -K will exit cleanly
                pass
    

    With this, the external command is piped to less, which temporarily controls the whole screen and shows the command's output in color. When the user quits less, the app reappears using the same mechanism as when the screen is resized.

    enhancement 
    opened by garfieldnate 17
  • Tests fail on openSUSE Python 2 and 3

    Tests fail on openSUSE Python 2 and 3

    Describe the bug A large number of tests fail on Python 2.7 & 3.7 . I have confirmed that Python 3.7 works on Travis.

    To Reproduce The OBS project at https://build.opensuse.org/package/show/home:jayvdb:py-wheels/python-asciimatics has a .spec which makes this very reproducible.

    Build log for openSUSE tumbleweed amd64, which includes the Python 2.7 errors:

    _log.txt

    I've run the same locally on my machine with pytest and it also fails.

    Expected behavior Tess pass.

    System details (please complete the following information):

    • openSUSE (all versions)
    • Asciimatics 1.10.0
    opened by jayvdb 14
  • Request: Support immutable text fields

    Request: Support immutable text fields

    Currently you can set TextBox.disabled and Text.disabled to disable input on these fields. However, this changes the styling so that the text is harder to read. It would be much nicer if I could create a non-editable text box with normal styling. This would also allow me to capture key strokes so I could use letters for commands (f=forward, etc.).

    enhancement 
    opened by garfieldnate 14
  • Question: UI similar to Asterisk's menuselect?

    Question: UI similar to Asterisk's menuselect?

    Hi,

    I'm working on writing a UI similar to Asterisk's menuselect UI

    Shown here: image

    How difficult would it be to implement something like this?

    question 
    opened by lighth7015 3
  • Dynamically adding Scenes

    Dynamically adding Scenes

    Hi! Thank you for the wonderful library. I am building a TUI which uses tab navigation, and after reading through https://github.com/peterbrittain/asciimatics/issues/271 and taking a close look at the tab demo, I realized that there may not be a way to do what I'm looking for.

    Basically, I have a dynamic number of tabs. The user can create new tabs, and at the moment I'm strugling to figure out a way to add them to the list of scenes.

    This seems to be a typical pattern through the samples:

    def demo(screen, scene):
        scenes = [
            Scene([RootPage(screen)], -1, name="Tab1"),
            Scene([AlphaPage(screen)], -1, name="Tab2"),
            Scene([BravoPage(screen)], -1, name="Tab3"),
            Scene([CharliePage(screen)], -1, name="Tab4"),
        ]
        screen.play(scenes, stop_on_resize=True, start_scene=scene, allow_int=True)
    

    However, short of throwing a custom exception, forcing in a newly instantiated scene, and then going back to screen.play I don't see a way to dynamically register a new scene to the list and then call raise NextScene("New scene name").

    enhancement 
    opened by apockill 7
  • Create autoscroll for listbox

    Create autoscroll for listbox

    Listbox autoscrolling if scrollbar is at the bottom. Example: https://user-images.githubusercontent.com/60063501/120595827-aa149900-c44b-11eb-9b66-c90f57678208.mp4

    enhancement 
    opened by catarium 4
  • Left to right rendering effect

    Left to right rendering effect

    Is your feature request related to a problem? Please describe. I would like for an effect to render text (or ASCII characters) from left to right, like it's being typed out.

    Describe the solution you'd like Similar to the mirage effect (where text can be rendered one character at a time, only randomly), it would be cool to have text rendered one letter at a time from left to right, so it appears to be typed in real-time.

    enhancement help wanted good first issue 
    opened by mjip 11
  • Improve support for list and dict properties

    Improve support for list and dict properties

    Is your feature request related to a problem? Please describe. Some widgets return lists or dicts as properties. As described in https://stackoverflow.com/questions/3137685/using-property-decorator-on-dicts and https://stackoverflow.com/questions/37564798/python-property-on-a-list these don't work as expected when you use the setitem logic on them - e.g. widget.value[2] = "something". It simply updates the local list/dict returned by the property rather than the widget value.

    Describe the solution you'd like This should update the widget value instead. I expect this means I need to return some proxy list/dict on the getter that will pass changes on to the parent widget. Care needs to be taken on handling deep copies, though.

    Describe alternatives you've considered Could possibly just exposethis as an extra method on the widget instead. I'll need that official interface anyway for the proxy object.

    Additional context None

    enhancement 
    opened by peterbrittain 0
  • Provide library stubs (type hinting) for compatibility with Mypy (e.g.: typeshed)

    Provide library stubs (type hinting) for compatibility with Mypy (e.g.: typeshed)

    At the moment the lack of type hinting requires turning off mypy checks. It would be helpful to offer library stubs.

    enhancement help wanted 
    opened by Maroloccio 4
  • Declarative API for widgets

    Declarative API for widgets

    @boxed has proposed this API for creating a more declarative model for creating widgets...

    I experimented a bit with how the API could be nicer... here's from the contacts example using some tri.declarative magic:

    class ContactView(Frame):
        def __init__(self, screen, model):
            super(ContactView, self).__init__(screen,
                                              screen.height * 2 // 3,
                                              screen.width * 2 // 3,
                                              hover_focus=True,
                                              can_scroll=False,
                                              title="Contact Details",
                                              reduce_cpu=True)
            # Save off the model that accesses the contacts database.
            self._model = model
            self.widget_by_name = Struct()
    
            layout(
                frame=self,
                fill_frame=True,
                widgets=dict(
                    name=widget(Text, label="Name:"),
                    address=widget(Text, label="Address:"),
                    phone=widget(Text, label="Phone number:"),
                    email=widget(Text, label="Email address:"),
                    notes=widget(TextBox, height=Widget.FILL_FRAME, label="Notes:", as_string=True, line_wrap=True),
                ),
                grid=[
                    ['name'],
                    ['address'],
                    ['phone'],
                    ['email'],
                    ['notes']
                ]
            )
    
            layout(
                frame=self,
                widgets=dict(
                    ok=widget(Btn, on_click=self._ok),
                    cancel=widget(Btn, on_click=self._cancel),
                ),
                grid=[
                    ['ok', None, 'cancel']
                ]
            )
    
            self.fix()
    

    where layout is:

    @dispatch(
        widgets=EMPTY,
    )
    def layout(*, frame, widgets, grid, fill_frame=False):
        assert len(set(len(row) for row in grid)), 'All columns must be the same width'
    
        columns = [1 for _ in grid[0]]
        l = Layout(columns=columns, fill_frame=fill_frame)
        frame.add_layout(l)
        for row in grid:
            for i, widget_name in enumerate(row):
                if widget_name is None:
                    # blank space in the layout
                    continue
                widgets[widget_name].name = widget_name
    
                widget = widgets[widget_name]()
                l.add_widget(widget, i)
                frame.widget_by_name[widget_name] = widget
    
        return l
    

    It's a big rough still, but I stopped working on it for unrelated reasons. I hope it can give you some things to think about.

    Originally posted by @boxed in https://github.com/peterbrittain/asciimatics/issues/24#issuecomment-521964339

    enhancement 
    opened by peterbrittain 0
  • Native VT support in Windows

    Native VT support in Windows

    According to a dev blog (https://blogs.msdn.microsoft.com/commandline/2018/12/10/new-experimental-console-features/), Windows 10 natively supports ANSI escape codes sufficiently well to run most Linux curses apps inside WSL. That should mean that we can get a much better experience for Windows 10 users if we create a new Screen sub-class that simply uses the ANSI escape codes instead of the win32 console API.

    A quick trial shows that ANSI escape codes inside CMD.exe do indeed work and provide at least 256 colour support. Nice!

    The idea here is that we give Windows 10 users a much better experience by spotting this at the time the Screen is opened and giving an ANSI terminal instead. In theory this is almost exactly the existing _CursesScreen implementation (for colours and cursor movement), but with hard-coded ANSI escape codes.

    enhancement 
    opened by peterbrittain 4
  • Vertical barcharts

    Vertical barcharts

    Describe the solution you'd like I would really like to have some barcharts, but vertically.

    Describe alternatives you've considered The only possibility to implement this with acsiimatics I can imagine is drawing it completely manually

    enhancement help wanted good first issue 
    opened by dasteihn 23
  • Cursor move/enable feature

    Cursor move/enable feature

    I'm trying to write text editor with asciimatics, and I need to view cursor :) Please add functions like cursor.show() and cursor.move(x, y) Or just please explain how to do it. I see in code win_out = win32console.CreateConsoleScreenBuffer() win_out.SetConsoleCursorInfo(0, 1) But how to use it?

    enhancement 
    opened by ram0973 3
Releases(1.13.0)
  • 1.13.0(Apr 5, 2021)

    • Added ability to change a Button's text through a .text attribute.
    • Added ability to accept a name attribute in the Button and Label constructors.
    • Added ability to detect job pause/resume and force full screen refresh.
    • Added ability to request terminal default colours using Screen.COLOUR_DEFAULT.
    • Converted widgets to a sub-package.
    • Fixed issue with labels in a layout column preventing buttons from being pressed.
    • Fixed issue with visual overrun on Listboxes when there is a label offset.
    • Fixed issue with TextBox hitting IndexError in double buffers due to lack of clipping.
    • Fixed issue with Text/TextBox start columns on reset.
    • Added troubleshooting on terminal colour handling.
    Source code(tar.gz)
    Source code(zip)
  • 1.12.0(Nov 15, 2020)

    • Added ColouredText objects to handle embedded colour codes in text for some widgets.
    • Added parsers to handle Asciimatics and Ansi Terminal escape sequences.
    • Added ControlCodeParser to create human readable text from raw text with control codes in it.
    • Added readonly logic for Text and TextBox.
    • Added ability to enable/disable widgets by column in layouts.
    • Added left/right/up/down navigation to nearest widget.
    • Added ability to scroll screen/canvas by variable number of lines.
    • Created terminal demo
    • Fixed exception on reinstating NoneType signal handler.
    • Fixed float/int issue with recent builds of pywin32.
    • Fixed issue where setting options changed the selected value (even if it was still present).
    • Fixed erroneous trigger of on_load for all Frames at start of day.
    • Fixed bug where Frames passed on events that they already handled.
    • Fixed bug: Restore current theme on screen resize.
    • Fixed bug in scrolling the screen up.
    Source code(tar.gz)
    Source code(zip)
  • 1.11.0(May 10, 2019)

    Added allow_int parameter to Screen.play(). Added max_length parameter to Text. Added support for page up/down in TextBox. Added optional scroll bars to MultiColumnListBox. Added file_filter parameter to FileBrowser. Added wait_for_input method to Screen. Added optional theme parameter to PopupDialog. Added optional jitter parameter to Noise. Added ManagedScreen decorator. Improved performance of double-buffering.

    • NOTE: Drawing off-screen with a large scrolling buffer is no longer supported (as it wasn't needed).

    Added optional pattern parameter to Stars. Improved handling of permission errors in FileBrowser. Added formal support for defining your own colour theme. Added clear_widgets to Layout objects. Fixed height of PopUpDialog when no buttons are specified. Fixed bug where asciimatics Scenes would hang when the clock is moved back in time. Fixed off-by-one error in BarChart labels. Fixed bug where Labels ignored the custom_colour property. Added default date and time to DatePicker and TimePicker when no value specified.

    Source code(tar.gz)
    Source code(zip)
  • 1.10.0(Sep 18, 2018)

    • Added 'Frame.focussed_widget' to access current focussed widget of the frame.
    • Added PopupMenu for dynamic contextual menus.
    • Added DropdownList widget.
    • Added VerticalDivider widget.
    • Added optional scroll bar to Listboxes.
    • Added line_wrap option to TextBoxes.
    • Added line_char option to Dividers.
    • Added align option to Labels.
    • Added width property to widgets.
    • Added set_theme to Frames and provided some new colour schemes.
    • Fixed Screen.wrapper() to return result from wrapped function.
    • Fixed list box truncation when lines are too long.
    • Fixed issue with background colour when scrolling GNOME terminal.
    • Fixed Text validator to support instance methods.
    • Fixed exception raised by getdefaultlocale on some curses systems.
    • Performance tweaks for non-unicode widgets.
    • Relaxed restriction on static function callbacks for pop-up dialogs.
    • Fixed bug where Listbox.reset() overrode current selected value.
    • Fixed handling of decomposed unicode file names in FileBrowser for MacOS
    • Fixed CJK issues with Screen.paint() and SpeechBubble.
    • Fixed issue with dynamically added Frames so that they are reset before displayed for the first time.
    Source code(tar.gz)
    Source code(zip)
  • 1.9.0(Dec 6, 2017)

    • Added FileBrowser, DatePicker and TimePicker widgets.

      • Made screen a mandatory positional parameter to all Effects in the process.
      • NOTE: Any custom Effects you have created will now need to pass the screen down to the parent class.
    • Added fill_polygon() to Screen and Canvas.

    • Added the Kaleidoscope and RotatedDuplicate renderers.

    • Created Maps demo - which renders vector tiles and satellite images from Mapbox.

    • Added optional is_modal parameter to Frame constructor.

    • Added on_blur and on_focus parameters to all interactive Widgets.

    • Added colour property to Cogs Effect.

    • Added title property to Frame.

    • Added text property to Label.

    • Added hide_char parameter to Text constructor to hide any entered text - e.g. for passwords.

    • Added optional height parameter to Label constructor.

    • Allowed programs to set "default" values for Widgets - which means you need to reset each field in a Frame explicitly rather than relying on reset to blank out uninitialized fields.

    • Fixed up signal handling to re-instate old handlers on Screen.close().

    • Fixed missing on_select handler for ListBox.

    Source code(tar.gz)
    Source code(zip)
  • 1.7.2(Aug 15, 2017)

  • 1.7.1(Aug 15, 2017)

A thin, practical wrapper around terminal capabilities in Python

Blessings Coding with Blessings looks like this... from blessings import Terminal t = Terminal() print(t.bold('Hi there!')) print(t.bold_red_on_brig

Erik Rose 1.3k Oct 19, 2021
Python library that measures the width of unicode strings rendered to a terminal

Introduction This library is mainly for CLI programs that carefully produce output for Terminals, or make pretend to be an emulator. Problem Statement

Jeff Quast 250 Oct 15, 2021
Simple cross-platform colored terminal text in Python

Colorama Makes ANSI escape character sequences (for producing colored terminal text and cursor positioning) work under MS Windows. PyPI for releases |

Jonathan Hartley 2.6k Oct 23, 2021
Library for building powerful interactive command line applications in Python

Python Prompt Toolkit prompt_toolkit is a library for building powerful interactive command line applications in Python. Read the documentation on rea

prompt-toolkit 7.3k Oct 23, 2021
Pythonic command line arguments parser, that will make you smile

docopt creates beautiful command-line interfaces Video introduction to docopt: PyCon UK 2012: Create *beautiful* command-line interfaces with Python N

null 7.5k Oct 25, 2021
A drop-in replacement for argparse that allows options to also be set via config files and/or environment variables.

ConfigArgParse Overview Applications with more than a handful of user-settable options are best configured through a combination of command line args,

null 544 Oct 18, 2021
Cleo allows you to create beautiful and testable command-line interfaces.

Cleo Create beautiful and testable command-line interfaces. Cleo is mostly a higher level wrapper for CliKit, so a lot of the components and utilities

Sébastien Eustace 763 Oct 15, 2021
Rich is a Python library for rich text and beautiful formatting in the terminal.

Rich 中文 readme • lengua española readme • Läs på svenska Rich is a Python library for rich text and beautiful formatting in the terminal. The Rich API

Will McGugan 30.4k Oct 24, 2021
Color text streams with a polished command line interface

colout(1) -- Color Up Arbitrary Command Output Synopsis colout [-h] [-r RESOURCE] colout [-g] [-c] [-l min,max] [-a] [-t] [-T DIR] [-P DIR] [-d COLORM

nojhan 1.1k Sep 28, 2021
Typer, build great CLIs. Easy to code. Based on Python type hints.

Typer, build great CLIs. Easy to code. Based on Python type hints. Documentation: https://typer.tiangolo.com Source Code: https://github.com/tiangolo/

Sebastián Ramírez 6.5k Oct 22, 2021
sane is a command runner made simple.

sane is a command runner made simple.

Miguel M. 14 Jul 24, 2021
Cement is an advanced Application Framework for Python, with a primary focus on CLI

Cement Framework Cement is an advanced Application Framework for Python, with a primary focus on Command Line Interfaces (CLI). Its goal is to introdu

Data Folk Labs, LLC 1k Oct 25, 2021
Python and tab completion, better together.

argcomplete - Bash tab completion for argparse Tab complete all the things! Argcomplete provides easy, extensible command line tab completion of argum

Andrey Kislyuk 991 Oct 22, 2021
Python Command-line Application Tools

Clint: Python Command-line Interface Tools Clint is a module filled with a set of awesome tools for developing commandline applications. C ommand L in

Kenneth Reitz Archive 57 Oct 12, 2021
plotting in the terminal

bashplotlib plotting in the terminal what is it? bashplotlib is a python package and command line tool for making basic plots in the terminal. It's a

Greg Lamp 1.6k Oct 17, 2021
Python composable command line interface toolkit

$ 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 "Comm

The Pallets Projects 11.5k Oct 24, 2021
Python Fire is a library for automatically generating command line interfaces (CLIs) from absolutely any Python object.

Python Fire Python Fire is a library for automatically generating command line interfaces (CLIs) from absolutely any Python object. Python Fire is a s

Google 20.3k Oct 24, 2021
emoji terminal output for Python

Emoji Emoji for Python. This project was inspired by kyokomi. Example The entire set of Emoji codes as defined by the unicode consortium is supported

Taehoon Kim 1.3k Oct 16, 2021
A simple terminal Christmas tree made with Python

Python Christmas Tree A simple CLI Christmas tree made with Python Installation Just clone the repository and run $ python terminal_tree.py More opti

Francisco B. 34 Oct 6, 2021