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
Built Distribution
File details
Details for the file pykn_mysqltools-0.0.6.tar.gz
.
File metadata
- Download URL: pykn_mysqltools-0.0.6.tar.gz
- Upload date:
- Size: 12.9 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/4.0.2 CPython/3.10.6
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | d98c31ef04b31f41f5fce1d19493d5d2b74492b963845883cb7dcfea55729986 |
|
MD5 | 68921633c5faea2a60b5e33c64690458 |
|
BLAKE2b-256 | fbc4a0b404b989df9295212954037cc1d9a83d760b071f991b93ce6c8e7909cf |
File details
Details for the file pykn_mysqltools-0.0.6-py3-none-any.whl
.
File metadata
- Download URL: pykn_mysqltools-0.0.6-py3-none-any.whl
- Upload date:
- Size: 4.6 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/4.0.2 CPython/3.10.6
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 2b383ee7157af937b25eb85673d7f36ec1165879fbb08f13c1b3fd322ed9ea84 |
|
MD5 | c7c1ebb66196f5632d3de1d2c16c80f0 |
|
BLAKE2b-256 | 36b042c428b906d097882e7f41ef4ce7b57ab54821c47573ba8ecd62445b4395 |