{"id":20012443,"url":"https://github.com/jannchie/inch","last_synced_at":"2026-06-06T18:32:06.219Z","repository":{"id":261295345,"uuid":"876817946","full_name":"Jannchie/inch","owner":"Jannchie","description":null,"archived":false,"fork":false,"pushed_at":"2024-11-05T18:33:43.000Z","size":6,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-03-01T15:58:56.501Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/Jannchie.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"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-10-22T15:50:51.000Z","updated_at":"2024-11-05T18:33:46.000Z","dependencies_parsed_at":"2024-11-05T20:03:20.540Z","dependency_job_id":"b850a315-9ebd-425b-b587-a91bf4e7e1ab","html_url":"https://github.com/Jannchie/inch","commit_stats":null,"previous_names":["jannchie/inch"],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Jannchie%2Finch","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Jannchie%2Finch/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Jannchie%2Finch/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Jannchie%2Finch/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/Jannchie","download_url":"https://codeload.github.com/Jannchie/inch/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":241447913,"owners_count":19964381,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","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":[],"created_at":"2024-11-13T07:30:28.452Z","updated_at":"2026-06-06T18:32:05.999Z","avatar_url":"https://github.com/Jannchie.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"# inch\n\nInch is a Python library specifically designed to manage and execute long-running tasks in batches using multithreading. It enhances the user experience by providing a visual progress display through the rich library. The name \"Inch\" reflects its core functionality, enabling tasks to \"move along slowly and carefully,\" thus ensuring a systematic and controlled execution process.\n\n## DEMO\n\n[Online Demo](https://asciinema.org/a/687421)\n\n## Features\n\n- Define concurrent tasks using an abstract base class.\n- Execute multiple tasks concurrently with adjustable worker threads.\n- Track and display task progress using the rich library.\n\n## Installation\n\nInch can be installed using pip:\n\n```bash\npip install inch\n```\n\nShow demo:\n\n```bash\npython -m inch\n```\n\n## Usage\n\nHere's an example of how to use Inch to execute a simple task:\n\n```python\nfrom inch import Inch, InchPoolExecutor\nimport random\nfrom time import sleep\n\nclass TestTask(Inch):\n    def __call__(self):\n        while self.completed \u003c self.total:\n            self.completed += random.randint(1, 200)\n            sleep(0.1)\n\nclass TestTaskNoProgress(Inch):\n\n    def __call__(self):\n        completed = 0\n        while completed \u003c 1200:\n            completed += random.randint(1, 200)\n            sleep(0.1)\n\nwith InchPoolExecutor() as executor:\n    for i in range(20):\n        if i % 5 == 0:\n            executor.start_inch(TestTaskNoProgress(name=f\"Task {i+1}\"))\n        else:\n            executor.start_inch(TestTask(name=f\"Task {i+1}\", total=1000))\n\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fjannchie%2Finch","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fjannchie%2Finch","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fjannchie%2Finch/lists"}