schrodinger :: test :: stu :: client :: _BaseClient :: Class _BaseClient
[hide private]
[frames] | no frames]

Class _BaseClient

object --+
         |
        _BaseClient
Known Subclasses:

Base client class for submitting requests to a server.

Adds defaults for server url, authentication, and retrying.

Instance Methods [hide private]
 
__init__(self, username=None, base_url=None, api_version=1)
x.__init__(...) initializes x; see help(type(x)) for signature
 
item_uri(self, item)
 
list2str(self, items)
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)
 
put(self, uri, **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__

Class Methods [hide private]
 
instance(cls, username, base_url=None, api_version=1)
Class Variables [hide private]
  _INSTANCE = None
Singleton instance of the client to simplify access for apps that always use the defaults.
Properties [hide private]
  auth
  fullapi

Inherited from object: __class__

Method Details [hide private]

__init__(self, username=None, base_url=None, api_version=1)
(Constructor)

 

x.__init__(...) initializes x; see help(type(x)) for signature

Overrides: object.__init__
(inherited documentation)

safename(self, oldname)

 

Ensure that the name is safe and that path separators are consistent on Linux and Windows.

Parameters:
  • oldname - String to be protected
Returns: str
String with with all path separators replaced by / and all non-URL-safe characters protected.

Property Details [hide private]

auth

Get Method:
unreachable.auth(self)

fullapi

Get Method:
unreachable.fullapi(self)