aioelectricitymaps
Asynchronous Python client for Electricity Maps.
https://github.com/jpbede/aioelectricitymaps
Category: Emissions
Sub Category: Carbon Intensity and Accounting
Keywords
asyncio electricity-maps-api python python-client python-library python3
Keywords from Contributors
profile power sensors public-transportation animations stress-test atoms geocoder domain-modeling contributing
Last synced: about 6 hours ago
JSON representation
Repository metadata
Async Python 3 wrapper for Electricity Maps
- Host: GitHub
- URL: https://github.com/jpbede/aioelectricitymaps
- Owner: jpbede
- License: mit
- Created: 2023-10-01T16:02:37.000Z (over 1 year ago)
- Default Branch: main
- Last Pushed: 2025-04-24T22:25:41.000Z (3 days ago)
- Last Synced: 2025-04-24T23:29:04.068Z (3 days ago)
- Topics: asyncio, electricity-maps-api, python, python-client, python-library, python3
- Language: Python
- Homepage:
- Size: 1.5 MB
- Stars: 10
- Watchers: 1
- Forks: 2
- Open Issues: 3
- Releases: 13
-
Metadata Files:
- Readme: README.md
- Funding: .github/FUNDING.yml
- License: LICENSE
README.md
aioelectricitymaps
Asynchronous Python client for Electricity Maps.
About
This package allows you to fetch data from electricitymaps.com.
Installation
pip install aioelectricitymaps
Usage
import asyncio
from aioelectricitymaps import ElectricityMaps, ZoneRequest
async def main() -> None:
"""Run the example."""
async with ElectricityMaps(token="abc123") as em:
response = await em.latest_carbon_intensity(ZoneRequest("DE"))
print(f"Carbon intensity in Germany: {response.carbon_intensity} gCO2eq/kWh")
if __name__ == "__main__":
asyncio.run(main())
Changelog & Releases
This repository keeps a change log using GitHub's releases
functionality. The format of the log is based on
Keep a Changelog.
Releases are based on Semantic Versioning, and use the format
of MAJOR.MINOR.PATCH
. In a nutshell, the version will be incremented
based on the following:
MAJOR
: Incompatible or major changes.MINOR
: Backwards-compatible new features and enhancements.PATCH
: Backwards-compatible bugfixes and package updates.
Contributing
This is an active open-source project. I am always open to people who want to
use the code or contribute to it.
Thank you for being involved! 😍
Setting up development environment
This Python project is fully managed using the Poetry dependency manager. But also relies on the use of NodeJS for certain checks during development.
You need at least:
- Python 3.11+
- Poetry
- NodeJS 20+ (including NPM)
To install all packages, including all development requirements:
npm install
poetry install
As this repository uses the pre-commit framework, all changes
are linted and tested with each commit. You can run all checks and tests
manually, using the following command:
poetry run pre-commit run --all-files
To run just the Python tests:
poetry run pytest
Authors & contributors
The content is by Jan-Philipp Benecke.
For a full list of all authors and contributors,
check the contributor's page.
License
MIT License
Copyright (c) 2023-2025 Jan-Philipp Benecke
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:
The above copyright notice and this permission notice shall be included in all
copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
SOFTWARE.
Owner metadata
- Name: Jan-Philipp Benecke
- Login: jpbede
- Email:
- Kind: user
- Description: Email Deliverability & Software Engineer @cleverreach by day ☀️ // Core developer @home-assistant by night 🌑
- Website: https://bnck.me
- Location: Near Leer, Germany
- Twitter: janphilipp_bnck
- Company: @cleverreach
- Icon url: https://avatars.githubusercontent.com/u/3989428?v=4
- Repositories: 106
- Last ynced at: 2025-04-24T17:50:02.942Z
- Profile URL: https://github.com/jpbede
GitHub Events
Total
- Release event: 1
- Watch event: 3
- Delete event: 187
- Issue comment event: 124
- Push event: 447
- Pull request review event: 1
- Pull request event: 373
- Fork event: 1
- Create event: 180
Last Year
- Release event: 1
- Watch event: 3
- Delete event: 187
- Issue comment event: 124
- Push event: 447
- Pull request review event: 1
- Pull request event: 373
- Fork event: 1
- Create event: 180
Committers metadata
Last synced: 7 days ago
Total Commits: 559
Total Committers: 5
Avg Commits per committer: 111.8
Development Distribution Score (DDS): 0.106
Commits in past year: 360
Committers in past year: 3
Avg Commits per committer in past year: 120.0
Development Distribution Score (DDS) in past year: 0.017
Name | Commits | |
---|---|---|
renovate[bot] | 2****] | 500 |
Jan-Philipp Benecke | j****p@b****e | 56 |
Viktor Andersson | 3****9 | 1 |
Martin Weinelt | m****t | 1 |
Marc Mueller | 3****p | 1 |
Committer domains:
- bnck.me: 1
Issue and Pull Request metadata
Last synced: 1 day ago
Total issues: 3
Total pull requests: 462
Average time to close issues: N/A
Average time to close pull requests: 1 day
Total issue authors: 1
Total pull request authors: 4
Average comments per issue: 0.0
Average comments per pull request: 0.76
Merged pull request: 446
Bot issues: 3
Bot pull requests: 420
Past year issues: 0
Past year pull requests: 239
Past year average time to close issues: N/A
Past year average time to close pull requests: 1 day
Past year issue authors: 0
Past year pull request authors: 3
Past year average comments per issue: 0
Past year average comments per pull request: 0.59
Past year merged pull request: 234
Past year bot issues: 0
Past year bot pull requests: 234
Top Issue Authors
- renovate[bot] (3)
Top Pull Request Authors
- renovate[bot] (420)
- jpbede (39)
- cdce8p (2)
- mweinelt (1)
Top Issue Labels
Top Pull Request Labels
- dependencies (421)
- no-stale (291)
- python (194)
- github_actions (80)
- javascript (48)
- maintenance (15)
- enhancement (12)
- minor (9)
- ci (6)
- documentation (3)
- refactor (3)
- new-feature (1)
Package metadata
- Total packages: 2
-
Total downloads:
- pypi: 3,977 last-month
- Total docker downloads: 14
- Total dependent packages: 0 (may contain duplicates)
- Total dependent repositories: 0 (may contain duplicates)
- Total versions: 14
- Total maintainers: 1
pypi.org: aioelectricitymaps
Async Python 3 wrapper for Electricity maps
- Homepage:
- Documentation: https://aioelectricitymaps.readthedocs.io/
- Licenses: MIT
- Latest release: 1.1.0 (published 3 months ago)
- Last Synced: 2025-04-27T03:01:51.168Z (1 day ago)
- Versions: 13
- Dependent Packages: 0
- Dependent Repositories: 0
- Downloads: 3,977 Last month
- Docker Downloads: 14
-
Rankings:
- Dependent packages count: 7.328%
- Forks count: 29.966%
- Average: 36.201%
- Stargazers count: 38.925%
- Dependent repos count: 68.583%
- Maintainers (1)
pypi.org: aielectricitymaps
Async Python 3 wrapper for Electricity maps
- Homepage: https://github.com/jpbede/aioelectricitymaps
- Documentation: https://aielectricitymaps.readthedocs.io/
- Licenses: MIT
- Latest release: 0.1.0 (published over 1 year ago)
- Last Synced: 2024-12-07T15:27:49.545Z (5 months ago)
- Versions: 1
- Dependent Packages: 0
- Dependent Repositories: 0
-
Rankings:
- Dependent packages count: 7.328%
- Forks count: 29.966%
- Average: 36.21%
- Stargazers count: 38.929%
- Dependent repos count: 68.615%
- Maintainers (1)
Dependencies
- actions/checkout v4 composite
- actions/setup-python v4 composite
- chartboost/ruff-action v1 composite
- codecov/codecov-action v3 composite
- actions/checkout v4 composite
- github/codeql-action/analyze v2 composite
- github/codeql-action/autobuild v2 composite
- github/codeql-action/init v2 composite
- abatilo/actions-poetry v2 composite
- actions/checkout v4 composite
- actions/setup-python v4 composite
- aiohttp 3.8.6
- aiosignal 1.3.1
- aresponses 2.1.6
- async-timeout 4.0.3
- attrs 23.1.0
- black 23.9.1
- cfgv 3.4.0
- charset-normalizer 3.3.0
- click 8.1.7
- colorama 0.4.6
- coverage 7.3.2
- dataclasses-json 0.6.1
- distlib 0.3.7
- exceptiongroup 1.1.3
- filelock 3.12.4
- frozenlist 1.4.0
- identify 2.5.30
- idna 3.4
- iniconfig 2.0.0
- marshmallow 3.20.1
- multidict 6.0.4
- mypy 1.6.0
- mypy-extensions 1.0.0
- nodeenv 1.8.0
- packaging 23.2
- pathspec 0.11.2
- platformdirs 3.11.0
- pluggy 1.3.0
- pre-commit 3.4.0
- pytest 7.4.2
- pytest-asyncio 0.21.1
- pytest-cov 4.1.0
- pyyaml 6.0.1
- ruff 0.0.292
- setuptools 68.2.2
- syrupy 4.5.0
- tomli 2.0.1
- typing-extensions 4.8.0
- typing-inspect 0.9.0
- virtualenv 20.24.5
- yarl 1.9.2
- aiohttp ^3.8.5
- dataclasses-json ^0.6.1
- python ^3.10
Score: 12.466685376958859