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
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
File details
Details for the file task_automation_test-0.0.1.tar.gz
.
File metadata
- Download URL: task_automation_test-0.0.1.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
Algorithm | Hash digest | |
---|---|---|
SHA256 | e68b1397f92d58f9932fca0e1bd4c283d6cd0dc8916667e9d26902c8b2becc14 |
|
MD5 | 96d12634acc5884317720831d66d142a |
|
BLAKE2b-256 | fc9009e17c1e34feb01a73cc04874d3ee0d67dc733d74526dc8a9d220b21d09d |
File details
Details for the file task_automation_test-0.0.1-py3-none-any.whl
.
File metadata
- Download URL: task_automation_test-0.0.1-py3-none-any.whl
- Upload date:
- Size: 11.4 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/4.0.1 CPython/3.10.4
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 7ce95f5fc588c4b572e4ecfd1247d50719e998f2869925e2878054286c9cf17a |
|
MD5 | 9d49ab66e87a8afb3e4feb90be1d965e |
|
BLAKE2b-256 | 5d855eff48af0137c8c2c691a7f63bc2d51eaf6278c3589cdd6dd493b32f51c4 |