A fast and async SQL database wrapper for Python, with support for MySQL, PostgreSQL, SQLite and MS SQL Server.
Project description
pysqlx-core
pysqlx-core is an extremely fast Python library for communicating with various SQL databases.
This package provides the core functionality for PySQLX-Engine.
The package is currently a work in progress and subject to significant change.
pysqlx-core will be a separate package, required by pysqlx-engine.
This package is written entirely in Rust and compiled as a Python library using PyO3 and PyO3-Asyncio.
This core is not so friendly, but maybe you want to use it, feel free to suggest improvements.
Supported databases
Supported Python versions
Supported operating systems
Example of installation:
PIP
$ pip install pysqlx-core
Poetry
$ poetry add pysqlx-core
Example of usage:
import pysqlx_core
import asyncio
async def main(sql):
# Create a connection
db = await pysqlx_core.new(uri="postgresql://postgres:postgrespw@localhost:49153")
# Create a table
await db.execute(sql="""
CREATE TABLE IF NOT EXISTS test (
id SERIAL PRIMARY KEY,
name VARCHAR(255) NOT NULL
);
"""
)
# Insert a row and return quantity rows affected
await db.execute(sql="INSERT INTO test (name) VALUES ('Carlos');")
# Select all rows, return a class PySQLXResult
result = await db.query(sql="SELECT * FROM test;")
# get first row
row = result.get_first() # Dict[str, Any]
# get all rows
rows = result.get_all() # List[Dict[str, Any]]
#return the db types to Pydantic BaseModel
types = result.get_model() # Dict[str, str]
# Select all rows, return how List[Dict[str, Any]]
rows = await db.query_as_list(sql="SELECT * FROM test;")
# close? no need 👌-> auto-close when finished programmer or go out of context..
asyncio.run(main())
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_core-0.1.37.tar.gz
(32.7 kB
view hashes)
Built Distributions
Close
Hashes for pysqlx_core-0.1.37-pp39-pypy39_pp73-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 17bf1f56ad5c86d50c322ab2457d3a9bc4b7c76244eb16ffb07afd610e373a90 |
|
MD5 | 22983c1802f6689280243b7f69c1c968 |
|
BLAKE2b-256 | 2053fd75dce528d00eef2331ede5435aee29d79f95bb9ba645a0962463bb2b34 |
Close
Hashes for pysqlx_core-0.1.37-pp38-pypy38_pp73-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 213f633984cb13ac3b0bb9b8f9e6640a052dae0b2a0604f6b0c43f4a69d911ae |
|
MD5 | b8294b8ec050284fbd40fa2efbcbe283 |
|
BLAKE2b-256 | 07e203d391c20121fbb4eab445adbf5b68daeb0e144d1a0c67f6a1402c6dee8f |
Close
Hashes for pysqlx_core-0.1.37-pp37-pypy37_pp73-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | bb6c4d6a113431341e8388b10bf478a6ef465afbe1e4576c8c6156644e3f4b89 |
|
MD5 | 90d190639dcedca027e0344e650f9255 |
|
BLAKE2b-256 | 517b09ec976a1e2826e517ae95ae689ff211cdbd8e8c3e4ca00660897fe57d84 |
Close
Hashes for pysqlx_core-0.1.37-cp311-none-win_amd64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 7945170fc49b95ed4fc53c660068ed893124e7e43acc82a506f88a10870b65b4 |
|
MD5 | 5e4645b7668ce0ad5952de462b000c1e |
|
BLAKE2b-256 | 1fc3d8ccdf47a288bffce241d2ba122f8649c2a70a97fcd7d0720b877b2814ab |
Close
Hashes for pysqlx_core-0.1.37-cp311-cp311-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | c5d132e4405c9b74e96b5cd6ce010e9ff80393e83284ad032356c991a625561e |
|
MD5 | 2908256d90406634db71080a01f1a1ff |
|
BLAKE2b-256 | 1ddbfed8b0c61f10b340a6a473de87bc96c33176ef7e1b6ccf4b8c40114c069d |
Close
Hashes for pysqlx_core-0.1.37-cp311-cp311-macosx_10_9_x86_64.macosx_11_0_arm64.macosx_10_9_universal2.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | bf682cd32c733722c01d6a80ca8ea89b1a15916ef1d09c6aa9833a1d126ab912 |
|
MD5 | 2c240ff2f8275022859c523b7c371388 |
|
BLAKE2b-256 | 0eba58cda034014334b7a4f55de58de90f554eef26f86f035ecfc6a0983f299f |
Close
Hashes for pysqlx_core-0.1.37-cp310-none-win_amd64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | aa159727ceaf7b46e7fb386e539f45822fd23cac9828992247892f63f98ab0cb |
|
MD5 | e325ddebffe8ba3d6ec09bcb49b950ba |
|
BLAKE2b-256 | 703c41af9a9ce2d4160ca166739cc5f35da143f8e9a277d1e7e688511901b336 |
Close
Hashes for pysqlx_core-0.1.37-cp310-cp310-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 1f1af43190a0d07393343b1d7a2f16d6c46c04268b2b9e61f05b092f98a218f4 |
|
MD5 | d28cabad2c4b6c395b5185902f747081 |
|
BLAKE2b-256 | da6f638411253456f40cd6b5912e2fb51a41dbcc63e24b4645fc680af3827c30 |
Close
Hashes for pysqlx_core-0.1.37-cp310-cp310-manylinux_2_17_i686.manylinux2014_i686.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 467fe8b2301d0eb538845fd528cd9ab7c45c59727f91b48ffaf270f27ba2422d |
|
MD5 | 3cbe6c455e2e4dab771cbc62c7b4ec59 |
|
BLAKE2b-256 | 780a4853c0d378a85f0816a8886083c74727b91c8a92fb9aa98fdd2635004827 |
Close
Hashes for pysqlx_core-0.1.37-cp310-cp310-manylinux_2_17_aarch64.manylinux2014_aarch64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | a093879340a9db4248f1d5011d9bf2ae880e86ce0abc4ebb199d7459c03ba843 |
|
MD5 | 53e7e2bc5e179da77ff30505c75f1f0a |
|
BLAKE2b-256 | 5e3399c0b63d6b13ca445009716429f49bbb04be1097a395455e7295f0e523d4 |
Close
Hashes for pysqlx_core-0.1.37-cp310-cp310-macosx_11_0_arm64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 199251e4e2eb41581abe51013a7317730dbe08a67c45505e6f8c0aebe8e572cc |
|
MD5 | 11e747acd33b035cd31ab68ae2b67600 |
|
BLAKE2b-256 | 55e3b451095890710bef7723fb5edf2b8b363cd4670579a2248a5af51cdd0a97 |
Close
Hashes for pysqlx_core-0.1.37-cp310-cp310-macosx_10_9_x86_64.macosx_11_0_arm64.macosx_10_9_universal2.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 0c217d43338212699ffb9e9e62dfbbe41e7543e429b8d2f3ff14bc7a270bc485 |
|
MD5 | 4d1de1a3bed0c81f71b83b9f18d7987d |
|
BLAKE2b-256 | d7a6c8d97d12f82c62eba26ec6948d3ce4f5cc5f5e1c203b0dff62a039ace31d |
Close
Hashes for pysqlx_core-0.1.37-cp310-cp310-macosx_10_7_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | acb1f96c5159c49eb937267885badba6b2546e4dc557220e2b9f3d8e10feaf6a |
|
MD5 | 3fc237a1ec9ec49fbd691e78df3473af |
|
BLAKE2b-256 | 2a81c29aacb9db92388ac12f79dd2fa63d8a4ca947ef32af1a561a3262b5dbdf |
Close
Hashes for pysqlx_core-0.1.37-cp39-none-win_amd64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 170a84811cea595937320ad3afe546ef482a4523a44af49ec4b77dd20782e5a9 |
|
MD5 | ad5bcecf295dbf0fdc7e81b106184c8e |
|
BLAKE2b-256 | b7715d2bd724ca1507f41f5030868002b125fe269bc23137c38035614f088060 |
Close
Hashes for pysqlx_core-0.1.37-cp39-cp39-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | aa634cdf44486e77a99c8c2a0ee0c5e1db2ad055c29145eaceaa12ab9bb019c1 |
|
MD5 | f5b134a261fbe92ae21504a37a480217 |
|
BLAKE2b-256 | 8ac4a41b157837eac347f5526303ee1662a97e2120399a093cb640203d67598e |
Close
Hashes for pysqlx_core-0.1.37-cp38-none-win_amd64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 8a91482af7b2a37485776361ee2333cfcaa9ce8f91d9fd4c355cc156fb13d0e0 |
|
MD5 | 3cb4b6848311e2d5c99f38c5c85f36e0 |
|
BLAKE2b-256 | 92bbe4db151407f401bfb2bfde4e5666eae4203123373aa3c72f3099440ce4ff |
Close
Hashes for pysqlx_core-0.1.37-cp38-cp38-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 8aafa7c4490f45cf238b162453fcfc2ba2ee91f06c561429e8ea5221b586a093 |
|
MD5 | 21260f3241fac1583dcd3db48f514d11 |
|
BLAKE2b-256 | 933673b1cc23440f8b4fdd21fd880e58d0b96b0ebad5f93cee2d8c3b75d43aee |
Close
Hashes for pysqlx_core-0.1.37-cp38-cp38-macosx_10_9_x86_64.macosx_11_0_arm64.macosx_10_9_universal2.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | c72a17937009bae71f70b4507e84da33b5fba785572ea578a17a5b1ea983b048 |
|
MD5 | 1ae89f2e9f8d362280d4c03632654bd2 |
|
BLAKE2b-256 | 0fe8daefc35780a706a4576dec8c0b3370a4d398798427194a1c06c371f551f4 |
Close
Hashes for pysqlx_core-0.1.37-cp37-none-win_amd64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 05ccfbc07d55ac807f39f03370163a03752419f0125d68d10909f28065608af3 |
|
MD5 | 3772e78a7b0ce1bf7c208f2896324fd7 |
|
BLAKE2b-256 | 0142951c6b97646c21ae5028b0403020405a4256e49eb88b8803e5caa3ee6e9a |
Close
Hashes for pysqlx_core-0.1.37-cp37-cp37m-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 2e1f7e76887019cbf49411cdf546867e9a690ca72202752daeff39b86a63acb8 |
|
MD5 | 763df190e5b7bb7e3a666ee6772b20fa |
|
BLAKE2b-256 | 9c39fd0eac34cb08d77a841681de7733955056f8bf54de78309f97a0ea311df4 |