Use sqloxide with free-threaded Python
mainAs of v0.61.0, sqloxide supports free-threaded Python (3.13t, 3.14t). You can parse SQL from multiple threads in parallel without the Global Interpreter Lock (GIL) and without needing manual locks, making it highly efficient for parallel processing.
import concurrent.futures
from sqloxide import parse_sql
queries = [f"SELECT col_{i} FROM table_{i}" for i in range(100)]
# Works efficiently in parallel on free-threaded Python builds
with concurrent.futures.ThreadPoolExecutor(max_workers=8) as pool:
results = list(pool.map(lambda q: parse_sql(sql=q, dialect="generic"), queries))