YDB Dialect for SQLAlchemy
This repository contains YQL dialect for SqlAlchemy 2.0.
Note: Dialect also works with SqlAlchemy 1.4, but it is not fully tested.
Installation
To work with current ydb-sqlalchemy version clone this repo and run from source root:
$ pip install -U .
Getting started
Connect to local YDB using SqlAlchemy:
import sqlalchemy as sa
engine = sa.create_engine("yql+ydb://localhost:2136/local")
with engine.connect() as conn:
rs = conn.execute(sa.text("SELECT 1 AS value"))
print(rs.fetchone())
Development
Run Tests:
Run the command from the root directory of the repository to start YDB in a local docker container.
$ docker-compose up
To run all tests execute the command from the root directory of the repository:
$ tox -e test-all
Run specific test:
$ tox -e test -- test/test_core.py
Check code style:
$ tox -e style
Reformat code:
$ tox -e isort
$ tox -e black-format
Run example (needs running local YDB):
$ python -m pip install virtualenv
$ virtualenv venv
$ source venv/bin/activate
$ pip install -r requirements.txt
$ python examples/example.py
Metadata
Release files for ydb-sqlalchemy 0.1.2
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | Actions |
|---|---|---|---|---|
| ydb_sqlalchemy-0.1.2.tar.gz | 30.9 kB | Without provenance | Details for ydb_sqlalchemy-0.1.2.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| ydb_sqlalchemy-0.1.2-py2.py3-none-any.whl | Python 3, Python 2 | none | any | Details for ydb_sqlalchemy-0.1.2-py2.py3-none-any.whl |
Total release size: 66.2 kB
Release files / ydb_sqlalchemy-0.1.2.tar.gz
| Download URL | ydb_sqlalchemy-0.1.2.tar.gz |
|---|---|
| Size | 30.9 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
276879fbf2a3d0e44a611e66c7223ed25aae402ed187ccb02ec8fdd87b575115
|
|
BLAKE2b-256 checksum How to use checksums |
57da4f28ad56105a6681841683202ebb3cc424d553afcf560043c841401f975e
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/5.0.0 CPython/3.12.7
|
Release files / ydb_sqlalchemy-0.1.2-py2.py3-none-any.whl
| Download URL | ydb_sqlalchemy-0.1.2-py2.py3-none-any.whl |
|---|---|
| Size | 35.3 kB |
| Tags | Python 2 Python 3 |
|
SHA-256 checksum How to use checksums |
207523faf08692b20acabc7515891837949bc5576260c019d379dd321fc1d4f9
|
|
BLAKE2b-256 checksum How to use checksums |
46678370800d5e4f9bcf69d7c0e903370584e29f110bee3f3538e951d3f4ac4b
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/5.0.0 CPython/3.12.7
|
Security for ydb-sqlalchemy 0.1.2
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
No provenance found
None of the files in this release were uploaded with provenance metadata.
A note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.