Skip to main content

Async and Sync SQL Engine for Python, with support for MySQL, PostgreSQL, SQLite and MSSQL Server.

Project description

PySQLXEngine

PySQLXEngine Logo

PySQLXEngine, a minimalist 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 and Sync SQL engine. Currently this lib only supports async and sync programming.

The PySQLXEngine was created and thought to be minimalistic, but very efficient. The core is write in Rust, making communication between database and Python more efficient.

Database Support:

  • SQLite
  • PostgreSQL
  • MySQL
  • Microsoft SQL Server

OS Support:

  • Linux
  • MacOS
  • Windows

Installation

PIP

$ pip install pysqlx-engine

Poetry

$ poetry add pysqlx-engine

Async Example

  • Create main.py file.
import asyncio

from pysqlx_engine import PySQLXEngine

uri = "sqlite:./db.db"
db = PySQLXEngine(uri=uri)

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

asyncio.run(main())

Sync Example

  • Create main.py file.
from pysqlx_engine import PySQLXEngineSync

uri = "sqlite:./db.db"
db = PySQLXEngineSync(uri=uri)

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

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.2.0b3.tar.gz (19.2 kB view hashes)

Uploaded Source

Built Distribution

pysqlx_engine-0.2.0b3-py3-none-any.whl (25.0 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