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)
Built Distribution
Close
Hashes for pykn_mysqltools-0.0.5-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | e3e51a3f05247d36a2225d824a22b5f2807278f99a492326d9b41ca767f67712 |
|
MD5 | 26b4c9bb2f8b9447c3db03f172244546 |
|
BLAKE2b-256 | e6d936f4f1a8308341a72a5495b75e93c9ad3236689ecb4e4ac471f1d76c5d73 |