Auto-generated type definitions for the OCPI (Open Charge Point Interface) protocol.
Project description
ocpi-types (Python)
Auto-generated Python type definitions for the OCPI (Open Charge Point Interface) protocol, using dataclasses and type hints.
📖 Documentation: https://evorada.github.io/ocpi-types/python/
Installation
pip install ocpi-types
Usage
Each OCPI version is its own module inside the ocpi_types package. Every class
provides from_dict / to_dict helpers.
import json
from ocpi_types import v2_3_0
raw = """
{
"country_code": "NL",
"party_id": "TNM",
"id": "101",
"start_date_time": "2024-01-01T12:00:00Z",
"kwh": 0,
"cdr_token": {"country_code": "NL", "party_id": "TNM", "uid": "ABC", "type": "RFID", "contract_id": "NL-TNM-C12345678-X"},
"auth_method": "WHITELIST",
"location_id": "LOC1",
"evse_uid": "3256",
"connector_id": "1",
"currency": "EUR",
"status": "ACTIVE",
"last_updated": "2024-01-01T12:00:00Z"
}
"""
session = v2_3_0.Session.from_dict(json.loads(raw))
print(session.id, session.status)
# serialize back to a JSON-ready dict
data = session.to_dict()
Available versions
| Module | OCPI version |
|---|---|
ocpi_types.v2_1_1 |
2.1.1 |
ocpi_types.v2_2_1 |
2.2.1 |
ocpi_types.v2_3_0 |
2.3.0 |
ocpi_types.v2_3_0_payments |
2.3.0 + Payments |
ocpi_types.v2_3_0_bookings |
2.3.0 + Bookings |
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 ocpi_types-0.3.0.tar.gz.
File metadata
- Download URL: ocpi_types-0.3.0.tar.gz
- Upload date:
- Size: 88.9 kB
- Tags: Source
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.12
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
98f71d2dc2ee05e95912f2e2c265a441ad9b22949cc1268da1491ed47a07bbca
|
|
| MD5 |
cbc62f5eb19ba9e44edcdf3148367f16
|
|
| BLAKE2b-256 |
81dffe39142af331ca4b8d5cbb532b261f28ad441c4dc9665e36c58920451044
|
Provenance
The following attestation bundles were made for ocpi_types-0.3.0.tar.gz:
Publisher:
publish.yml on evorada/ocpi-types
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
ocpi_types-0.3.0.tar.gz -
Subject digest:
98f71d2dc2ee05e95912f2e2c265a441ad9b22949cc1268da1491ed47a07bbca - Sigstore transparency entry: 1777591743
- Sigstore integration time:
-
Permalink:
evorada/ocpi-types@b7abbad3ce3b127d239376ddb74bac187f33814d -
Branch / Tag:
refs/tags/v0.3.0 - Owner: https://github.com/evorada
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
publish.yml@b7abbad3ce3b127d239376ddb74bac187f33814d -
Trigger Event:
push
-
Statement type:
File details
Details for the file ocpi_types-0.3.0-py3-none-any.whl.
File metadata
- Download URL: ocpi_types-0.3.0-py3-none-any.whl
- Upload date:
- Size: 90.6 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.12
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
2d64c68b0ae966d84c5267edd5f5e5dd81af235ec6a82d0307ef1e9c93ff3f57
|
|
| MD5 |
b76a8d7d20adafa757599cb6519c0891
|
|
| BLAKE2b-256 |
1e7c24edf1989ef3e335423b90d921d5e2cd9ece6c0b7070ad80eba20ca895d7
|
Provenance
The following attestation bundles were made for ocpi_types-0.3.0-py3-none-any.whl:
Publisher:
publish.yml on evorada/ocpi-types
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
ocpi_types-0.3.0-py3-none-any.whl -
Subject digest:
2d64c68b0ae966d84c5267edd5f5e5dd81af235ec6a82d0307ef1e9c93ff3f57 - Sigstore transparency entry: 1777591815
- Sigstore integration time:
-
Permalink:
evorada/ocpi-types@b7abbad3ce3b127d239376ddb74bac187f33814d -
Branch / Tag:
refs/tags/v0.3.0 - Owner: https://github.com/evorada
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
publish.yml@b7abbad3ce3b127d239376ddb74bac187f33814d -
Trigger Event:
push
-
Statement type: