(20260202) Made TCAOFF APIs async.

This commit is contained in:
2026-02-02 15:18:20 +05:30
parent e2049b683f
commit 1e98e53092
2 changed files with 638 additions and 24 deletions
+24 -24
View File
@@ -1245,31 +1245,31 @@ if __name__ == "__main__":
print("User Data :", user_data_dir)
print("Downloads :", downloads_dir)
# # Create an instance of the automation object:
# cosec = CosecWeb(
# cosec_url = "http://103.89.8.21/COSEC",
# username = input("Username : "),
# password = input("Password : "),
# driver_dir = chrome_driver_dir,
# user_data_dir = user_data_dir,
# downloads_dir = downloads_dir,
# )
# Create an instance of the automation object:
cosec = CosecWeb(
cosec_url = "http://103.89.8.21/COSEC",
username = input("Username : "),
password = input("Password : "),
driver_dir = chrome_driver_dir,
user_data_dir = user_data_dir,
downloads_dir = downloads_dir,
)
# # Perform the login:
# cosec.login(initial_sleep = 2.5)
#
# # Get the in/out report:
# in_out_report_path = cosec.get_in_out_summary(
# initial_sleep = 1.0,
# from_date = datetime.datetime.now() - datetime.timedelta(days = 1),
# to_date = datetime.datetime.now(),
# group_ids = [
# "2", # ... Velankani Information Systems Pvt Ltd
# "3", # ... Velankani Bydesign India Pvt Ltd
# "4", # ... Velankani Electronics & Automotive Pvt Ltd
# ],
# download_timeout = 60.0
# )
# Perform the login:
cosec.login(initial_sleep = 2.5)
# Get the in/out report:
in_out_report_path = cosec.get_in_out_summary(
initial_sleep = 1.0,
from_date = datetime.datetime.now() - datetime.timedelta(days = 1),
to_date = datetime.datetime.now(),
group_ids = [
"2", # ... Velankani Information Systems Pvt Ltd
"3", # ... Velankani Bydesign India Pvt Ltd
"4", # ... Velankani Electronics & Automotive Pvt Ltd
],
download_timeout = 60.0
)
# Convert the In/Out Summary to a Pandas DF:
in_out_report_path = input("File Path : ")