1.3. Module cargador

Access module to the Cargador file storage. More on Cargador settings, see section: “carga-advanced-params

Classes

class py_cerebro.cargador.Cargador(_host, _rpc_port, _http_port)[source]

Cargador class to access the Cargador file storage.

Methods

The following methods are inherited from the XML-RPC object:

catalogDelete(hash HASH, password STR) catalogDownload(hash HASH, siteList STR, CommenceFlags INT, userName STR, url STR, retryCount INT) catalogResolve(hash HASH) catalogUpload(hash HASH, siteList STR, CommenceFlags INT, userName STR, url STR, retryCount INT) controlIO(hash HASH, TableKind INT, Action INT) statusInfo() statusTables(tablesBitMaks INT, flags INT)

More information about these methods, see the section:ref:capi-xml-rpc.

import_file(file_name, url)[source]
Parameters:
  • file_name (string) – path to the file.
  • url (string) – storage place locator. The full path of the task, serves as locator, for example, ‘Test project/Test task’.

Imports the file in the file storage using HTTP protocol with PUT method and returns it to the hash in the base64 format.

rpc = py_cerebro.cargador.Cargador('server', 4040, 4080); # create a Cargador class object
rpc.import_file('cargador.py', 'Test Folder')) # import the file in the Cargador file storage.