A module to fetch data from MySQL db as list or save it as text file
Project description
This package using MySQLdb interface to connect to database. This module will give convenience to fetch data as list (fetch_dbdata_list) and export it to text file (write_dbdata_file), or do all in 1 go using fetch_dbdata_file.
CONTENTS: 1st Module - mydb.py
def fetch_dbdata_file(sql, db_credential, output_filename, mode=”w”, delimiter=”t”) # all in one def fetch_dbdata_list(sql, db_credential, header=True) def write_dbdata_file(data_as_list, output_filename, mode=”w”, header_as_list=[], delimiter=”t”) def write_list_file(list_data, output_filename, mode=”w”)
2st Module - mydbconn.py
def set_logger(log_name) class Connect_DB: MySQLdb connection with additional feature to create log file
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
Built Distribution
File details
Details for the file clioedb-1.6.tar.gz
.
File metadata
- Download URL: clioedb-1.6.tar.gz
- Upload date:
- Size: 15.9 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/3.4.2 importlib_metadata/4.8.1 pkginfo/1.7.1 requests/2.26.0 requests-toolbelt/0.9.1 tqdm/4.62.3 CPython/3.9.5
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | ef550c48c8c0f2ff80caeeed4ec4901b9b44d1584cd63123062eea0f664ffd5c |
|
MD5 | c61c97e1f938cf031e9feebf012dd56b |
|
BLAKE2b-256 | a8143c655e408657815db42a2b1d1604c491576e11b52e725d39cdc992addd71 |
File details
Details for the file clioedb-1.6-py3-none-any.whl
.
File metadata
- Download URL: clioedb-1.6-py3-none-any.whl
- Upload date:
- Size: 16.6 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/3.4.2 importlib_metadata/4.8.1 pkginfo/1.7.1 requests/2.26.0 requests-toolbelt/0.9.1 tqdm/4.62.3 CPython/3.9.5
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | d5f48d523e278522ea0a96db94b0ad44a151b92cff083482e34e9470448c21da |
|
MD5 | 2a08439cea0e4be9c7ece1572b9acdd2 |
|
BLAKE2b-256 | 203bd35c83b8aa319e016ea5169dbb8c6d12224c0208fc3782274d801f5c9ab3 |