It’s not clear what you are after. You want to subscribe to events on Items on some external program? If so you need to subscribe to the SSE feed openHAB provides. You can find an example of that for Python discussed at Python Example of Subscribing to openHAB's SSE Feed
Note that SSE is one-way, meaning you can only subscribe not publish. If you also want to send events to OH Items you need to use the OH REST API which is thoroughly documented in the REST API Docs addon you can find to install in the UIs tab in PaperUI.