Hypi's MekaDB client
Register a https://hypi.ai/mekadb
Usage
if __name__ == '__main__':
async def main():
client = MekaDBClient()
await client.run()
auth = await client.login('<username>', '<password>', '<database name>')
res = await client.query(creds=auth,
sql='CREATE TABLE IF NOT EXISTS user(username VARCHAR, pass VARCHAR, PRIMARY KEY (username))')
print("Create table:", res)
res = await client.query(creds=auth,
sql="INSERT INTO user(username,pass) VALUES('courtney','pass1'),('damion','pass2')")
print("Insert:", res)
res = await client.query(creds=auth, sql='SELECT * FROM user WHERE pass = :pass', params={'pass': 'pass99'})
print("Select:", res)
await client.close()
asyncio.run(main())