Skip to main content

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


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

mysql-context-manager-0.1.1.tar.gz (3.4 kB view hashes)

Uploaded Source

Built Distribution

mysql_context_manager-0.1.1-py3-none-any.whl (3.5 kB view hashes)

Uploaded Python 3

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page