Async and Sync SQL Engine for Python, with support for MySQL, PostgreSQL, SQLite and MSSQL Server.
Project description
PySQLXEngine
PySQLXEngine, a minimalist SQL engine
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:
SQLitePostgreSQLMySQLMicrosoft SQL Server
OS Support:
LinuxMacOSWindows
Installation
PIP
$ pip install pysqlx-engine
Poetry
$ poetry add pysqlx-engine
Async Example
- Create
main.pyfile.
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.pyfile.
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
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file pysqlx_engine-0.2.0b4.tar.gz.
File metadata
- Download URL: pysqlx_engine-0.2.0b4.tar.gz
- Upload date:
- Size: 19.5 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: poetry/1.3.1 CPython/3.10.2 Linux/5.15.0-1024-azure
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
939095aef37d8eb7d24ac0775f4af9a39c779b830b63b56a45f34e38e7c2f84b
|
|
| MD5 |
b2fc2b0f6b422730c886369b1ceb612e
|
|
| BLAKE2b-256 |
f0e089de56176d086b38640af74b0e48c30931e994c08145894264c8ae913f6c
|
File details
Details for the file pysqlx_engine-0.2.0b4-py3-none-any.whl.
File metadata
- Download URL: pysqlx_engine-0.2.0b4-py3-none-any.whl
- Upload date:
- Size: 25.6 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: poetry/1.3.1 CPython/3.10.2 Linux/5.15.0-1024-azure
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
10bcbb8cc6b1539671b5e8de5e40fb1273a616fa55cb89f81dae2ef763d4e88a
|
|
| MD5 |
b8858ad075f6023c040dd6af66d5f250
|
|
| BLAKE2b-256 |
067ec71ce956243f885563cd1d4a8c08ffb47e9939b3767d1e91c6e0185fa401
|