{"id":15720849,"url":"https://github.com/softgeekro/sgzenity","last_synced_at":"2026-01-26T17:02:04.238Z","repository":{"id":242558920,"uuid":"809760133","full_name":"SoftGeekRO/sgzenity","owner":"SoftGeekRO","description":null,"archived":false,"fork":false,"pushed_at":"2024-06-29T13:56:24.000Z","size":130,"stargazers_count":1,"open_issues_count":1,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-11-27T20:06:31.031Z","etag":null,"topics":["gtk3","library","pypackage","python3","zenity"],"latest_commit_sha":null,"homepage":"https://www.softgeek.ro","language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"gpl-3.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/SoftGeekRO.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","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}},"created_at":"2024-06-03T11:56:16.000Z","updated_at":"2024-06-29T13:53:57.000Z","dependencies_parsed_at":"2024-10-24T16:44:45.138Z","dependency_job_id":"0a5c5af2-d50e-4473-8885-abb5abfedd0f","html_url":"https://github.com/SoftGeekRO/sgzenity","commit_stats":{"total_commits":35,"total_committers":2,"mean_commits":17.5,"dds":0.02857142857142858,"last_synced_commit":"903c6dba5e992fcfbde5b2cc623ae9c839d51b79"},"previous_names":["softgeekro/sgzenity"],"tags_count":9,"template":false,"template_full_name":null,"purl":"pkg:github/SoftGeekRO/sgzenity","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/SoftGeekRO%2Fsgzenity","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/SoftGeekRO%2Fsgzenity/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/SoftGeekRO%2Fsgzenity/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/SoftGeekRO%2Fsgzenity/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/SoftGeekRO","download_url":"https://codeload.github.com/SoftGeekRO/sgzenity/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/SoftGeekRO%2Fsgzenity/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":28782624,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-01-26T13:55:28.044Z","status":"ssl_error","status_checked_at":"2026-01-26T13:55:26.068Z","response_time":59,"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":["gtk3","library","pypackage","python3","zenity"],"created_at":"2024-10-03T22:00:37.237Z","updated_at":"2026-01-26T17:02:04.221Z","avatar_url":"https://github.com/SoftGeekRO.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"[![GitHub version](https://badge.fury.io/gh/SoftGeekRO%2Fsgzenity.svg)](https://badge.fury.io/gh/SoftGeekRO%2Fsgzenity)\n[![PyPI version](https://badge.fury.io/py/sgzenity.svg)](https://badge.fury.io/py/sgzenity)\n[![Merge2Main](https://github.com/SoftGeekRO/sgzenity/actions/workflows/push_to_main.yml/badge.svg?event=push)](https://github.com/SoftGeekRO/sgzenity/actions/workflows/push_to_main.yml)\n[![Publish Python 🐍 distribution 📦 to PyPI and TestPyPI](https://github.com/SoftGeekRO/sgzenity/actions/workflows/publish_to_pypi.yml/badge.svg?event=release)](https://github.com/SoftGeekRO/sgzenity/actions/workflows/publish_to_pypi.yml)\n![PyPI - Downloads](https://img.shields.io/pypi/dm/sgzenity?link=https%3A%2F%2Fpypi.org%2Fproject%2Fsgzenity%2F)\n![GitHub License](https://img.shields.io/github/license/softgeekRO/sgzenity)\n\n# SGZenity\n\nSGZenity is a library for python which was inspired by Zenity.\n\nWhen you write scripts, you can use SGZenity to create simple dialogs that interact graphically with the user.\n\n## Requirements\n\n* Python 3\n* [GTK+4](https://docs.gtk.org/)\n* python3-gi\n\n## Installation\n\nInstall using pip:\n\n```bash\n$ pip install sgzenity\n```\n\nOr clone the repo:\n\n```bash\n$ git clone https://github.com/SoftGeekRo/sgzenity.git\n$ cd ./sgzenity\n$ python setup.py install\n```\n\n## Example\n\nSimple dialog:\n\n## API\n\n### Simple message\n```python\nmessage(title='', text='', width=330, height=120, timeout=None)\n```\n\u003eDisplay a simple message\n\u003e \n\u003eParameters:\n\u003e* **text** (*str*) – text inside the window\n\u003e* **title** (*str*) – title of the window\n\u003e* **width** (*int*) – window width\n\u003e* **height** (*int*) – window height\n\u003e* **timeout** (*int*) – close the window after n seconds\n\n### Error\n\n```python\nerror(title='', text='', width=330, height=120, timeout=None)\n```\n\n\u003eDisplay a simple error\n\u003e\n\u003eParameters:\n\u003e* **text** (*str*) – text inside the window\n\u003e* **title** (*str*) – title of the window\n\u003e* **width** (*int*) – window width\n\u003e* **height** (*int*) – window height\n\u003e* **timeout** (*int*) – close the window after n seconds\n\n### Warning\n```python\nwarning(title='', text='', width=330, height=120, timeout=None)\n```\n\u003eDisplay a simple warning\n\u003e\n\u003eParameters:\n\u003e* **text** (*str*) – text inside the window\n\u003e* **title** (*str*) – title of the window\n\u003e* **width** (*int*) – window width\n\u003e* **height** (*int*) – window height\n\u003e* **timeout** (*int*) – close the window after n seconds\n\n### Question\n\n![basic_dialog_01](docs/img/basic_dialog.png)\n\n```python\nquestion(title='', text='', width=330, height=120, timeout=None)\n```\n\u003eDisplay a question, possible answer are yes/no.\n\u003e\n\u003eParameters:\n\u003e* **text** (*str*) – text inside the window\n\u003e* **title** (*str*) – title of the window\n\u003e* **width** (*int*) – window width\n\u003e* **height** (*int*) – window height\n\u003e* **timeout** (*int*) – close the window after n seconds\n\u003e\n\u003e_Returns_: The answer as a boolean\n\u003e\n\u003e_Return type_: bool\n\n### Progress Bar\n\n![basic_dialog_01](docs/img/progressbar.png)\n\n```python\nprogress_bar(title, text, pulse_mode, callback)\n```\n\n\u003e Display a text input\n\u003e\n\u003eParameters:\n\u003e* **title** (*str*) – Title of the progress window\n\u003e* **text** (*str*) – Text that will be present on top of the progress bar\n\u003e* **pulse_mode** (*bool*) – Character of the progress bar, pulse of progress based on the callback returns values from 0.0 to 1\n\u003e* **callback** (*int*) – callback function for control the progress bar. Returns a value between 0.0 and 1\n\n\n### Demo\n\n```python\nimport time\nfrom sgzenity.thread import WorkerThread\nfrom sgzenity import ProgressBar\n\nclass WorkingThread(WorkerThread):\n    def payload(self):\n        loading = self.data\n        steps = 10\n        for s in range(steps):\n            if self.stop:\n                break\n            loading.heartbeat()\n            print('Pulse {}.'.format(s))\n            time.sleep(1)\n        if self.stop:\n            print('Working thread canceled.')\n        else:\n            print('Working thread ended.')\n        loading.close()\n\n\ndef sg_progress_bar():\n    loading = ProgressBar(\"DEMO TITLE\", \"DEMO TEXT\", pulse_mode=True)\n\n    workthread = WorkingThread(loading)\n    loading.show(workthread)\n    workthread.start()\n\n    Gtk.main()\n\n\nsg_progress_bar()\n```\n\n### Entry\n```python\nentry(text='', placeholder='', title='', width=330, height=120, timeout=None)\n```\n\u003eDisplay a text input\n\u003e\n\u003eParameters:\n\u003e* **text** (*str*) – text inside the window\n\u003e* **placeholder** (*str*) – placeholder for the input\n\u003e* **title** (*str*) – title of the window\n\u003e* **width** (*int*) – window width\n\u003e* **height** (*int*) – window height\n\u003e* **timeout** (*int*) – close the window after n seconds\n\u003e\n\u003e_Returns_: The content of the text input\n\u003e_Return type_: str\n\n### Password\n```python\npassword(text='', placeholder='', title='', width=330, height=120, timeout=None)\n```\n\u003eDisplay a text input with hidden characters\n\u003e\n\u003eParameters:\n\u003e* **text** (*str*) – text inside the window\n\u003e* **placeholder** (*str*) – placeholder for the input\n\u003e* **title** (*str*) – title of the window\n\u003e* **width** (*int*) – window width\n\u003e* **height** (*int*) – window height\n\u003e* **timeout** (*int*) – close the window after n seconds\n\u003e\n\u003eReturns: The content of the text input\n\u003e\n\u003eReturn type: str\n\n### List of values\n```python\nzlist(columns, items, print_columns=None, text='', title='', width=330, height=120, timeout=None)\n```\n\u003eDisplay a list of values\n\u003e\n\u003eParameters:\n\u003e* **columns** (*list of strings*) – a list of columns name\n\u003e* **items** (*list of strings*) – a list of values\n\u003e* **print_columns** (*int** (**None if all the columns**)*) –\n\u003e  index of a column (return just the values from this column)\n\u003e* **text** (*str*) – text inside the window\n\u003e* **title** (*str*) – title of the window\n\u003e* **width** (*int*) – window width\n\u003e* **height** (*int*) – window height\n\u003e* **timeout** (*int*) – close the window after n seconds\n\u003e\n\u003e_Returns_: A row of values from the table\n\u003e\n\u003e_Return type_: list\n\n### File selection\n```python\nfile_selection(multiple=False, directory=False, save=False, confirm_overwrite=False, filename=None, title='', width=330, height=120, timeout=None)\n```\n\u003eOpen a file selection window\n\u003e\n\u003eParameters:\n\u003e* **multiple** (*bool*) – allow multiple file selection\n\u003e* **directory** (*bool*) – only directory selection\n\u003e* **save** (*bool*) – save mode\n\u003e* **confirm_overwrite** (*bool*) – confirm when a file is overwritten\n\u003e* **filename** (*str*) – placeholder for the filename\n\u003e* **text** (*str*) – text inside the window\n\u003e* **title** (*str*) – title of the window\n\u003e* **width** (*int*) – window width\n\u003e* **height** (*int*) – window height\n\u003e* **timeout** (*int*) – close the window after n seconds\n\u003e\n\u003e_Returns_: path of files selected.\n\u003e\n\u003e_Return type_: string or list if multiple enabled\n\n### Calendar\n\n```python\ncalendar(text='', day=None, month=None, title='', width=330, height=120, timeout=None)\n```\n\u003eDisplay a calendar\n\u003e\n\u003eParameters:\n\u003e* **text** (*str*) – text inside the window\n\u003e* **day** (*int*) – default day\n\u003e* **month** (*int*) – default month\n\u003e* **text** – text inside the window\n\u003e* **title** (*str*) – title of the window\n\u003e* **width** (*int*) – window width\n\u003e* **height** (*int*) – window height\n\u003e* **timeout** (*int*) – close the window after n seconds\n\u003e\n\u003e_Returns_: (year, month, day)\n\u003e \n\u003e_Return type_: tuple\n\n![calendar_dialog_01](docs/img/calendar_dialog.png)\n\nAnd display the result :\n\n```bash\n$ python demo.py\n$ (year=2017, month=6, day=4)\n```\n\n### Color selection\n\n```python\ncolor_selection(show_palette=False, opacity_control=False, title='', width=330, height=120, timeout=None)\n```\n\n\u003eDisplay a color selection dialog\n\u003e\n\u003eParameters:\n\u003e* **show_palette** (*bool*) – hide/show the palette with preselected colors\n\u003e* **opacity_control** (*bool*) – allow to control opacity\n\u003e* **title** (*str*) – title of the window\n\u003e* **width** (*int*) – window width\n\u003e* **height** (*int*) – window height\n\u003e* **timeout** (*int*) – close the window after n seconds\n\u003e\n\u003e_Returns_: the color selected by the user\n\u003e\n\u003e_Return type_: str\n\n### Scale\n\n```python\nscale(text='', value=0, min=0, max=100, step=1, draw_value=True, title='', width=330, height=120, timeout=None)\n```\n\n\u003eSelect a number with a range widget\n\u003e\n\u003eParameters:\n\u003e* **text** (*str*) – text inside window\n\u003e* **value** (*int*) – current value\n\u003e* **min** (*int*) – minimum value\n\u003e* **max** (*int*) – maximum value\n\u003e* **step** (*int*) – incrementation value\n\u003e* **draw_value** (*bool*) – hide/show cursor value\n\u003e* **title** (*str*) – title of the window\n\u003e* **width** (*int*) – window width\n\u003e* **height** (*int*) – window height\n\u003e* **timeout** (*int*) – close the window after n seconds\n\u003e\n\u003e_Returns_: The value selected by the user\n\u003e\n\u003e_Return type_: float\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsoftgeekro%2Fsgzenity","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fsoftgeekro%2Fsgzenity","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsoftgeekro%2Fsgzenity/lists"}