class brain.api.api.BrainAuth(authtype, **kwargs)[source]

Bases: requests.auth.AuthBase

This is a custom requests authorization class

This class is used to ensure that token authentication takes precedence over the netrc file in the request. See https://github.com/requests/requests/issues/3929 and Request Custom Headers <http://docs.python-requests.org/en/master/user/quickstart/#custom-headers>_

Parameters:authtype (str) – the authentication method used for the API. Currently set as default to use JSON Web token authentication.
class brain.api.api.BrainInteraction(route, params=None, request_type='post', auth='token', timeout=(3.05, 300), headers=None, stream=None, datastream=None, send=True, base=None, verify=True)[source]

Bases: object

This class defines convenience wrappers for the Brain RESTful API


Retrieve the URL routing map if it exists.


set the session authentication

brain.api.api.strjoin(str1, str2)[source]

joins two url strings

brain.api.api.urljoin(url1, url2)[source]

custom function to join two url paths