Package: pycortexintelligence
Py Cortex IntelligenceRelease NotesNeed to consult the history of our project?Click HereHow to build localepipinstallwheel
pythonsetup.pybdist_wheelHow to update on PIPpython -m twine upload  dist/*Cases of UseDataInput Parametersdata_input_parameters = {
    'ignoreValidationErrors': True/False,
}
// If you send this parameter, the datainput will ignore errors.Available Originsexecution_parameters = {
  'name': 'Name of your Integrations',
  'origin': 'Connector',
}

// If you send this to Execution your data need contain
// Dates in YYYY-MM-DD HH:MM:SS format
// Float numbers in XXX.XXX.XXX,YY format
// 'origin' are optional parameters, if you do not send the platform you will try to guess the formatsIf you need upload a file to Cortex Applicationimportlogging.configfrompycortexintelligenceimportfunctionsascortexfunctions## Criamos uma instancia do filtercortexFilter=cortexfunctions.ApplicationTenantFilter('App_Using_Pycortexintelligence','CLIENT')## Configurando o logging do sistemaLOGGING={'version':1,'disable_existing_loggers':True,'formatters':{'verbose':{'format':'%(levelname)s%(asctime)s%(module)s%(process)d%(thread)d%(message)s'},},"handlers":{'console':{'class':'logging.StreamHandler','formatter':'verbose'},## Entrada do handler do Graylog utilizando graypy## Para utilizar esse handler eh necessario instalar o graypy## no requirements.txt de sua aplicacao ou com pip install graypy'graypy':{'class':'graypy.GELFUDPHandler','host':'localhost','port':12201,'filters':[cortexFilter]}},"root":{"handlers":["console","graypy"],"level":"DEBUG",}}## Configuring Logginglogging.config.dictConfig(LOGGING)# Execution Parameters# You can define Origin, to inform platform a bundle of parses.execution_parameters={'name':'LoadManager PyCortex',# 'origin': 'Connector',}# DataInput Parametersdata_input_parameters={'ignoreValidationErrors':True,}# Timeouts# You can set timeouts for the platform according to the size of the uploaded files# or use the defaulttimeout={'file':300}# DataFormat are Optionally defineddefault_data_format={"charset":"UTF-8","quote":"\"","escape":"\\","delimiter":",","fileType":"CSV","compressed":"NONE"}try:# Upload to Cortexcortexfunctions.upload_to_cortex(cubo_id='',file_path='',plataform_url='CLIENT.cortex-intelligence.com',username='',password='',data_format=default_data_format,timeout=timeout,execution_parameters=execution_parameters,)exceptExceptionase:# In case of error, send it to loggerlogging.error(str(e))If you need download file from Cortex Applicationfrompycortexintelligenceimportfunctionsascortexfunctions# DataFormat are Optionally defineddafault_data_format={"charset":"UTF-8","quote":"\"","escape":"\/\/","delimiter":",",}# Select the headers from filecolumns=['Name of Column A','Name of Column B']# OPTIONAL Filtersfilters=[['Name of Column A','Value'],['Name of Column A','Value1|Value2|Value3'],['Name of Column B','dd/mm/YYYY'],['Name of Column B','dd/mm/YYYY-dd/mm/YYYY'],]# Download from Cortexcortexfunctions.download_from_cortex(cubo_id='',file_path='',plataform_url='CLIENT.cortex-intelligence.com',username='',password='',data_format=dafault_data_format,columns=columns,filters=filters,)Validating downloaded data from platform.Now download_from_cortex function returns a variable with Content-Rows from the response headercontent_rows = cortexfunctions.download_from_cortex(
    ...
)CLI Usagecortex.py--helpExamplescortex.pystartproject--name"Project Name"--snamesafe_project_nameHow to ContributeDevelopersDevelopers can access our development manual byclicking here.CommunityYou can create a new Issueclicking here, and we will start a description about the reported Bug or Feature.