Skip to main content

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

clioedb-1.7.tar.gz (15.8 kB view details)

Uploaded Source

Built Distribution

clioedb-1.7-py3-none-any.whl (16.9 kB view details)

Uploaded Python 3

File details

Details for the file clioedb-1.7.tar.gz.

File metadata

  • Download URL: clioedb-1.7.tar.gz
  • Upload date:
  • Size: 15.8 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/4.0.0 CPython/3.10.1

File hashes

Hashes for clioedb-1.7.tar.gz
Algorithm Hash digest
SHA256 f13e818d3fe26f4a5d88e6dad487c55752b61502e38e5de650e0be24ce2e8a6c
MD5 ca58a00ea88a0ee16423f4d15bbbbc01
BLAKE2b-256 a27f8dcf5073b618d33122ec4382caa8e06a2d2eab14a2084ee61736394d4e54

See more details on using hashes here.

File details

Details for the file clioedb-1.7-py3-none-any.whl.

File metadata

  • Download URL: clioedb-1.7-py3-none-any.whl
  • Upload date:
  • Size: 16.9 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/4.0.0 CPython/3.10.1

File hashes

Hashes for clioedb-1.7-py3-none-any.whl
Algorithm Hash digest
SHA256 680ebec1dfe078dac95eae475d59a68bc6ce5b65f0f9ac7bcdb9f583bc5f1fa1
MD5 9bbe6de9475ef426515a8c727bffc1ef
BLAKE2b-256 a6e9a92c5e4c69e3f84f05af2a6c538006ca11989220f515bac98a85e4ede95f

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