Base client class for submitting requests to a server.
Adds defaults for server url, authentication, and retrying.
|
|
__init__(self,
username=None,
base_url=None,
api_version=1)
x.__init__(...) initializes x; see help(type(x)) for signature |
|
|
|
|
|
|
|
|
|
str
|
safename(self,
oldname)
Ensure that the name is safe and that path separators are consistent
on Linux and Windows. |
|
|
|
|
_retry(self,
method,
uri,
headers={'content-type': 'application/json'},
auth=None,
required_statuses=None,
retries=0,
**kwargs) |
|
|
|
|
_request(self,
method,
uri,
headers={'content-type': 'application/json'},
auth=None,
required_statuses=None,
retries=0,
verify=False,
**kwargs) |
|
|
|
|
post(self,
uri,
required_statuses=(201),
**kwargs) |
|
|
|
|
|
|
|
patch(self,
uri,
required_statuses=(202),
**kwargs) |
|
|
|
|
| get(self,
uri,
retries=3,
**kwargs) |
|
|
|
|
| delete(self,
uri,
**kwargs) |
|
|
|
|
getResourceURI(self,
response=None)
Get an API rooted address from a full address. |
|
|
|
Inherited from object:
__delattr__,
__format__,
__getattribute__,
__hash__,
__new__,
__reduce__,
__reduce_ex__,
__repr__,
__setattr__,
__sizeof__,
__str__,
__subclasshook__
|