Registry / http-networking / ocpp
library2.1.0pypypi✓ verified 82d ago

Python package implementing the JSON version of the Open Charge Point Protocol (OCPP). Supports OCPP 1.6, 2.0.1, and 2.1 via schema generation. Current version 2.1.0, requires Python >=3.11, release cadence is irregular with major version bumps.

pip install ocpp
INSTALL
IMPORT
SIG · OCPP
O
ocpp
http-networkingpythonv2.1.0
Install
2.6s avg
Import
Disk
22MB
Pass rate
10/ 10
Env Coverage10 / 10
glibc
3.93.13
musl
3.93.13
Install & Compatibility
Where this runs
tested against v2.0.0 · pip install
no network on importno background threads
Install × environment matrix
Each cell = how many times install + import succeeded across repeated harness runs. Partial = flaky.
glibc = Debian/Ubuntu slim · musl = Alpine Linux
musl
py 3.103.95 runs
installs and imports cleanly · install 0.0s · import 0.000s · 23MB
glibc
py 3.103.95 runs
installs and imports cleanly · install 2.6s · import 0.000s · 23MB
22MB installed
● package 22MB
Code
Verified usage

Verified import paths — ran on the pinned version, not inferred.

ChargePoint
import ocpp
from ocpp import ChargePoint

Minimal example creating a charge point client and sending a BootNotification.

import asyncio import logging from ocpp import ChargePoint from ocpp.v16 import call logging.basicConfig(level=logging.INFO) class ChargePointClient(ChargePoint): async def send_boot_notification(self): request = call.BootNotificationPayload( charge_point_vendor='vendor', charge_point_model='model' ) response = await self.call(request) logging.info(f"Boot response: {response}") async def main(): cp = ChargePointClient('id', None) await cp.send_boot_notification() asyncio.run(main())
Debug
Known issues
breakingIn v2.0.0, the library dropped support for Python <3.11 and renamed several internal classes.
fix
Upgrade to Python >=3.11 and adjust imports: Payload classes are now in ocpp.v16.call and ocpp.v16.call_result instead of ocpp.v16.datatypes.
affects: >=2.0.0,<2.1.0
gotchaWebSocket connection is not part of the library; you must provide your own transport (e.g., websockets).
fix
Use websockets library to connect and pass the socket to ChargePoint constructor.
affects: all
deprecatedThe 'Payload' suffix on call/call_result classes is deprecated in favor of un-suffixed names.
fix
Use BootNotification instead of BootNotificationPayload (still works but will be removed).
affects: >=1.0.0-rc.1
Upgrade
Version history
2.1.0latest on PyPI · released Jul 16, 2025
Audit
Dependencies
websocketsrequiredRequired for WebSocket transport
httpxoptionalRequired for HTTP client (used in some examples)
pydanticoptionalUsed for data validation in newer versions
Agent activity
6 hits · last 30 days
node
6
Resources
ocpp — pip install ocpp · libregistry