Skip to main content

evdc-network-api

License Ruff mypy Ko-fi

Unofficial Python client for the EVDC EV charging network API.

Purpose

EVDC keeps a log of the user's charging sessions — duration, energy delivered and cost — but offers no public API to retrieve it. This library gives an EVDC account holder programmatic access to their own charging data, so it can be imported into other tools.

A typical use is charging cost tracking: vehicle or home-automation software often knows when and how much a car charged, but not what each session cost at a public charger. With this library such software can match its charging sessions with the EVDC sessions and attach the price paid to each of them.

 EVDC cloud ──► evdc-network-api ──► your application
               (sessions, kWh, cost)

Scope

In scope:

  • authentication with the user's own EVDC credentials;
  • charging session history: start and end time, station, energy delivered, cost, currency;
  • the data needed to read the history (account, station and tariff details).

Out of scope, and not accepted as contributions:

  • starting, stopping or paying for charging sessions on behalf of third parties;
  • access to any data other than the authenticated user's own;
  • circumventing payment, tariffs, rate limits, or any technical protection measure;
  • redistribution of EVDC code, assets, keys or certificates;
  • bulk scraping of stations, prices or other network-wide data.

How the interface is documented

The API is documented by observing the traffic between the official EVDC app and its backend, while using the app with the author's own lawfully held account, and by studying the app only as far as needed to understand the data format exchanged with the server. Only the information strictly needed for interoperability is recorded in this repository, under docs/. See the legal notice for the European legal framework this relies on.

Status

🚧 Alpha. Login, token refresh, the account profile, the charging history and its sessions, the PDF receipt and the station details are verified against the real backend. Ongoing sessions and live socket progress are verified on a real charge too; the original payload is always kept in raw.

Email/password accounts are supported, including those with two-factor authentication (an e-mail code or an authenticator app): login() raises EvdcTwoFactorRequiredError and the login is completed with a verification code (see below). Accounts created with Google or Apple sign-in have no EVDC password and cannot log in through the API.

Installation

pip install evdc-network-api            # client
pip install "evdc-network-api[live]"    # plus live session progress (python-socketio)

From a clone, for development: pip install -e ".[dev]".

Usage

from evdc_network_api import EvdcApiClient

with EvdcApiClient(email="you@example.com", password="...") as client:
    for session in client.iter_charge_history():
        print(session.created_at, session.energy_kwh, "kWh", session.evse_id)
        print("  paid:", session.amount, session.currency)  # tokens, if the session was paid with EVDC Tokens
        print("  cost:", session.cost, session.cost_currency)  # always real money, even for a token-paid session

    for ongoing in client.get_ongoing_sessions():
        print("charging on", ongoing.evse_id, "since", ongoing.created_at)

    receipt = client.get_receipt(session_id)  # PDF bytes in receipt.content

    for wallet in client.get_wallets():
        print(wallet.currency, wallet.balance)  # e.g. EUR 41.97, and the EVDC Token wallet
    for txn in client.iter_wallet_transactions():
        print(txn.created_at, txn.amount, txn.currency, txn.session_id)  # session_id links a payment to a session

    for evse in client.get_favourite_stations():  # your saved stations, with live status and prices
        print(evse.operator_name, evse.status, evse.max_power_kw)
    for charger in client.get_frequent_chargers(limit=5):  # where you charge most
        print(charger.evse_id, charger.count, charger.last_used_at)
    print(client.count_unread_notifications(), "unread notifications")

