Skip to main content

Python Async SQL Engines

Project description

PySQLXEngine

PySQLXEngine Logo

PySQLXEngine, a minimalist asynchronous SQL engine

Test Coverage Package version Supported Python versions


Documentation: https://carlos-rian.github.io/pysqlx-engine/

Source Code: https://github.com/carlos-rian/pysqlx-engine


PySQLXEngine supports the option of sending raw sql to your database.

The PySQLXEngine is a minimalist Async SQL engine. Currently this lib only supports asynchronous programming, you need to code your code using await in all methods.

Database Support:

  • SQLite
  • PostgreSQL
  • MySQL
  • Microsoft SQL Server

OS Support:

  • Linux
  • Windows Experimental! Unit tests were not run on Windows.

Installation

PIP

$ pip install pysqlx-engine

Poetry

$ poetry add pysqlx-engine

Example

  • Create main.py file.
import asyncio

from sqlx_engine import SQLXEngine

uri = "file:./db.db"
db = SQLXEngine(provider="sqlite", uri=uri)

async def main():
    await db.connect()
    rows = await db.query(query="select 1 as number")
    print(rows)

asyncio.run(main())
  • Run it
$ python3 main.py

[BaseRow(number=1)]

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

pysqlx-engine-0.1.10.tar.gz (16.1 kB view hashes)

Uploaded Source

Built Distribution

pysqlx_engine-0.1.10-py3-none-any.whl (19.4 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