{"id":32774654,"url":"https://github.com/pji/thurible","last_synced_at":"2026-05-18T07:34:22.309Z","repository":{"id":64916314,"uuid":"570242117","full_name":"pji/thurible","owner":"pji","description":"Tools for creating fullscreen terminal UIs on top of blessed.","archived":false,"fork":false,"pushed_at":"2025-04-05T17:19:27.000Z","size":6186,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-11-28T05:53:09.935Z","etag":null,"topics":["python","python3","python310","python311","python312","python313","python39","terminal"],"latest_commit_sha":null,"homepage":"https://thurible.readthedocs.io","language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/pji.png","metadata":{"files":{"readme":"README.rst","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null,"notice":null,"maintainers":null,"copyright":null,"agents":null,"dco":null,"cla":null}},"created_at":"2022-11-24T17:10:55.000Z","updated_at":"2025-04-05T17:23:52.000Z","dependencies_parsed_at":"2022-12-18T19:03:08.312Z","dependency_job_id":null,"html_url":"https://github.com/pji/thurible","commit_stats":null,"previous_names":[],"tags_count":2,"template":false,"template_full_name":null,"purl":"pkg:github/pji/thurible","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/pji%2Fthurible","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/pji%2Fthurible/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/pji%2Fthurible/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/pji%2Fthurible/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/pji","download_url":"https://codeload.github.com/pji/thurible/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/pji%2Fthurible/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":33169315,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-05-18T05:43:36.989Z","status":"ssl_error","status_checked_at":"2026-05-18T05:43:19.133Z","response_time":71,"last_error":"SSL_read: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["python","python3","python310","python311","python312","python313","python39","terminal"],"created_at":"2025-11-04T10:04:04.128Z","updated_at":"2026-05-18T07:34:22.303Z","avatar_url":"https://github.com/pji.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"########\nthurible\n########\n\nTools for creating fullscreen terminal UIs on top of blessed.\n\n\nWhat does it do?\n================\nIt provides some tools for creating and managing interactive user\ninterfaces in the terminal.\n\n\nWhy Did I Make This?\n====================\nI have a couple of programs that have interactive UIs in a terminal,\nand I wanted to consolidate that code. There are probably other packages\nthat do this better, but I prefer to keep my dependencies to a minimum.\nPlus, I like playing with terminal user interfaces. They're neat.\n\n\nWill It Work with My Terminal?\n==============================\nIt's intended to work with anything that `blessed` works with. Is\nthat everything? Probably not. Certainly some features, like color,\nwill only work if your terminal supports it. Some things, like the\nframes that can go around the panels rely on Unicode characters that\nmay not exist in all fonts. If you're using a variable width font in\nyour terminal… I don't know. Things are probably going to be messed up.\n\nIf you run into something should work but isn't, open an issue. I'm\njust doing this on my own in my spare time, but I'll try to look at it.\n\n\nUsing `thurible`\n================\n`Panels` format and display data in a terminal. If you are used\nto working with graphical user interfaces, you can think of them like\nwindows. They are how the application puts data on the screen.\n\nWhile `thurible` has tools for handling displaying panels for you,\nyou can display a panel yourself just by using `print`. Let's\nsay you just want to put the word \"SPAM\" in the middle of the terminal::\n\n    from thurible import Splash\n    \n    splash = Splash('spam')\n    print(splash, end='', flush=True)\n\nDo you have to add the `end` and `flush` attributes to the\n`print`? Yes. Or, at least, it works better if you do. Without\n`end`, `print` will add a new line after it prints the panel,\nwhich will cause the top of the panel to scroll up off the top of the\nterminal window. Without `flush`, `print` may delay printing\nthe panel until there is more text to display in the terminal, causing\nyour panel to be displayed after it is relevant to the user.\n\nUsing `print` to display the panel only shows the panel in the\nterminal. It won't all users to interact with the panel by, for example,\nscrolling through its text or selecting a menu option. While it's\npossible to create your own code for handling that, the easiest way to\ndo it is to use a manager.\n\n\nManagers and Messages\n=====================\n`Managers` manage displaying panels and retrieving user input, so\nyou don't have to worry about it. Your code just needs to tell the\nmanager what you want to display and watch for messages back from the\nmanager containing input from the user.\n\n`Messages` are the objects you use to send instructions to the\nmanager, and they are the objects the manager uses to send data back\nto you.\n\nLet's expand on the previous example. You still want to put the word\n\"SPAM\" in the middle of the screen. But, now, you want to end the\nprogram after the user presses any key on their keyboard::\n\n    from threading import Thread\n    from thurible import get_queues, queued_manager, Splash\n    import thurible.messages as tm\n\n    # Set up and run the thread for the manager.\n    q_to, q_from = get_queues()\n    T = Thread(target=queued_manager, args=(q_to, q_from))\n    T.start()\n\n    # Create the panel.\n    footer = 'Press any key to continue.'\n    splash = Splash('spam', frame_type='heavy', footer=footer)\n\n    # Tell the manager to display the panel.\n    store = tm.Store('splash', splash)\n    show = tm.Show('splash')\n    q_to.put(store)\n    q_to.put(show)\n\n    # Watch for input indicating the user has pressed a key or if the\n    # manager is ending for some other reason, meaning you'll never get\n    # the key pressed by the user.\n    data = None\n    while not isinstance(data, [tm.Data, tm.Ending]):\n        if not q_from.empty():\n            data = q_from.get()\n    \n    # Once the user pressed a key, tell the manager to end gracefully.\n    # If the manager sent an Ending message, then you don't need to\n    # tell it to end. It's crashed on its own.\n    if isinstance(data, tm.Data):\n        end = tm.End('Goodbye!')\n        q_to.put(end)\n\n\nUsage Examples\n==============\nUsage examples are found in the `examples/` directory.\n\nexamples/eventsplash.py\n    A terminal application that uses a `thurible.event_manager`\n    to display a simple splash screen.\nexamples/favword.py\n    A terminal application that uses `thurible` to ask the user for\n    their favorite word.\nexamples/filereader.py\n    A terminal application that uses `thurible` to navigate the\n    filesystem and read files.\nexamples/tensecs.py\n    A terminal application that uses `thurible` to track a ten\n    second wait using a progress bar.\nexamples/showsplash.py\n    A terminal application that uses a `thurible.queued_manager`\n    to display a simple splash screen.\n\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fpji%2Fthurible","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fpji%2Fthurible","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fpji%2Fthurible/lists"}