import keymateapi s = keymateapi.Keymateapi( bearer_auth="<YOUR_BEARER_TOKEN_HERE>", ) res = s.upsert(q='<value>') if res.object is not None: # handle response pass