{"id":18760549,"url":"https://github.com/evrone/toggl-python","last_synced_at":"2026-03-08T21:38:54.501Z","repository":{"id":46149390,"uuid":"274091381","full_name":"evrone/toggl-python","owner":"evrone","description":null,"archived":false,"fork":false,"pushed_at":"2025-02-04T13:39:20.000Z","size":236,"stargazers_count":17,"open_issues_count":24,"forks_count":8,"subscribers_count":37,"default_branch":"master","last_synced_at":"2026-01-13T16:22:18.467Z","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":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/evrone.png","metadata":{"files":{"readme":"README.md","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}},"created_at":"2020-06-22T09:12:06.000Z","updated_at":"2025-12-23T22:15:48.000Z","dependencies_parsed_at":"2024-05-17T15:58:49.749Z","dependency_job_id":"fa0f1dac-62f5-44ef-b73f-63828bae6762","html_url":"https://github.com/evrone/toggl-python","commit_stats":null,"previous_names":["evrone/toggl_python"],"tags_count":6,"template":false,"template_full_name":null,"purl":"pkg:github/evrone/toggl-python","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/evrone%2Ftoggl-python","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/evrone%2Ftoggl-python/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/evrone%2Ftoggl-python/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/evrone%2Ftoggl-python/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/evrone","download_url":"https://codeload.github.com/evrone/toggl-python/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/evrone%2Ftoggl-python/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":29760741,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-02-23T21:02:23.375Z","status":"ssl_error","status_checked_at":"2026-02-23T20:58:31.539Z","response_time":90,"last_error":"SSL_connect returned=1 errno=0 peeraddr=140.82.121.6:443 state=error: 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":[],"created_at":"2024-11-07T18:13:07.861Z","updated_at":"2026-02-23T23:35:52.536Z","avatar_url":"https://github.com/evrone.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"# toggl-python\n\n![https://pypi.python.org/pypi/toggl_python](https://img.shields.io/pypi/v/toggl_python.svg) ![Downloads](https://img.shields.io/pypi/dm/toggl-python) [![Supported python versions](https://img.shields.io/pypi/pyversions/toggl_python.svg?style=flat-square)](https://pypi.python.org/pypi/toggl_python) [![MIT License](https://img.shields.io/pypi/l/aiogram.svg?style=flat-square)](https://opensource.org/licenses/MIT)\n\nTyped `Toggl API` Python wrapper with pre-validation to avoid extra network usage.\n\n* Based on [Toggl API](https://engineering.toggl.com/docs/)\n* [Documentation](https://toggl-python.readthedocs.io)\n\n\n## Important Note\n\nMigration to API V9 is currently in progress. Many methods are not implemented yet. Feel free to open an issue to escalate their development.\n\n## Install\n\n`pip install toggl-python`\n\n## Usage\n\nFetch information about current user via `TokenAuth` (`TOGGL_TOKEN` is required):\n\n```python\nfrom toggl_python.auth import TokenAuth\nfrom toggl_python.entities.user import CurrentUser\n\n\nif __name__ == \"__main__\":\n    auth = TokenAuth(token=\"TOGGL_TOKEN\")\n    CurrentUser(auth=auth).me()\n```\n\n`Basic Auth` is also supported:\n\n\n```python\nfrom toggl_python.auth import BasicAuth\nfrom toggl_python.entities.user import CurrentUser\n\n\nif __name__ == \"__main__\":\n    auth = BasicAuth(username=\"username\", password=\"password\")\n    CurrentUser(auth=auth).me()\n\n```\n\nPackage supports different input formats for `datetime` arguments:\n\n* `str`:\n\n```python\nfrom toggl_python.auth import TokenAuth\nfrom toggl_python.entities.user import CurrentUser\n\n\nif __name__ == \"__main__\":\n    auth = TokenAuth(token=\"TOGGL_TOKEN\")\n    CurrentUser(auth=auth).get_time_entries(\n        start_date=\"2024-01-01\",\n        end_date=\"2024-02-01T15:00:00-02:00\",\n    )\n```\n\n- `datetime`:\n\n```python\nfrom datetime import datetime, timezone\n\nfrom toggl_python.auth import TokenAuth\nfrom toggl_python.entities.user import CurrentUser\n\n\nif __name__ == \"__main__\":\n    auth = TokenAuth(token=\"TOGGL_TOKEN\")\n    CurrentUser(auth=auth).get_time_entries(\n        start_date=datetime(2024, 1, 1, tzinfo=timezone.utc),\n        end_date=datetime(2024, 2, 1, 15, tzinfo=timezone.utc),\n    )\n```\n\nQuery params are available as well:\n\n```python\nfrom toggl_python.auth import TokenAuth\nfrom toggl_python.entities.workspace import Workspace\n\n\nif __name__ == \"__main__\":\n    auth = TokenAuth(token=\"TOGGL_TOKEN\")\n    workspace_id = \"WORKSPACE_ID\"\n    Workspace(auth=auth).get_projects(active=True)\n```\n\nPre-validation to avoid extra network usage:\n\n```python\nfrom datetime import datetime, timezone\n\nfrom toggl_python.auth import TokenAuth\nfrom toggl_python.entities.workspace import Workspace\n\n\nif __name__ == \"__main__\":\n    auth = TokenAuth(token=\"TOGGL_TOKEN\")\n    workspace_id = \"WORKSPACE_ID\"\n    since = datetime(2024, 1, 20, tzinfo=timezone.utc)\n    # Assume that datetime.now is 2024-05-01\n    Workspace(auth=auth).list(since=since)\n\n    # ValidationError: Since cannot be older than 3 months\n```\n\n## Development\n\n`poetry` is required during local setup.\n\n* Install minimal supported `Python` version using `pyenv` - `pyenv install 3.8`\n* Activate it for current project - `pyenv local 3.8`\n* Create virtual environment - `python -m venv .venv`. If `Python version is not minimal` then\nIDE suggestions will be incorrect and `pre-commit` hooks will not be working.\n\nRun `poetry install --no-root` to setup local environment. `pre-commit install` is also advisable.\n\n\n### Unit Testing\n\nIn order to run tests using different Python versions, please follow these steps:\n* Install `pyenv`\n* Install all supported Python versions - `pyenv install 3.8.* 3.9.* ...`\n* Run `pyenv local 3.8.* 3.9.* ...`\n* Run `poetry run nox`\n\nTo run classic unit tests, execute `pytest -m \"not integration\"`\n\n### Integration Testing\n\nPre-defined `Workspace` and `Project` are required to have in `Toggl` system.\n\nCommand `TOGGL_TOKEN=... WORKSPACE_ID=... PROJECT_ID=... USER_ID=... TOGGL_PASSWORD=... pytest -m integration`\n\n## Credits\n\nThis package follows [evrone-python-guidelines](https://github.com/evrone/evrone-python-guidelines) and uses configs from [evrone-django-template](https://github.com/evrone/evrone-django-template).\n\n[\u003cimg src=\"https://evrone.com/logo/evrone-sponsored-logo.png\" width=231\u003e](https://evrone.com/?utm_source=github.com)\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fevrone%2Ftoggl-python","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fevrone%2Ftoggl-python","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fevrone%2Ftoggl-python/lists"}