Skip to main content

py-mysql-client

py-mysql-client is a lite version for mysql-python-connector package , pure mysql driver written by python

Installation

pip install py-mysql-client

Features

No cursor , get the results instantly after a query like using mysql command line client

Support transactions autocommited

Support prepare stmt

Support debug mode , mysql protocal packages and commands would be printed out for debuging

Usage

Execute ordinary query


from easymysql.connector import MySQLClient

db = MySQLClient()

db.connect(host="121.4.60.147",port=3306,user="root",password="jsak")

print db.execute("show databases;")

stdout :

[(u'information_schema',), (u'mysql',), (u'performance_schema',), (u'stock',), (u'sys',)]

Execute ordinary dml

db.execute("drop table if exists testmy")

db.execute("create table if not exists testmy(id int(11),name varchar(10))")

db.execute("insert into testmy (id,name) values(1,'mamo')")

db.commit()

Execute transcations autocommitted

db.autocommit = True

db.execute("drop table if exists testmy")

db.execute("create table if not exists testmy(id int(11),name varchar(10))")

db.execute("insert into testmy (id,name) values(1,'mamo')")

Execute prepare stmt

db.connect(host="121.4.60.147",port=3306,user="root",password="Yrj1993718!",database="jsak")

db.prepare()

db.execute("select * from stock_daily where stock_code = ?",(601318,))

Debug mode

db = MySQLClient()

db.set_debug()

db.connect(host="121.4.60.197",port=3306,user="root",password="Yrj1993718!",database="stock")

Metadata

Release files for py-mysql-client 0.0.0.2

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for py-mysql-client 0.0.0.2
File Size Uploaded
py-mysql-client-0.0.0.2.tar.gz 117.9 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for py-mysql-client 0.0.0.2
File Interpreter ABI Platform
py_mysql_client-0.0.0.2-py2-none-any.whl Python 2 none any Details

Total release size: 255.1 kB

Release files / py-mysql-client-0.0.0.2.tar.gz

Download URL py-mysql-client-0.0.0.2.tar.gz
Size 117.9 kB
Tags Source
SHA-256 checksum
How to use checksums
95defdae3ec19390be72810c81bf02e41ef9f9057bf519ee38b61f923b3a0d89
BLAKE2b-256 checksum
How to use checksums
30b1b1c8ccd64eb213a1c3ff723d5095b345ea52615ddb5afb78659505fe1a47
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/1.15.0 pkginfo/1.7.0 requests/2.25.1 setuptools/18.5 requests-toolbelt/0.9.1 tqdm/4.59.0 CPython/2.7.16

Release files / py_mysql_client-0.0.0.2-py2-none-any.whl

Download URL py_mysql_client-0.0.0.2-py2-none-any.whl
Size 137.2 kB
Tags Python 2
SHA-256 checksum
How to use checksums
1f1e70f255e09e193ae2701d4ac3df4eddfccca49d2615125defa27167c533b6
BLAKE2b-256 checksum
How to use checksums
ca2e25f333dd7671308997565db618be048eb5c1f1284533508fe1daa767f2ac
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/1.15.0 pkginfo/1.7.0 requests/2.25.1 setuptools/18.5 requests-toolbelt/0.9.1 tqdm/4.59.0 CPython/2.7.16

Release history Release notifications | RSS feed

This release

0.0.0.2 This release

2 release files

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page