Charging points around a position (for example the vehicle's), nearest first, with live status and prices:

for evse in client.find_stations_near(45.4642, 9.1900, radius_m=1000):
    p = evse.pricing
    print(
        f"{evse.distance_m:.0f} m",
        evse.operator_name,
        evse.status,
        evse.max_power_kw,
        "kW",
        p.price,
        p.currency,
        "/",
        p.unit,
        "(card:",
        p.card_price,
        ")",
    )

Each result is one connector (EVSE). All the connectors within the radius are returned; pass max_results to stop earlier. Search one position at a time with a local radius: sweeping an area is out of the project's scope.

If the account has two-factor authentication, complete the login with the code it asks for:

from evdc_network_api import EvdcApiClient, EvdcTwoFactorRequiredError

client = EvdcApiClient(email="you@example.com", password="...")
try:
    client.login()
except EvdcTwoFactorRequiredError as exc:
    code = input(f"Enter the {exc.method} verification code: ")  # e-mail code or authenticator code
    client.verify_two_factor(code)
# the client is authenticated from here on

exc.method is "email" (a code e-mailed on login) or "totp" (an authenticator app); verify_two_factor() handles both. For an authenticator account you can use a recovery code instead with verify_recovery_code(code). The verification endpoints and payloads are in docs/api.md.

The account's logged-in sessions (devices) can be listed and revoked. A session is created per device id, so pass a stable device_id (a 64-hex string kept across runs) to stay one device instead of registering a new one each login. The session shows up under device_model (default evdc-network-api); set device_model to tell clients apart:

for s in client.get_connected_sessions():
    print(s.device_model, s.city, s.country, "(this device)" if s.is_current else "")
client.revoke_session(session_id)  # log one device out
client.revoke_all_sessions()  # log the other devices out

The client logs in on the first call and refreshes the access token by itself. To avoid a new login at every start, persist the tokens and the device id:

client = EvdcApiClient(
    email="you@example.com",
    password="...",
    device_id=saved_device_id,  # stable 64-hex id
    access_token=saved_access_token,
    refresh_token=saved_refresh_token,
    on_tokens_updated=lambda access, refresh: save(access, refresh),
)

For long-running or headless use, a device key avoids re-doing two-factor every time the refresh token lapses. Enrol one once (from an authenticated session), persist the returned private key outside the repository next to the account id, and log in with it afterwards — no password, no 2FA:

# once, while logged in:
device_key = client.enroll_device_key()  # returns the private-key PEM; save it securely
save(device_key, client.user_id)

# later, in a fresh process:
client = EvdcApiClient(email="you@example.com", device_key=saved_device_key, user_id=saved_user_id)
client.get_profile()  # logs in via the device key automatically
client.remove_device_key()  # revoke it when no longer needed

The private key is a long-term login credential that bypasses two-factor: store it like a password and revoke it if it leaks.

An async wrapper is available as AsyncEvdcApiClient(client), and live progress of an ongoing session as evdc_network_api.live.EvdcLiveClient. See examples/, the library reference in docs/library.md and the backend notes in docs/api.md.

License

This project is licensed under the GNU Affero General Public License v3.0.

Metadata

Release files for evdc-network-api 0.1.0

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

Source distribution (sdist)

Source distribution for evdc-network-api 0.1.0
File Size Uploaded Provenance Actions
evdc_network_api-0.1.0.tar.gz 79.2 kB With provenance Details for evdc_network_api-0.1.0.tar.gz

Built distribution (wheel)

Table of built distributions (wheels) for evdc-network-api 0.1.0
File Interpreter ABI Platform Actions
evdc_network_api-0.1.0-py3-none-any.whl Python 3 none any Details for evdc_network_api-0.1.0-py3-none-any.whl

Total release size: 119.2 kB

Release files / evdc_network_api-0.1.0.tar.gz

Download URL evdc_network_api-0.1.0.tar.gz
Size 79.2 kB
Tags Source
SHA-256 checksum
How to use checksums
42392c1f686c5b054c0447e0354fc321bb63b2d00bdddc56d29d625955c2361c
BLAKE2b-256 checksum
How to use checksums
4aff0fd1f65be6f8730aaca4e1d4cb4b2eb00deffdbbef0376d6571ebd899a81
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.16

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.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Nov 26, 2026.

Transparency log

Release files / evdc_network_api-0.1.0-py3-none-any.whl

Download URL evdc_network_api-0.1.0-py3-none-any.whl
Size 40.0 kB
Tags Python 3
SHA-256 checksum
How to use checksums
f9368243dd9d6366e01cad2d8dd3e4618d38f45586b88f8654dc11ccec5ec60f
BLAKE2b-256 checksum
How to use checksums
14cf545f4030237e1a5bf0ffe2a87d366069fc38e769989eefb40a41af53d521
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.16

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.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Nov 26, 2026.

Transparency log

Security for evdc-network-api 0.1.0

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.

Full provenance

Both files in this release have been uploaded with provenance metadata.

Select from 2 files

Attestation for evdc_network_api-0.1.0.tar.gz

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Nov 26, 2026.

Transparency log

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.

Release history Release notifications | RSS feed

This release

0.1.0 This release

2 release files Full provenance

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