Telecom System Development Kit
Project description
tsdk-git
Install
pip install tsdk-git
Usage
Copy database example
from tsdk import DbConfig, OdbcDrivers, copy_data
source = DbConfig(OdbcDrivers.SQLite, "", "database1.db", "", "", False)
destination = DbConfig(OdbcDrivers.MicrosoftSQLServer, "localhost", "database2", "uid", "pwd", False)
copy_data(source, destination)
Server object example
Set TsdkServer configuration
s = TsdkServer()
s.set_configuration(OdbcDrivers.MicrosoftSQLServer, "localhost", "tsdk", "", "", True)
Save configuration
Save to custom file
s.save_configuration("conf_test.json")
Save to default file
s.save_configuration()
Setup TsdkServer System Tables
Safely call this function for the first time, Should be used with care, it will delete exsisting system tables
s.setup_database()
Export/Import System Tables
Find sample system tables in release v1.0.0 Assets
Export system tables to Excel file
Call setup_database before exporting system tables for the first time
s.export_system_tables(r"c:/users/ali/desktop/tsdk_system_tables.xlsx")
Import system tables from Excel file,
Should be used with care, it will overwrite existing system tables
s.import_system_tables(r"c:/users/ali/desktop/tsdk_system_tables.xlsx")
Execute SQL statement on SQL server
s.execute_sql("select * from table")
Load database table to dataframe
return tuple df, err
df, err = s.sql_to_dataframe("select * from table")
Load dataframe to database table
s.dataframe_to_db(df, "table_name", index=False)
Load Excel file with multiple sheets to database tables,
Sheet names will be used as table name
s.load_all_excel_sheets_to_db(excel_file)
Load Excel sheet to database table
s.load_excel_sheet_to_db(excel_file, sheet_name)
Load CSV file to database table
s.load_csv_to_db(csv_file, table_name)
Run Audit
nr_basic_audit_v2()
Run Scheduler
df, err = s.sql_to_dataframe("SELECT * FROM scheduler")
sch = TsdkScheduler(jobs_df=df)
sch.start()
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
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file tsdk_git-5.3.4.tar.gz.
File metadata
- Download URL: tsdk_git-5.3.4.tar.gz
- Upload date:
- Size: 22.5 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.13.1
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
2785437531418082866222987b5f8dc8a467d862438fc2fa3dcf5b48e7606776
|
|
| MD5 |
e8f827abdc657ae61b9b4d6d1512a34c
|
|
| BLAKE2b-256 |
d7a256041b86e97be9bb5835dcdb1567b5ee5d98332de9a2d525280a0c744b18
|
File details
Details for the file tsdk_git-5.3.4-py3-none-any.whl.
File metadata
- Download URL: tsdk_git-5.3.4-py3-none-any.whl
- Upload date:
- Size: 22.2 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.13.1
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
2133889664ac84f3f803d710d0e682532d3221113249e0dfe3872290df9cfaca
|
|
| MD5 |
36a5281c8ed45ddea08bd2b196144bea
|
|
| BLAKE2b-256 |
f63643e73893c4277b7fb155007454d6f7287c51c0eeb493aa0a9dd975aa3a3a
|