Skip to main content

GitHub Release GitHub Activity License Project Maintenance

Donate via PayPal Sponsor on GitHub

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

Configuration

Find the EV charger(s) you want to monitor here: https://ui-map.shellrecharge.com look for the Serial number under details section. Then use Add device within Home Assistant and enter the Serial number in the form.

Example:

image

Development

To create a development environment to commit code.

python3 -m venv .venv
source .venv/bin/activate
pip3 install pdm ruff mypy

sudo apt install pre-commit
pip3 install pre-commit

Run checks before PR/Commit:

make all

Example

Below provides example on how to use the library.

#!/usr/bin/env python3
"""Example code."""
import asyncio
import logging
import sys
from asyncio import CancelledError

import aiohttp
from aiohttp.client_exceptions import ClientError

import shellrecharge
from shellrecharge import LocationEmptyError, LocationValidationError, RateLimitHitError


async def main():
    """Main module."""

    # Some random stations
    location_ids = ["9b9428ab-1dfd-4230-a024-084eacf776ff", "682154", "9cf6c16b-b043-4ba8-b7ca-872f82a0faf4"]

    async with aiohttp.ClientSession() as session:
        try:
            api = shellrecharge.Api(session)
            for location_id in location_ids:
                location = await api.location_by_id(location_id)
                logging.info(location)
        except LocationEmptyError:
            logging.error("No data returned, check location id")
        except LocationValidationError as err:
            logging.error("Location validation error {}, report locaton id" % err)
        except (ClientError, TimeoutError, CancelledError) as err:
            logging.error(err)
        except RateLimitHitError as err:
            logging.error(err)


if __name__ == "__main__":
    logging.basicConfig(stream=sys.stdout, level=logging.DEBUG)
    loop = asyncio.new_event_loop()
    loop.run_until_complete(main())

💖 Support This Project

If you find this library useful for your projects, please consider supporting its continued development and maintenance:

🌟 Ways to Support

  • ⭐ Star this repository - Help others discover the project
  • 💰 Financial Support - Contribute to development and hosting costs
  • 🐛 Report Issues - Help improve stability and compatibility
  • 📖 Spread the Word - Share with other developers

💳 Financial Support Options

Donate via PayPal Sponsor on GitHub

Why Support?

  • Keeps the project actively maintained
  • Enables faster bug fixes and new features
  • Supports infrastructure costs (testing, AI, CI/CD)
  • Shows appreciation for hundreds of hours of development

Every contribution, no matter the size, makes a difference and is greatly appreciated! 🙏

Metadata

Release files for shellrecharge 0.1.26

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for shellrecharge 0.1.26
File Size Uploaded Provenance Actions
shellrecharge-0.1.26.tar.gz 9.9 kB Without provenance Details for shellrecharge-0.1.26.tar.gz

Built distribution (wheel)

Table of built distributions (wheels) for shellrecharge 0.1.26
File Interpreter ABI Platform Actions
shellrecharge-0.1.26-py3-none-any.whl Python 3 none any Details for shellrecharge-0.1.26-py3-none-any.whl

Total release size: 20.3 kB

Release files / shellrecharge-0.1.26.tar.gz

Download URL shellrecharge-0.1.26.tar.gz
Size 9.9 kB
Tags Source
SHA-256 checksum
How to use checksums
16e8cce478ca890a0aed38379326ada26c7d492e2c664f5ad167e2a7f36f76b8
BLAKE2b-256 checksum
How to use checksums
e923f832eeacb678715a6efad95788b65ddcb1a27c4d546a7bc5c187e63f5a5a
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.2.0 CPython/3.13.5

Release files / shellrecharge-0.1.26-py3-none-any.whl

Download URL shellrecharge-0.1.26-py3-none-any.whl
Size 10.4 kB
Tags Python 3
SHA-256 checksum
How to use checksums
8f660d993e6e05ca1956ff1722598e6521105d786bda4a6b008233864f951ff0
BLAKE2b-256 checksum
How to use checksums
26780a7d8d7a93bbd72608283f33c05bd476b232598493f39e64f676f30575e4
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.2.0 CPython/3.13.5

Security for shellrecharge 0.1.26

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

No provenance found

None of the files in this release were uploaded with provenance metadata.

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

To learn more about protecting yourself from malicious actors, visit our package security documentation.

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page