Simple API access from Python with Openhab3

I’m currently using python to update an item in a simple script like this:

r = requests.get(url, headers = {"accept" : "application/json"})
requests.post(url, headers = {"accept" : "application/json"}, data = str(value))

This does not work anymore, as Openhab 3 requires authentication for API access.
Does anyone know how to do this?

HABapp does that well using Python 3.

A few more suggestions can be found at Using the API Token with python - #16 by ysc

Thanks for your tipps, I have it working now.
Step 1: Create a token
This is done in the profile (click on the your login at the lower left corner of main ui)

Step 2:
Use the token like this:

r = requests.get(url, headers = {"Content-type": "text/plain", "accept" : "application/json", "Authorization": "Bearer %s" % token})