database_wrapper_mysql
Part of the database_wrapper package.
This python package is a database wrapper for MySQL and MariaDB database.
Installation
pip install database_wrapper[mysql]
Usage
from database_wrapper_mysql import MySQL, DBWrapperMySQL
db = MySQL({
"hostname": "localhost",
"port": 3306,
"username": "root",
"password": "your_password",
"database": "my_database"
})
db.open()
dbWrapper = DBWrapperMySQL(dbCursor=db.cursor)
# Simple query
aModel = MyModel()
res = await dbWrapper.getByKey(
aModel,
"id",
3005,
)
if res:
print(f"getByKey: {res.toDict()}")
else:
print("No results")
# Raw query
res = await dbWrapper.getAll(
aModel,
customQuery="""
SELECT t1.*, t2.name AS other_name
FROM my_table AS t1
LEFT JOIN other_table AS t2 ON t1.other_id = t2.id
"""
)
async for record in res:
print(f"getAll: {record.toDict()}")
else:
print("No results")
db.close()
Release files for database-wrapper-mysql 0.3.146
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | |
|---|---|---|---|
| database_wrapper_mysql-0.3.146.tar.gz | 5.2 kB | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| database_wrapper_mysql-0.3.146-py3-none-any.whl | Python 3 | none | any | Details |
Total release size: 11.3 kB
Release files / database_wrapper_mysql-0.3.146.tar.gz
| Download URL | database_wrapper_mysql-0.3.146.tar.gz |
|---|---|
| Size | 5.2 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
3373b08e05d1dcf0e9b69b18974802a874681e06b7b7b00d6725ca84ad4e3bbf
|
|
BLAKE2b-256 checksum How to use checksums |
207344fb20aec88bd417346de8408a0199d56eb8b2489bacee774b2b34895932
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/7.0.0 CPython/3.13.14
|
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Aug 7, 2026.
Transparency logRelease files / database_wrapper_mysql-0.3.146-py3-none-any.whl
| Download URL | database_wrapper_mysql-0.3.146-py3-none-any.whl |
|---|---|
| Size | 6.1 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
266885008ef0ff448b12208f16765e9a4730575371ca25314989458a26cc89b7
|
|
BLAKE2b-256 checksum How to use checksums |
6b030dfe7a46bb35be000f57e48f11a6ab0cab668cc9c5a1a5bafe5692f8dd96
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/7.0.0 CPython/3.13.14
|
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Aug 7, 2026.
Transparency log