pymydb-client
Pure-Python client for MyDB,
a relational database engine with a custom binary wire protocol served by its
mydbd daemon. No third-party dependencies (just socket, hashlib,
struct, getpass from the standard library); compatible with Python 2.7
through 3.x.
It reimplements the same challenge-response auth and framing the C mydb CLI
uses, so it can talk to mydbd over either a Unix domain socket or TCP.
Install
pip install pymydb-client
Usage
from pymydb_client import connect
# Over TCP (mydbd's default TCP listener, 0.0.0.0:4442)
conn = connect(host="127.0.0.1", port=4442, user="root", password="yourpass")
print(conn.query("SHOW DATABASES;"))
conn.close()
Context manager form:
with connect(host="127.0.0.1", port=4442, user="root", password="yourpass") as conn:
print(conn.query("SELECT id, name FROM users;"))
query(sql) returns the same formatted text a SQL client would print (a
table for SELECT, or an OK/error message) — the wire protocol carries plain
text, not structured rows.
Omit password to be prompted interactively via getpass. Connect/auth/query
failures raise pymydb_client.MyDBError.
License
MIT — see LICENSE.
Release files for pymydb-client 0.1.0
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | |
|---|---|---|---|
| pymydb_client-0.1.0.tar.gz | 5.6 kB | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| pymydb_client-0.1.0-py3-none-any.whl | Python 3 | none | any | Details |
Total release size: 12.8 kB
Release files / pymydb_client-0.1.0.tar.gz
| Download URL | pymydb_client-0.1.0.tar.gz |
|---|---|
| Size | 5.6 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
759617860ff4c2eca99bc8060589d4958c18903c4916fc7f5fb3e108cdcb96ef
|
|
BLAKE2b-256 checksum How to use checksums |
47a255c10056a863a172cb1f7d4fc7f6645c144f2bac516c3dc7c7326b805b55
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/6.2.0 CPython/3.14.5
|
Release files / pymydb_client-0.1.0-py3-none-any.whl
| Download URL | pymydb_client-0.1.0-py3-none-any.whl |
|---|---|
| Size | 7.3 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
c9ddf9ae8d7cd0cae51818e7e73f8552355652dee2dc197f1e2202624aac84d9
|
|
BLAKE2b-256 checksum How to use checksums |
ab274e0f7db21fe907452871afda813bbefd44044ff1760df140a9d66c3e9ba4
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/6.2.0 CPython/3.14.5
|