A Python wrapper for the EVNEX Cloud API
Project description
python-evnex
Python client for the Evnex API.
Author not affiliated with Evnex.
Features
- Talks to your Evnex charger via Cloud API
- Automatic retries with exponential backoff
- Automatic re-authentication
- Optionally pass in a
httpxclient - Optionally pass in tokens to resume an existing session
Installation
pip install evnex
Requirements: Python 3.11+
Usage
import asyncio
from pydantic import SecretStr
from pydantic_settings import BaseSettings
from evnex.api import Evnex
class EvnexAuthDetails(BaseSettings):
EVNEX_CLIENT_USERNAME: str
EVNEX_CLIENT_PASSWORD: SecretStr
async def main():
creds = EvnexAuthDetails()
evnex = Evnex(username=creds.EVNEX_CLIENT_USERNAME,
password=creds.EVNEX_CLIENT_PASSWORD.get_secret_value())
user_data = await evnex.get_user_detail()
for org in user_data.organisations:
print("Getting 7 day insight for", org.name, "User:", user_data.name)
insights = await evnex.get_org_insight(days=7, org_id=org.id)
for segment in insights:
print(segment)
if __name__ == '__main__':
asyncio.run(main())
Examples
python-evnex is intended as a library, but a few example scripts are provided in the examples folder.
Providing authentication for the examples is via environment variables, e.g. on nix systems:
export EVNEX_CLIENT_USERNAME=you@example.com
export EVNEX_CLIENT_PASSWORD=<your password>
python -m examples.get_charge_point_detail
Developer Notes
Development Setup
# Install dependencies with development tools
uv sync --group dev
# Set up pre-commit hooks (recommended)
uv run pre-commit install
# Alternatively, format and lint manually
uv run ruff format .
uv run ruff check .
Making a new release
What ends up on PyPi is what really matters. Creating a release in GitHub triggers a release workflow that builds and publishes to PyPi.
To manually release, update the version in pyproject.toml, build and publish with uv:
uv build
uv publish
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
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file evnex-0.4.9.tar.gz.
File metadata
- Download URL: evnex-0.4.9.tar.gz
- Upload date:
- Size: 51.8 kB
- Tags: Source
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.7
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
63946548deaf849c6845c676f2850a0db4ca058200be4ac7b52e2ca31b67b397
|
|
| MD5 |
3780cee3624cdd52f151d3b803fe9226
|
|
| BLAKE2b-256 |
700ad33d4cf75ef9d2eb40687e67e6c3b56f5103b2e67b4c10fb55f1d08adc6e
|
Provenance
The following attestation bundles were made for evnex-0.4.9.tar.gz:
Publisher:
ci.yml on hardbyte/python-evnex
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
evnex-0.4.9.tar.gz -
Subject digest:
63946548deaf849c6845c676f2850a0db4ca058200be4ac7b52e2ca31b67b397 - Sigstore transparency entry: 561973445
- Sigstore integration time:
-
Permalink:
hardbyte/python-evnex@dd253915f26ea40804efec3c6f8ee7f5d209e7ae -
Branch / Tag:
refs/tags/v0.4.9 - Owner: https://github.com/hardbyte
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
ci.yml@dd253915f26ea40804efec3c6f8ee7f5d209e7ae -
Trigger Event:
release
-
Statement type:
File details
Details for the file evnex-0.4.9-py3-none-any.whl.
File metadata
- Download URL: evnex-0.4.9-py3-none-any.whl
- Upload date:
- Size: 18.0 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.7
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
1063fd4a4cfe9e1095b4db883da79bd9a926e055768c466bb386597a015aabec
|
|
| MD5 |
c63bdcb73f489aa0c17d64d3a1e112d1
|
|
| BLAKE2b-256 |
0f47c1c906a0e75a03a122affd8d275b0dd2e73db0ad0174af7b699199307575
|
Provenance
The following attestation bundles were made for evnex-0.4.9-py3-none-any.whl:
Publisher:
ci.yml on hardbyte/python-evnex
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
evnex-0.4.9-py3-none-any.whl -
Subject digest:
1063fd4a4cfe9e1095b4db883da79bd9a926e055768c466bb386597a015aabec - Sigstore transparency entry: 561973457
- Sigstore integration time:
-
Permalink:
hardbyte/python-evnex@dd253915f26ea40804efec3c6f8ee7f5d209e7ae -
Branch / Tag:
refs/tags/v0.4.9 - Owner: https://github.com/hardbyte
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
ci.yml@dd253915f26ea40804efec3c6f8ee7f5d209e7ae -
Trigger Event:
release
-
Statement type: