Skip to main content

Utilities for interacting with MySQL and CSVs.

Project description

pykn_mysqltools

Handy utility tools for interacting with a MySQL database with Python. This project was created with a need to interact with MySQL utilizing lots of CSVs, but the complexity of pandas was a bit overkill. Perhaps as my needs grow, I'll see the light and move over to pandas.

Typical Usage

You'll primarily want to interact with the DBConnection class. Example:

from pykn_mysqltools import utilities as pyknmt

my_conn = pyknmt.DBConnection(
    db_hostname="hostname",
    db_username="username",
    db_password="password",
    db_schema="schema",
    db_port="port"
)

From here you can interact with your database through my_conn, and access helpful tools like the import_csv method:

my_conn.import_csv("./path/to/your.csv", "tablename")

If your use case calls for inserting data directly, the insert method is your friend.

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

pykn_mysqltools-0.0.5.tar.gz (13.0 kB view hashes)

Uploaded Source

Built Distribution

pykn_mysqltools-0.0.5-py3-none-any.whl (4.7 kB view hashes)

Uploaded Python 3

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