Package: kube-app
Kube app library process flow documentationPre-requisitesPython installation documentationPython installation for windows 8 and above.Documentationpip installation for windows 8 and above.DocumentationInstallationSupported for all macOS/linux/windows.There are some prerequisite which need to be considered before using this sdk and they have been covered in previous section.Install kube-app sdk with pip.pipinstallkube-appMethod:pushData(source_data,table,overwrite)Using pushData method data can be inserted into table schema already defined in kube database.importkube_appaskclient=k.Client('API_KEY','SECRET_KEY')client.pushData(source_data,table,overwrite)Request Parameters:Here is the list of parameters for pushing data into kube database:ParameterTypeDescriptionsource_datapandas dataframesource_data is pandas dataframe which is generated by the user.tablestringtable is string value which can be: sales,sales_order,calendar,ar,logs,target.overwritebooleanoverwrite can be True or False. overwrite is True by default and when it is False then data is appended in current table.Output:boolean: TrueThe output is a boolean value True which suggests data is inserted into kube database.getSchema(table)Using getSchema method schema details for all tables present are extracted as pandas dataframe.importkube_appaskclient=k.Client('API_KEY','SECRET_KEY')client.getSchema(table)Request Parameters:Here is the list of parameters to get schema details from kube database:ParameterTypeDescriptiontablestringtable is string value which can be: sales,sales_order,calendar,ar,logs,target.Output:boolean: TrueThe output is a pandas dataframe.getData(table)Using getData method data can be extracted from kube database.importkube_appaskclient=k.Client('API_KEY','SECRET_KEY')client.getData(table)Request Parameters:Here is the list of parameters for pushing data into kube database:ParameterTypeDescriptiontablestringtable is string value which can be: sales,sales_order,calendar,ar,logs,target.Output:boolean: TrueThe output is a pandas dataframe.generateCalendarData(start_month,start_year,end_year)Using generateCalendarData method calendar can be generated which can be later pushed into kube database using pushData method.importkube_appaskclient=k.Client('API_KEY','SECRET_KEY')client.getCalendarData(04,2023,2024)Request Parameters:Here is the list of parameters for pushing data into kube database:ParameterTypeDescriptionstart_monthintegerstart_month is integer value between 1 to 12.start_yearintegerstart_year is an integer value.end_yearintegerend_year is an integer value more than start_year.Output:boolean: TrueThe output is a pandas dataframe.deleteTable(table)Using generateCalendarData method calendar can be generated which can be later pushed into kube database using pushData method.importkube_appaskclient=k.Client('API_KEY','SECRET_KEY')client.deleteTable('sales')Request Parameters:Here is the list of parameters for pushing data into kube database:ParameterTypeDescriptiontablestringtable is string value which can be: sales,sales_order,calendar,ar,logs,target.Output:boolean: TrueThe output is a pandas dataframe.getSampleData(table)Using getSampleData method sample data can be viewed in the form of pandas dataframe and later can be used to push into kube database using pushData method.importkube_appaskclient=k.Client('API_KEY','SECRET_KEY')client.getSampleData('sales')Request Parameters:Here is the list of parameters for pushing data into kube database:ParameterTypeDescriptiontablestringtable is string value which can be: sales,sales_order,calendar,ar,logs,target.Output:boolean: TrueThe output is a pandas dataframe.