You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: readme.md
+28-8Lines changed: 28 additions & 8 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -15,15 +15,33 @@
15
15
16
16
---
17
17
18
-
`sqloxide` wraps rust bindings for [sqlparser-rs](https://github.com/ballista-compute/sqlparser-rs) into a python package using `pyO3`.
18
+
`sqloxide` wraps rust bindings for [sqlparser-rs](https://github.com/sqlparser-rs/sqlparser-rs) into a python package using [PyO3](https://pyo3.rs).
19
19
20
20
The original goal of this project was to have a very fast, efficient, and accurate SQL parser I could use for building data lineage graphs across large code bases (think hundreds of auto-generated .sql files). Most existing sql parsing approaches for python are either very slow or not accurate (especially in regards to deeply nested queries, sub-selects and/or table aliases). Looking to the rust community for support, I found the excellent `sqlparser-rs` crate which is quite easy to wrap in python code.
21
21
22
-
## Installation
22
+
## Free-threaded Python Support
23
+
24
+
As of v0.61.0, `sqloxide` ships wheels for free-threaded Python (3.13t, 3.14t). This means you can parse SQL from multiple threads in parallel with the GIL disabled, no locks needed:
25
+
26
+
```python
27
+
import concurrent.futures
28
+
from sqloxide import parse_sql
29
+
30
+
queries = [f"SELECT col_{i} FROM table_{i}"for i inrange(100)]
31
+
32
+
with concurrent.futures.ThreadPoolExecutor(max_workers=8) as pool:
The project provides `manylinux2014` wheels on pypi so it should be compatible with most linux distributions. Native wheels are also now available for OSX and Windows.
36
+
Install a free-threaded Python with [uv](https://docs.astral.sh/uv/):
25
37
26
-
To install from pypi:
38
+
```sh
39
+
uv python install 3.13t
40
+
```
41
+
42
+
## Installation
43
+
44
+
Wheels are available on PyPI for Linux (x86_64, i686, aarch64), macOS (x86_64, ARM), and Windows, covering Python 3.9 through 3.14 (including free-threaded 3.13t and 3.14t).
27
45
28
46
```sh
29
47
pip install sqloxide
@@ -170,7 +188,7 @@ We run 4 benchmarks, comparing to some python native sql parsing libraries:
0 commit comments