Work with MySQL databases asynchronously, and in context.
Project description
MySQL Context Manager
Work with MySQL based databases asynchronously, using a context manager.
Getting started
You can get mysql-context-manager
from PyPI,
which means you can install it with pip easily:
python -m pip install mysql-context-manager
Example
from mysql_context_manager import MysqlConnector
async with MysqlConnector(hostname="localhost") as conn:
results = await conn.query("select username from users where is_bender = 1 order by username asc;")
assert results[0]["username"] == "Aang"
assert results[1]["username"] == "Katara"
assert results[2]["username"] == "Toph"
Project details
Release history Release notifications | RSS feed
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 mysql-context-manager-0.1.1.tar.gz
.
File metadata
- Download URL: mysql-context-manager-0.1.1.tar.gz
- Upload date:
- Size: 3.4 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: poetry/1.1.14 CPython/3.10.4 Windows/10
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 8e60fd9cb556c36799db61b3760a288e02c0b4775c0e7f0607c6124cf359bb20 |
|
MD5 | 5b3f3405efad0ac3269ceb4246d38da0 |
|
BLAKE2b-256 | ea475f9d29b5b0aa8ce1970f056bbc49040ea3096d3195c77228c53a88fed4d1 |
File details
Details for the file mysql_context_manager-0.1.1-py3-none-any.whl
.
File metadata
- Download URL: mysql_context_manager-0.1.1-py3-none-any.whl
- Upload date:
- Size: 3.5 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: poetry/1.1.14 CPython/3.10.4 Windows/10
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 7d6e309a366272fd836bb849c7021e3365bf9a7082977cee66fcabf4ad348134 |
|
MD5 | 5fe11f5ebb3a143fa6d5a984662d6a27 |
|
BLAKE2b-256 | a082e593099f1f651c085bc4ffacee70d36fead766c34fb7404db3850d7db783 |