{"id":29759363,"url":"https://github.com/pyprogrammerblog/progress-updater","last_synced_at":"2025-10-20T06:51:09.936Z","repository":{"id":58512462,"uuid":"532285269","full_name":"pyprogrammerblog/progress-updater","owner":"pyprogrammerblog","description":"The Progress-Updater help you to track your tasks using backends like Redis, Mongo or SQL","archived":false,"fork":false,"pushed_at":"2022-09-17T12:22:07.000Z","size":65,"stargazers_count":2,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-06-24T07:39:10.543Z","etag":null,"topics":["data-engineering","mongo","pipelines","pydantic","python","redis","sql"],"latest_commit_sha":null,"homepage":"","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/pyprogrammerblog.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}},"created_at":"2022-09-03T14:35:21.000Z","updated_at":"2023-01-17T14:28:34.000Z","dependencies_parsed_at":"2022-09-06T11:22:37.225Z","dependency_job_id":null,"html_url":"https://github.com/pyprogrammerblog/progress-updater","commit_stats":null,"previous_names":[],"tags_count":10,"template":false,"template_full_name":null,"purl":"pkg:github/pyprogrammerblog/progress-updater","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/pyprogrammerblog%2Fprogress-updater","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/pyprogrammerblog%2Fprogress-updater/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/pyprogrammerblog%2Fprogress-updater/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/pyprogrammerblog%2Fprogress-updater/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/pyprogrammerblog","download_url":"https://codeload.github.com/pyprogrammerblog/progress-updater/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/pyprogrammerblog%2Fprogress-updater/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":266887178,"owners_count":24001063,"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","status":"online","status_checked_at":"2025-07-24T02:00:09.469Z","response_time":99,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"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":["data-engineering","mongo","pipelines","pydantic","python","redis","sql"],"created_at":"2025-07-26T19:14:24.474Z","updated_at":"2025-10-20T06:51:09.834Z","avatar_url":"https://github.com/pyprogrammerblog.png","language":"Python","readme":"progress-updater\n=================\n\n[![Documentation Status](https://readthedocs.org/projects/progress-updater/badge/?version=latest)](https://progress-updater.readthedocs.io/en/latest/?badge=latest)\n[![License-MIT](https://img.shields.io/badge/License-MIT-yellow.svg)](https://github.com/pyprogrammerblog/progress-updater/blob/master/LICENSE)\n[![GitHub Actions](https://github.com/pyprogrammerblog/progress-updater/workflows/CI/badge.svg/)](https://github.com/pyprogrammerblog/progress-updater/workflows/CI/badge.svg/)\n[![PyPI version](https://badge.fury.io/py/progress-updater.svg)](https://badge.fury.io/py/progress-updater)\n\nWriting the progress of a task to a backend!\n\nInstallation\n-------------\n\nInstall it using ``pip``\n\n```shell\npip install progress-updater\n```\n\nBasic usage\n-------------\n\n```python\nfrom progress_updater import ProgressUpdater\nfrom progress_updater.backends.mongo import MongoSettings\n\nsettings = MongoSettings(\n    mongo_connection=\"mongodb://user:pass@mongo:27017\",\n    mongo_db=\"db\",\n    mongo_collection=\"logs\",\n)\n\nupdater = ProgressUpdater(task_name=\"My Task\", settings=settings)\n\nwith updater(block_name=\"First part\"):\n    # doing things\n    updater.notify(\"doing first block...\")\n    # doing more things\n\nwith updater(block_name=\"Second part\"):\n    # doing things\n    updater.notify(\"doing second block...\")\n    # doing more things\n\nupdater.raise_latest_exception()  # if exists\n```\n\nThe output is:\n```shell\n- Task: My task\n\n- Entering First part\n  doing first block...\n\tTime spent: 0h0m\n\tSuccessfully completed\n\n- Entering Second part\n  doing second block...\n\tTime spent: 0h0m\n\tSuccessfully completed\n```\n\nBackends\n-------------------\nThe available backends to store logs are **Mongo**, **Redis** and **SQL**.\nPlease read the [docs](https://progress-updater.readthedocs.io/en/latest/) \nfor further information.\n\nSetting your backend with environment variables\n--------------------------------------------------\nYou can set your backend by defining env vars.\nThe `PU__` prefix indicates that it belongs to `ProgressUpdater`.\n```shell\n# SQL\nPU__SQL_DSN='postgresql+psycopg2://user:pass@postgres:5432/db'\nPU__SQL_TABLE='logs'\n...\n\n# Redis\nPU__REDIS_HOST='redis'\nPU__REDIS_DB='1'\nPU__REDIS_PASSWORD='pass'\n...\n\n# Mongo\nPU__MONGO_CONNECTION='mongodb://user:pass@mongo:27017'\nPU__MONGO_DB='db'\nPU__MONGO_COLLECTION='logs'\n...\n```\n\nAnd then when creating a `ProgressUpdater` object, the backend will be \nautomatically configured.\n```python\nfrom progress_updater import ProgressUpdater\n\nwith ProgressUpdater(task_name=\"My Task\") as updater:\n    pass\n```\n\nDocumentation\n--------------\n\nPlease visit this [link](https://progress-updater.readthedocs.io/en/latest/) for documentation.\n","funding_links":[],"categories":[],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fpyprogrammerblog%2Fprogress-updater","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fpyprogrammerblog%2Fprogress-updater","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fpyprogrammerblog%2Fprogress-updater/lists"}