Python 3 package to retrieve public EV charger data from Shell Recharge
Project description
Python: Shell Recharge
Python 3 package to retrieve public EV charger data from Shell Recharge
About
This package allows you to request data from public EV chargers using Shell Recharge. I build it to create a home-assistant integration, it can be done with rest calls only, but then options are limited.
Installation
pip3 install shellrecharge
Development
To create a development environment to commit code.
pip3 install pdm
pip3 install ruff
pdm init
sudo apt install pre-commit
pip3 install pre-commit
Run checks before PR/Commit:
make format
make lint
make codespell
Example
Below provides example on how to use the library.
#!/usr/bin/env python3
"""Example code."""
import asyncio
import logging
import sys
import aiohttp
import shellrecharge
async def main():
"""Main module."""
location_ids = ["9b9428ab-1dfd-4230-a024-084eacf776ff"]
async with aiohttp.ClientSession() as session:
api = shellrecharge.Api(session)
for location_id in location_ids:
locations = await api.location_by_id(location_id)
print(locations)
if __name__ == "__main__":
logging.basicConfig(stream=sys.stdout, level=logging.DEBUG)
loop = asyncio.new_event_loop()
loop.run_until_complete(main())
Donations
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
shellrecharge-0.1.11.tar.gz
(4.2 kB
view hashes)
Built Distribution
Close
Hashes for shellrecharge-0.1.11-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | c161fd7b64a6200b28f908ced669bd4bddc7b80a78df71ba2efa3fd2551b2637 |
|
MD5 | e7b6395ebf79224b4fb89f9d4bb8bba9 |
|
BLAKE2b-256 | 87959f0a9aca9becdb09ea315cd65784cf63a90a14bad3123be3a73a3ef4c035 |