def test_upload_dropbox_file(self): TEMP_TEST_FILE = 'temp_test_file.txt' TEMP_TEST_FILE_UPLOADED = r'/uploaded' + TEMP_TEST_FILE with open(TEMP_TEST_FILE, 'w') as file: file.write("...test..." + str(datetime.datetime.now())) upload_dropbox_file(os.path.abspath(TEMP_TEST_FILE), TEMP_TEST_FILE_UPLOADED)
def do_busca_trades_e_faz_merge_operacoes(): from src.crawler_cei import busca_trades df_cei = busca_trades(os.environ['CPF'], os.environ['SENHA_CEI']) from src.dropbox_files import download_dropbox_file download_dropbox_file() df = get_operations() df = merge_operacoes(df, df_cei) df_to_csv(df, OPERATIONS_FILEPATH) upload_dropbox_file(OPERATIONS_FILEPATH, os.environ['DROPBOX_FILE_LOCATION'])
def do_busca_trades_e_faz_merge_operacoes(): from src.crawler_cei import CrawlerCei crawler_cei = CrawlerCei(headless=True) df_cei = crawler_cei.busca_trades() from src.dropbox_files import download_dropbox_file download_dropbox_file() df = get_operations_dataframe() df = merge_operacoes(df, df_cei) df_to_csv(df, OPERATIONS_FILEPATH) upload_dropbox_file(OPERATIONS_FILEPATH, os.environ['DROPBOX_FILE_LOCATION'])
def do_busca_trades_e_faz_merge_operacoes(): from src.crawler_cei import CrawlerCei crawler_cei = CrawlerCei(headless=True) df_cei = crawler_cei.busca_trades() from src.dropbox_files import download_dropbox_file download_dropbox_file(OPERATIONS_FILEPATH) df = get_operations(filepath=OPERATIONS_FILEPATH) df = merge_operacoes(df, df_cei) df_to_csv(df, OPERATIONS_FILEPATH) upload_dropbox_file(OPERATIONS_FILEPATH, None)