{"id":17908998,"url":"https://github.com/jpbede/aioelectricitymaps","last_synced_at":"2025-03-23T20:31:25.537Z","repository":{"id":197655807,"uuid":"698994950","full_name":"jpbede/aioelectricitymaps","owner":"jpbede","description":"Async Python 3 wrapper for Electricity Maps","archived":false,"fork":false,"pushed_at":"2024-05-29T04:19:09.000Z","size":667,"stargazers_count":6,"open_issues_count":2,"forks_count":1,"subscribers_count":3,"default_branch":"main","last_synced_at":"2024-05-29T13:27:33.741Z","etag":null,"topics":["asyncio","electricity-maps-api","python","python-client","python-library","python3"],"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/jpbede.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":".github/FUNDING.yml","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},"funding":{"github":"jpbede","custom":["https://www.buymeacoffee.com/janphilipp_bnck"]}},"created_at":"2023-10-01T16:02:37.000Z","updated_at":"2024-05-31T23:32:23.732Z","dependencies_parsed_at":"2023-10-28T10:27:10.663Z","dependency_job_id":"bccc3508-8cbc-41bb-8999-b2b6177e4d3a","html_url":"https://github.com/jpbede/aioelectricitymaps","commit_stats":null,"previous_names":["jpbede/aioelectricitymaps"],"tags_count":12,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jpbede%2Faioelectricitymaps","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jpbede%2Faioelectricitymaps/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jpbede%2Faioelectricitymaps/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jpbede%2Faioelectricitymaps/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/jpbede","download_url":"https://codeload.github.com/jpbede/aioelectricitymaps/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":221409222,"owners_count":16815136,"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":["asyncio","electricity-maps-api","python","python-client","python-library","python3"],"created_at":"2024-10-28T19:19:30.586Z","updated_at":"2025-03-23T20:31:25.493Z","avatar_url":"https://github.com/jpbede.png","language":"Python","readme":"# aioelectricitymaps\n\n[![GitHub Release][releases-shield]][releases]\n[![Python Versions][python-versions-shield]][pypi]\n![Project Stage][project-stage-shield]\n![Project Maintenance][maintenance-shield]\n[![License][license-shield]](LICENSE.md)\n\n[![Build Status][build-shield]][build]\n[![Code Coverage][codecov-shield]][codecov]\n\nAsynchronous Python client for Electricity Maps.\n\n## About\n\nThis package allows you to fetch data from electricitymaps.com.\n\n## Installation\n\n```bash\npip install aioelectricitymaps\n```\n\n## Usage\n\n```python\nimport asyncio\n\nfrom aioelectricitymaps import ElectricityMaps, ZoneRequest\n\n\nasync def main() -\u003e None:\n    \"\"\"Run the example.\"\"\"\n    async with ElectricityMaps(token=\"abc123\") as em:\n        response = await em.latest_carbon_intensity(ZoneRequest(\"DE\"))\n\n        print(f\"Carbon intensity in Germany: {response.carbon_intensity} gCO2eq/kWh\")\n\n\nif __name__ == \"__main__\":\n    asyncio.run(main())\n```\n\n## Changelog \u0026 Releases\n\nThis repository keeps a change log using [GitHub's releases][releases]\nfunctionality. The format of the log is based on\n[Keep a Changelog][keepchangelog].\n\nReleases are based on [Semantic Versioning][semver], and use the format\nof `MAJOR.MINOR.PATCH`. In a nutshell, the version will be incremented\nbased on the following:\n\n- `MAJOR`: Incompatible or major changes.\n- `MINOR`: Backwards-compatible new features and enhancements.\n- `PATCH`: Backwards-compatible bugfixes and package updates.\n\n## Contributing\n\nThis is an active open-source project. I am always open to people who want to\nuse the code or contribute to it.\n\nThank you for being involved! :heart_eyes:\n\n## Setting up development environment\n\nThis Python project is fully managed using the [Poetry][poetry] dependency manager. But also relies on the use of NodeJS for certain checks during development.\n\nYou need at least:\n\n- Python 3.11+\n- [Poetry][poetry-install]\n- NodeJS 20+ (including NPM)\n\nTo install all packages, including all development requirements:\n\n```bash\nnpm install\npoetry install\n```\n\nAs this repository uses the [pre-commit][pre-commit] framework, all changes\nare linted and tested with each commit. You can run all checks and tests\nmanually, using the following command:\n\n```bash\npoetry run pre-commit run --all-files\n```\n\nTo run just the Python tests:\n\n```bash\npoetry run pytest\n```\n\n## Authors \u0026 contributors\n\nThe content is by [Jan-Philipp Benecke][jpbede].\n\nFor a full list of all authors and contributors,\ncheck [the contributor's page][contributors].\n\n## License\n\nMIT License\n\nCopyright (c) 2023-2025 Jan-Philipp Benecke\n\nPermission is hereby granted, free of charge, to any person obtaining a copy\nof this software and associated documentation files (the \"Software\"), to deal\nin the Software without restriction, including without limitation the rights\nto use, copy, modify, merge, publish, distribute, sublicense, and/or sell\ncopies of the Software, and to permit persons to whom the Software is\nfurnished to do so, subject to the following conditions:\n\nThe above copyright notice and this permission notice shall be included in all\ncopies or substantial portions of the Software.\n\nTHE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\nIMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\nFITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\nAUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\nLIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\nOUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE\nSOFTWARE.\n\n[build-shield]: https://github.com/jpbede/aioelectricitymaps/actions/workflows/release.yml/badge.svg\n[build]: https://github.com/jpbede/aioelectricitymaps/actions\n[codecov-shield]: https://codecov.io/gh/jpbede/aioelectricitymaps/branch/main/graph/badge.svg\n[codecov]: https://codecov.io/gh/jpbede/aioelectricitymaps\n[commits-shield]: https://img.shields.io/github/commit-activity/y/jpbede/aioelectricitymaps.svg\n[commits]: https://github.com/jpbede/aioelectricitymaps/commits/main\n[contributors]: https://github.com/jpbede/aioelectricitymaps/graphs/contributors\n[jpbede]: https://github.com/jpbede\n[keepchangelog]: http://keepachangelog.com/en/1.0.0/\n[license-shield]: https://img.shields.io/github/license/jpbede/aioelectricitymaps.svg\n[maintenance-shield]: https://img.shields.io/maintenance/yes/2025.svg\n[poetry-install]: https://python-poetry.org/docs/#installation\n[poetry]: https://python-poetry.org\n[pre-commit]: https://pre-commit.com/\n[project-stage-shield]: https://img.shields.io/badge/project%20stage-stable-green.svg\n[python-versions-shield]: https://img.shields.io/pypi/pyversions/aioelectricitymaps\n[releases-shield]: https://img.shields.io/github/release/jpbede/aioelectricitymaps.svg\n[releases]: https://github.com/jpbede/aioelectricitymaps/releases\n[semver]: http://semver.org/spec/v2.0.0.html\n[pypi]: https://pypi.org/project/aioelectricitymaps/\n","funding_links":["https://github.com/sponsors/jpbede","https://www.buymeacoffee.com/janphilipp_bnck"],"categories":["Emissions"],"sub_categories":["Carbon Intensity and Accounting"],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fjpbede%2Faioelectricitymaps","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fjpbede%2Faioelectricitymaps","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fjpbede%2Faioelectricitymaps/lists"}