Skip to main content

table manager for aiomysql.

Project description

MySQLer

Easily generate SQL.

Install

pip install MySQLer

Example

import asyncio

from mysqler import Table, ColumnType
from aiomysql import connect

class FavoritefoodTable(Table):
    user = ColumnType.BIGINT
    food = ColumnType.TEXT
    
async def main():
    conn = await connect(host="127.0.0.1", password="", user="")
    async with conn.cursor() as cur:
        table = FavoritefoodTable()
        await cur.execute(table.create)
        await cur.execute(table.insert(user=938194919392, food="steak"))
        await conn.commit()
        await cur.execute(table.select(user=938194919392))
        print(await cur.fetchall())
        
    await conn.close()
    
asyncio.run(main())

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

MySQLer-0.0.4.tar.gz (4.0 kB view details)

Uploaded Source

Built Distribution

MySQLer-0.0.4-py3-none-any.whl (4.7 kB view details)

Uploaded Python 3

File details

Details for the file MySQLer-0.0.4.tar.gz.

File metadata

  • Download URL: MySQLer-0.0.4.tar.gz
  • Upload date:
  • Size: 4.0 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/4.0.0 CPython/3.10.4

File hashes

Hashes for MySQLer-0.0.4.tar.gz
Algorithm Hash digest
SHA256 8a4afb793a7f728ca2ec14294e0a97e3e85cd480ffb46287a784a06993bbf972
MD5 edf9ca7edc435ec05596ea8321562799
BLAKE2b-256 d2595ef4a1477bef910e1450daf2ce140eb790a58b8f37940054298dd03d7671

See more details on using hashes here.

File details

Details for the file MySQLer-0.0.4-py3-none-any.whl.

File metadata

  • Download URL: MySQLer-0.0.4-py3-none-any.whl
  • Upload date:
  • Size: 4.7 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/4.0.0 CPython/3.10.4

File hashes

Hashes for MySQLer-0.0.4-py3-none-any.whl
Algorithm Hash digest
SHA256 e491ecffe78014a5fb1c2011b60dcaaaa238441a91c4b497a7c771392efe2346
MD5 4b6bb1a111bdd0394f07bd61645115b1
BLAKE2b-256 b3b395d7ec7819adbafb6b1bbb8bb1bc0c8d7af9317f9f98258d05f489066c45

See more details on using hashes here.

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