class pyArango.connection.AikidoSession(username, password, verify=True, max_conflict_retries=5, max_retries=5, single_session=True, log_requests=False, pool_maxsize=10)[source]

Magical Aikido being that you probably do not need to access directly that deflects every http request to requests in the most graceful way. It will also save basic stats on requests in it’s attribute ‘.log’.

class pyArango.connection.Connection(arangoURL='', username=None, password=None, verify=True, verbose=False, statsdClient=None, reportFileName=None, loadBalancing='round-robin', use_grequests=False, use_jwt_authentication=False, use_lock_for_reseting_jwt=True, max_retries=5, max_conflict_retries=5, pool_maxsize=10)[source]

This is the entry point in pyArango and directly handles databases. @param arangoURL: can be either a string url or a list of string urls to different coordinators @param use_grequests: allows for running concurent requets.

arangoURL: list or str
list of urls or url for connecting to the db
username: str
for credentials
password: str
for credentials
verify: bool
check the validity of the CA certificate
verbose: bool
flag for addictional prints during run
statsdClient: instance
statsd instance
reportFileName: str
where to save statsd report
loadBalancing: str
type of load balancing between collections
use_grequests: bool
parallelise requests using gevents. Use with care as gevents monkey patches python, this could have unintended concequences on other packages
use_jwt_authentication: bool
use JWT authentication
use_lock_for_reseting_jwt: bool
use lock for reseting gevents authentication
max_retries: int
max number of retries for a request
max_conflict_retries: int
max number of requests for a conflict error (1200 arangodb error). Does not work with gevents (grequests),
pool_maxsize: int
max number of open connections. (Not intended for grequest)
createDatabase(name, **dbArgs)[source]

use dbArgs for arguments other than name. for a full list of arguments please have a look at arangoDB’s doc


return an URL to the databases


return an endpoint url applying load balacing strategy


return an URL for the connection


fetches the arangodb server version


returns true/false wether the connection has a database by the name of ‘name’


Reloads the database list. Because loading a database triggers the loading of all collections and graphs within, only handles are loaded when this function is called. The full databases are loaded on demand when accessed

resetSession(username=None, password=None, verify=True)[source]

resets the session


udpdates the list of available endpoints from the server

class pyArango.connection.JsonHook(ret)[source]

This one replaces requests’ original json() function. If a call to json() fails, it will print a message with the request content