SaaSHub helps you find the best software and product alternatives Learn more →
Top 23 Python SQL Projects
-
devops-exercises
Linux, Jenkins, AWS, SRE, Prometheus, Docker, Python, Ansible, Git, Kubernetes, Terraform, OpenStack, SQL, NoSQL, Azure, GCP, DNS, Elastic, Network, Virtualization. DevOps Interview Questions
Project mention: Struggling to Learn DevOps? Here’s How to Master It in Just 30 Days | dev.to | 2025-04-25DevOps Exercises Interview prep + practical questions
-
InfluxDB
InfluxDB – Built for High-Performance Time Series Workloads. InfluxDB 3 OSS is now GA. Transform, enrich, and act on time series data directly in the database. Automate critical tasks and eliminate the need to move data externally. Download now.
-
pandas-ai
Chat with your database or your datalake (SQL, CSV, parquet). PandasAI makes data analysis conversational using LLMs and RAG.
View the Project on GitHub
-
Essentially this solution is to let the AI *formulate the search* expression and not do the search itself (similar to the concept of generating a SQL statement instead of executing it https://github.com/vanna-ai/vanna).
-
an SQLModel entity backed by a database table doesn't validate its fields on creation, which is the point of Pydantic.
https://github.com/fastapi/sqlmodel/issues/52#issuecomment-1...
-
6. SQLAlchemy - Database Interaction using ORM
-
Project mention: XAN: A Modern CSV-Centric Data Manipulation Toolkit for the Terminal | news.ycombinator.com | 2025-03-27
I used to use q for this sort of thing. Not sure if there are better choices now as it have been a few years.
https://harelba.github.io/q/
-
-
SaaSHub
SaaSHub - Software Alternatives and Reviews. SaaSHub helps you find the best software and product alternatives
-
A couple of reasons which pop to mind:
- Searching a plain text data file is O(n). Searching a SQLite database that has been properly indexed, which is very easy to do nowadays with FTS5, is O(log n) worst case scenario and O(1) in the best case. This doesn't explain why SQLite over a dataframe or anything, but it definitely justifies it over plain text for large email collections.
- SQLite is really easy to write custom views and programs around. Virtually every major programming language can work with it without issue. See also: simonw's wonderful https://datasette.io/ .
- SQLite is an accepted archival format by the Library of Congress, if you ever want to go down the rabbit hole of digital preservation.
-
sqlfluff
A modular SQL linter and auto-formatter with support for multiple dialects and templated code.
-
Mage
🧙 The modern replacement for Airflow. Mage is an open-source data pipeline tool for transforming and integrating data. https://github.com/mage-ai/mage-ai
Here, we use the free Mage Ai orchestration tool.
-
Thanks for the suggestion! I am using https://github.com/tobymao/sqlglot, which magically supports most SQL dialects. And yes, support for DuckDB is also in future plans
-
I felt the same - have to relearn/lookup everything every time I went back to a project or wanted to do some operations that are simple to describe in SQL but I couldn't wrap my mind around e.g. using multi-indexed dataframes & aggregations properly. These days, I always jump to Polars instead of Pandas - much more intuitive and consistent API. Tons of props to Pandas for all that they did (and continue to do) in the data space, but their API did not evolve very well IMO.
I've also been wanting to play with Ibis[1] recently, but Polars has been sufficient for me.
[1] https://ibis-project.org/
-
Flask-AppBuilder
Simple and rapid application development framework, built on top of Flask. includes detailed security, auto CRUD generation for your models, google charts and much more. Demo (login with guest/welcome) - http://flaskappbuilder.pythonanywhere.com/
GitHub https://github.com/dpgaspar/Flask-AppBuilder GitHub Stars 4.6k Most Recent Update on GitHub 2 days ago Open Source License BSD-3-Clause Number of Active Contributors This Year 11 Acceptance of External PRs Yes Official Website / Documentation https://flask-appbuilder.readthedocs.io/en/latest/
-
dataset
Easy-to-use data handling for SQL data stores with support for implicit table creation, bulk loading, and transactions.
-
-
The ORM is built on top of this Core foundation. It expands upon it through a domain object model that is mapped to a database schema. This means you can have classes that are mapped to the database tables and columns, and implement different operations in an object-oriented way. This can be further expanded with external tools such as Alembic, which is a migration tool, or marshmallow, which is a serialization tool.
-
ethereum-etl
Python scripts for ETL (extract, transform and load) jobs for Ethereum blocks, transactions, ERC20 / ERC721 tokens, transfers, receipts, logs, contracts, internal transactions. Data is available in Google BigQuery https://goo.gl/oY5BCQ
-
django-sql-explorer
SQL reporting that Just Works. Fast, simple, and confusion-free. Write and share queries in a delightful SQL editor, with AI assistance.
Project mention: Show HN: SQL Explorer – Open-source reporting tool that just works | news.ycombinator.com | 2024-07-02You got it! You'll need three values set in settings.py:
https://github.com/explorerhq/django-sql-explorer/blob/64170...
```
-
PyPika
PyPika is a python SQL query builder that exposes the full richness of the SQL language using a syntax that reflects the resulting query. PyPika excels at all sorts of SQL queries but is especially useful for data analysis.
Project mention: FastAPI, Pydantic, Psycopg3: the holy trinity for Python web APIs | dev.to | 2024-10-24PyPika: I don't know much about this one.
-
-
-
fugue
A unified interface for distributed computing. Fugue executes SQL, Python, Pandas, and Polars code on Spark, Dask and Ray without any rewrites.
-
-
SaaSHub
SaaSHub - Software Alternatives and Reviews. SaaSHub helps you find the best software and product alternatives
Python SQL discussion
Python SQL related posts
-
Pg_activity: Htop for PostgreSQL
-
Composite Data Engine: Augmenting Trino with DuckDB AsOf Join
-
Architecture Patterns with Python
-
Xorq – open-source Python-first Pandas-style pipelines without the headaches
-
Ask HN: SQL ORM with nested atomic updates?
-
Duckberg!
-
Ask HN: Python ORM Solutions in 2025?
-
A note from our sponsor - SaaSHub
www.saashub.com | 15 May 2025
Index
What are some of the best open-source SQL projects in Python? This list will help you:
# | Project | Stars |
---|---|---|
1 | devops-exercises | 75,802 |
2 | pandas-ai | 20,042 |
3 | vanna | 17,487 |
4 | sqlmodel | 15,873 |
5 | SQLAlchemy | 10,412 |
6 | q | 10,278 |
7 | modin | 10,147 |
8 | datasette | 10,006 |
9 | sqlfluff | 8,854 |
10 | Mage | 8,312 |
11 | sqlglot | 7,675 |
12 | ibis | 5,732 |
13 | Flask-AppBuilder | 4,820 |
14 | dataset | 4,798 |
15 | dataherald | 3,495 |
16 | alembic | 3,292 |
17 | ethereum-etl | 3,017 |
18 | django-sql-explorer | 2,821 |
19 | PyPika | 2,672 |
20 | pg_activity | 2,587 |
21 | sqlmesh | 2,304 |
22 | fugue | 2,081 |
23 | learning | 2,011 |