{"id":36941538,"url":"https://github.com/energy-tracker/api-client-python","last_synced_at":"2026-02-14T22:05:37.023Z","repository":{"id":326786547,"uuid":"1106310245","full_name":"energy-tracker/api-client-python","owner":"energy-tracker","description":"Async Python client for Energy Tracker API","archived":false,"fork":false,"pushed_at":"2025-11-30T01:47:09.000Z","size":19,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":0,"default_branch":"main","last_synced_at":"2025-12-02T06:36:33.733Z","etag":null,"topics":["aiohttp","api-client","asyncio","energy-tracker","home-assistant","iot","python","python3","smart-home"],"latest_commit_sha":null,"homepage":"https://www.energy-tracker.best-ios-apps.de","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/energy-tracker.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,"notice":null,"maintainers":null,"copyright":null,"agents":null,"dco":null,"cla":null}},"created_at":"2025-11-29T02:03:05.000Z","updated_at":"2025-11-30T15:41:48.000Z","dependencies_parsed_at":null,"dependency_job_id":null,"html_url":"https://github.com/energy-tracker/api-client-python","commit_stats":null,"previous_names":["energy-tracker/api-client-python"],"tags_count":2,"template":false,"template_full_name":null,"purl":"pkg:github/energy-tracker/api-client-python","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/energy-tracker%2Fapi-client-python","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/energy-tracker%2Fapi-client-python/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/energy-tracker%2Fapi-client-python/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/energy-tracker%2Fapi-client-python/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/energy-tracker","download_url":"https://codeload.github.com/energy-tracker/api-client-python/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/energy-tracker%2Fapi-client-python/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":28383211,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-01-13T10:34:27.190Z","status":"ssl_error","status_checked_at":"2026-01-13T10:34:26.289Z","response_time":56,"last_error":"SSL_connect returned=1 errno=0 peeraddr=140.82.121.5: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":["aiohttp","api-client","asyncio","energy-tracker","home-assistant","iot","python","python3","smart-home"],"created_at":"2026-01-13T10:51:52.183Z","updated_at":"2026-02-14T22:05:37.016Z","avatar_url":"https://github.com/energy-tracker.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Energy Tracker API Client\n\nAsync Python client for the [Energy Tracker](https://github.com/energy-tracker) public REST API.\n\n## Installation\n\n```bash\npip install energy-tracker-api\n```\n\n## Requirements\n\n- Python 3.14+\n- Personal Access Token from Energy Tracker\n\n## Quick Start\n\n```python\nimport asyncio\nfrom decimal import Decimal\nfrom energy_tracker_api import EnergyTrackerClient, CreateMeterReadingDto\n\nasync def main():\n    async with EnergyTrackerClient(access_token=\"your-token\") as client:\n        # List devices\n        devices = await client.devices.list_standard()\n\n        # Create a meter reading\n        reading = CreateMeterReadingDto(value=Decimal(\"12345.67\"))\n        await client.meter_readings.create(\n            device_id=\"your-device-id\",\n            meter_reading=reading,\n        )\n\nasyncio.run(main())\n```\n\n## Resources\n\nThe client exposes three resource groups — all endpoints, parameters, and DTOs are documented in the [OpenAPI specification](https://github.com/energy-tracker/public-docs/blob/main/public-api/openapi.yml).\n\n| Resource | Methods |\n|---|---|\n| `client.devices` | `list_standard()`, `list_virtual()` |\n| `client.meter_readings` | `list()`, `create()`, `delete()`, `export()` |\n| `client.environments` | `list()`, `get()`, `create()`, `delete()`, `create_entry()`, `delete_entry()` |\n\n## Configuration\n\n```python\nclient = EnergyTrackerClient(\n    access_token=\"your-token\",\n    base_url=\"https://custom-api.example.com\",  # Optional\n    timeout=30,                                 # Optional, default: 10s\n)\n```\n\n## Error Handling\n\nAll API errors inherit from `EnergyTrackerAPIError` and carry an `api_message` list with details from the server.\n\n```python\nfrom energy_tracker_api import (\n    EnergyTrackerAPIError,\n    ValidationError,\n    AuthenticationError,\n    ForbiddenError,\n    ResourceNotFoundError,\n    ConflictError,\n    RateLimitError,\n)\n\ntry:\n    await client.meter_readings.create(device_id, reading)\nexcept RateLimitError as e:\n    print(f\"Retry after {e.retry_after}s\")\nexcept EnergyTrackerAPIError as e:\n    print(e.api_message)\n```\n\n## Development\n\n```bash\nmake install-dev  # Install dependencies\nmake test         # Run tests\nmake type-check   # mypy\nmake format       # black + isort\nmake lint         # Linters\n```\n\n## License\n\nMIT\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fenergy-tracker%2Fapi-client-python","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fenergy-tracker%2Fapi-client-python","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fenergy-tracker%2Fapi-client-python/lists"}