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 ocppVerified import paths — ran on the pinned version, not inferred.
Minimal example creating a charge point client and sending a BootNotification.
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.
Use websockets library to connect and pass the socket to ChargePoint constructor.
Use BootNotification instead of BootNotificationPayload (still works but will be removed).