Module cargador
Support Team avatar
Written by Support Team
Updated over a week ago

Cargador file storage access module. For more information about setting up Cargador, check the section “carga-advanced-params”

Classes

classpy_cerebro.cargador.Cargador(_host, _rpc_port, _http_port)

The 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)

Read more about these methods in the section Interface to Cargador file storage via the XML-RPC protocol.

import_file(file_name, url)

Parameters:

  • file_name (string) – path to the file.

  • url (string) – the locator to a place in the repository. The locator is the full path of the task in Cerebro, for example, "Test project/Test task".

Imports a file into a file storage via the HTTP protocol using the PUT method and returns its hash in base64 format.

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


Did this answer your question?