ocpp
Python package implementing the JSON version of the Open Charge Point Protocol (OCPP).
What it is and what it does
OCPP is a Python library that implements the Open Charge Point Protocol in JSON format, enabling communication between electric vehicle charging stations (charge points) and central management systems. It supports three protocol versions: OCPP 1.6 (errata v4), OCPP 2.0.1 (Edition 2 FINAL, 2022-12-15 and Edition 3 errata 2024-11), and OCPP 2.1.0, allowing developers to build either charge point clients or central system servers that speak the standard protocol.
The package depends only on jsonschema for message validation and is designed as a lightweight protocol layer. It has been actively maintained since 2019 and is classified as production-stable. The codebase is well-documented with examples and API references, and the project maintains a published security policy for responsible disclosure.
Use it for:
- Build a central management system that monitors and controls multiple EV charging stations across a network
- Implement a charge point simulator or mock station for testing central system logic without hardware
- Develop a charging station firmware component that communicates with a backend management platform
- Create integration middleware that translates between OCPP and proprietary charging network protocols
- Monitor and log charging events, diagnostics, and status updates from deployed charge points
Worth the install?
AI-flagged interpretation of the facts on this page — verify before relying
Implements the JSON version of the Open Charge Point Protocol (OCPP), supporting OCPP 1.6, 2.0.1, and 2.1.0 for communication between electric vehicle charging stations and central management systems.
Yes. OCPP is production-stable, actively maintained, has no known vulnerabilities, and carries a permissive MIT license. It is the standard library for OCPP protocol work in Python and has low install friction. Install it if you are building or integrating EV charging infrastructure that requires OCPP compliance.
Install
ocpp on PyPI
pip
pip install ocppuv
uv add ocpppoetry
poetry add ocppInstalling ocpp
Before you install
Low friction installation with a single runtime dependency (jsonschema). Actively maintained with recent commits and a stable production release status. Supports Python 3.8 through 3.13.
License in practice
MIT-licensed code with permissive terms. Documentation in docs/v16 and docs/v201 uses Creative Commons Attribution-NoDerivatives 4.0 International, which restricts derivative works but allows redistribution with attribution.
Quickstart
pip install ocpp
import ocpp
from ocpp.v16 import ChargePoint
# Instantiate and use a charge point for OCPP 1.6 communication
Requires Python 3.11 or later (3.11–3.13 supported); websockets library recommended for actual protocol communication over WebSocket connections.
Verify before relying
- Whether websockets is an optional or required dependency for typical use cases
- Specific OCPP message types and command support across 1.6, 2.0.1, and 2.1.0 versions
- Performance characteristics under high message volume or concurrent connections
Package facts
| License | MIT (permissive) |
| Python support | supports the current Python release (<4.0,>=3.11) |
| Install friction | low — pure-Python wheel |
| Runtime dependencies | 1 — jsonschema |
| Maintenance | actively maintained — 394 days since the last release |
| Last repo commit | |
| First released | |
| Downloads | 152,822/month — #10,892 on PyPI (30-day window, as of 2026-08-14) |
| Known vulnerabilities | none known (OSV.dev, checked 2026-08-14) |
Evidence: ocpp-2.1.0-py3-none-any.whl
Tags
More Internet packages
Botocore provides low-level, data-driven access…
permissive · top 100 on PyPI
aiobotocoreProvides an async client for AWS services using…
permissive · top 100 on PyPI
pydanticPydantic validates Python data structures…
permissive · top 100 on PyPI
filelockProvides a platform-independent file locking…
permissive · top 100 on PyPI
fastapiFastAPI is a Python web framework for building…
permissive · top 100 on PyPI
googleapis-common-protosProvides common Protocol Buffer message…
permissive · top 100 on PyPI
python-openevse-httpA Python library for asynchronous communication…
permissive · top 15,000 on PyPI
pytrydanpytrydan provides Python bindings and a…
permissive · top 15,000 on PyPI
pytrafikverketAsync Python client for querying Sweden's…
permissive · top 15,000 on PyPI
traia-iatpAdds HTTP 402 Payment Required protocol support…
unclear · top 15,000 on PyPI
kuksa-clientKUKSA Python SDK provides a client library and…
permissive · top 15,000 on PyPI
electrickiwi-apiAsync Python client for the Electric Kiwi API…
copyleft · top 15,000 on PyPI
udsoncanImplements the Unified Diagnostic Services…
permissive · top 15,000 on PyPI
opowerFetches historical and forecasted energy usage…
permissive · top 15,000 on PyPI
subarulinkInteract with Subaru's MySubaru Connected…
permissive · top 15,000 on PyPI
tesla-fleet-apiProvides Python bindings to Tesla's Fleet API…
permissive · top 15,000 on PyPI