Skip to main content

Package contains functions to perform simple task such as FTP transfer, Import to miscrosoft database etc.

Project description

This module contains functions to perform the small tasks such as downloading email attachment, FTP upload and FTP download, importing or appending the csv or txt file to Microsoft SQL server database etc.

Functions

attachment_verification(file_path, files) Compares size of downloaded file with the file attached to the email. download_attachment(email_sender, email_subject, files, download_location, received_duration=1,email_folder="Inbox") Downloads attachments from an email. csv_to_txt(csvfile,txtfile,delimiter='\t',replace_if_exist=True) Converts csv file to txt file using delimiter. ftp_upload_verify(hostname, username, password, ftp_dir, files, filepath,TLS) Verifies the uploaded file size with original file size. ftp_upload(hostname, username, password, ftp_dir, files, filepath,TLS=False) Uploads files to the FTP server and compares the uploaded file size with original file size. ftp_download_verify(hostname, username, password, ftp_dir, files, filepath,TLS) Veryfies the file size of the downloaded file with the original file. ftp_download(hostname, username, password, ftp_dir, files, filepath,TLS=False) Downloads files from FTP server and compares the file size of the downloaded file with the original file. execute_msql(sql_file, con) Executes query from '.sql' file. append_csv_msql(filepath,con,insert_query,has_header=False) Appends the .CSV file to the existing table in Microsoft SQL Server database. append_txt_msql(filepath, con, insert_query,has_header=False,delimiter='|') Appends the .txt file to the existing table in Microsoft SQL Server database. import_csv_msql(filepath,con,create_query,insert_query,has_header) Imports the .CSV file to the Microsoft SQL Server database. NOTE: This function will drop the table if already exist and will create a new one. import_text_msql(filepath, con, create_query, insert_query, has_header) Imports .TXT file to the microsoft SQL server database. NOTE: This function will drop the table if already exist and will create a new one. msql_results_to_file(sql_file, output_file, con, save_as='CSV', header=False) Executes query in .sql file and saves resulting table as 'CSV' or 'TXT'('|' delimited) file. query_results_to_file(query, output_file, con, save_as="CSV", header=False) Executes the query and saves the result as 'CSV' or 'TXT'('|' delimited) file. run_msql(con, query) Runs SQL query. send_email(profilename, recipients, CC, subject, email_body, attachments) Sends email to the recipients, can also send attachments with email. send_reply(email_sender, email_subject, reply_body, received_duration=1,email_folder="Inbox") Sends reply(Reply all) to the email. sftp_file_verify(hostname,port, username, password,ftp_dir,filepath,file) After upload or download transaction, compares size of the file on the sftp server with size of the file on the device/network.
sftp_upload(hostname,port, username, password,ftp_dir,filepath,file) Uploads file to SFTP server. sftp_download(hostname,port, username, password,ftp_dir,filepath,file) Downloads file from SFTP server.

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

task_automation_test-0.0.3.tar.gz (11.0 kB view details)

Uploaded Source

Built Distribution

task_automation_test-0.0.3-py3-none-any.whl (11.4 kB view details)

Uploaded Python 3

File details

Details for the file task_automation_test-0.0.3.tar.gz.

File metadata

  • Download URL: task_automation_test-0.0.3.tar.gz
  • Upload date:
  • Size: 11.0 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/4.0.1 CPython/3.10.4

File hashes

Hashes for task_automation_test-0.0.3.tar.gz
Algorithm Hash digest
SHA256 abc5204cbbd3c5a567750bb3cc94dae4103951fef5408b7f2c391c1232816075
MD5 5d36694eb182720551331a8da99c999d
BLAKE2b-256 cee30d34c5e03a9f0b6453a0f83659e5c32b741f37eb5a46c697e9e7c1aaced9

See more details on using hashes here.

File details

Details for the file task_automation_test-0.0.3-py3-none-any.whl.

File metadata

File hashes

Hashes for task_automation_test-0.0.3-py3-none-any.whl
Algorithm Hash digest
SHA256 7ff00ced8abaf321d7fb0f8accc7ced66368c986b83f3c82c3c67314f36e93e2
MD5 0b7f3e6b994cd3c04379d0eac0fb74e4
BLAKE2b-256 828a805941b726dc6a059d952b9d9dcab3759386730248cda44d708b5b953899

See more details on using hashes here.

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page