{"id":21634,"library":"ocpp","title":"OCPP - Open Charge Point Protocol","description":"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.","status":"active","version":"2.1.0","language":"python","source_language":"en","source_url":"https://github.com/mobilityhouse/ocpp","tags":["OCPP","EV charging","WebSocket","protocol"],"install":[{"cmd":"pip install ocpp","lang":"bash","label":"Install from PyPI"}],"dependencies":[{"reason":"Required for WebSocket transport","package":"websockets","optional":false},{"reason":"Required for HTTP client (used in some examples)","package":"httpx","optional":true},{"reason":"Used for data validation in newer versions","package":"pydantic","optional":true}],"imports":[{"wrong":"from ocpp import ChargePoint","symbol":"ChargePoint","correct":"import ocpp"}],"quickstart":{"code":"import asyncio\nimport logging\nfrom ocpp import ChargePoint\nfrom ocpp.v16 import call\n\nlogging.basicConfig(level=logging.INFO)\n\nclass ChargePointClient(ChargePoint):\n    async def send_boot_notification(self):\n        request = call.BootNotificationPayload(\n            charge_point_vendor='vendor',\n            charge_point_model='model'\n        )\n        response = await self.call(request)\n        logging.info(f\"Boot response: {response}\")\n\nasync def main():\n    cp = ChargePointClient('id', None)\n    await cp.send_boot_notification()\n\nasyncio.run(main())","lang":"python","description":"Minimal example creating a charge point client and sending a BootNotification."},"warnings":[{"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.","message":"In v2.0.0, the library dropped support for Python <3.11 and renamed several internal classes.","severity":"breaking","affected_versions":">=2.0.0,<2.1.0"},{"fix":"Use websockets library to connect and pass the socket to ChargePoint constructor.","message":"WebSocket connection is not part of the library; you must provide your own transport (e.g., websockets).","severity":"gotcha","affected_versions":"all"},{"fix":"Use BootNotification instead of BootNotificationPayload (still works but will be removed).","message":"The 'Payload' suffix on call/call_result classes is deprecated in favor of un-suffixed names.","severity":"deprecated","affected_versions":">=1.0.0-rc.1"}],"env_vars":null,"search_vec":"'1.6':21 '2.0.1':22 '2.1':24 '2.1.0':30 '3.11':33 'bump':41 'cadenc':35 'charg':3,15,44 'current':28 'ev':43 'generat':27 'implement':8 'irregular':37 'json':10 'major':39 'ocpp':1,18,20,42 'open':2,14 'packag':7 'point':4,16 'protocol':5,17,46 'python':6,32 'releas':34 'requir':31 'schema':26 'support':19 'version':11,29,40 'via':25 'websocket':45","created_at":"2026-04-27T17:00:56.416819+00:00","updated_at":"2026-04-27T17:00:56.416819+00:00","problems":null,"ecosystem":"pypi","meta_description":null,"install_score":null,"quickstart_score":null,"quickstart_tag":null,"pypi_latest":"2.1.0","cli_name":"","cli_version":null,"type":"library","homepage":"https://www.openchargealliance.org/protocols/ocpp/","github":"https://github.com/mobilityhouse/ocpp","docs":"https://ocpp.readthedocs.io/en/latest/","changelog":null,"pypi":"https://pypi.org/project/ocpp/","npm":null,"openapi_spec":null,"status_page":null,"smithery":null,"categories":["http-networking","serialization"],"base_url":null,"auth_type":null,"provenance":{"verified_status":"passing","verified_at":"2026-06-30","last_verified":"2026-06-30","next_check":"2026-07-30","install_tag":null}}