An example of using service tokens with SDK. This is now part of the SDK documentation:
https://review.opendev.org/c/openstack/openstacksdk/+/893505
Update the test.conf
file with correct credentials for your cloud, then run:
python test.py --conf-file test.conf
Watch the debug logs and you will see authentication of the service user taking place.