I’m working (the url is my test repository with open api) with python client api using:
#Tools for working with data in an instance of Omeka S
from omeka_s_tools.api import OmekaAPIClient
omeka1 = OmekaAPIClient('https://ygx.sop.mybluehost.me/omekas/api')
data = omeka1.get_resources('items')
data['total_results']
You might want to check in with @wragge, the author of the library you’re using.
My guess from a quick look is that you probably are best off setting the User-Agent header in the __init__ method: self.s there is a Session object that you can set a header on and have it used for all the requests.
Since posting that, I’ve had a better thought: you can just get at that Session object from the OmekaAPIClient that you create in your own script. You can, using your script for example, set a dict of your desired headers to omeka1.s.headers.