Python SQL

Open-source Python projects categorized as SQL

Top 23 Python SQL Projects

  1. 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-25

    DevOps Exercises Interview prep + practical questions

  2. 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.

    InfluxDB logo
  3. pandas-ai

    Chat with your database or your datalake (SQL, CSV, parquet). PandasAI makes data analysis conversational using LLMs and RAG.

    Project mention: PandaAI: Talk to Your Data, Not to Your Code! | dev.to | 2025-05-06

    View the Project on GitHub

  4. vanna

    🤖 Chat with your SQL database 📊. Accurate Text-to-SQL Generation via LLMs using RAG 🔄.

    Project mention: Supercharging Obsidian Search with AI and Ollama | dev.to | 2024-11-26

    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).

  5. sqlmodel

    SQL databases in Python, designed for simplicity, compatibility, and robustness.

    Project mention: Architecture Patterns with Python | news.ycombinator.com | 2025-03-28

    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

    The Database Toolkit for Python

    Project mention: 10 Useful Tools and Libraries for Python Developers | dev.to | 2025-03-29

    6. SQLAlchemy - Database Interaction using ORM

  7. q

    q - Run SQL directly on delimited files and multi-file sqlite databases (by harelba)

    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/

  8. modin

    Modin: Scale your Pandas workflows by changing a single line of code

  9. SaaSHub

    SaaSHub - Software Alternatives and Reviews. SaaSHub helps you find the best software and product alternatives

    SaaSHub logo
  10. datasette

    An open source multi-tool for exploring and publishing data

    Project mention: Gmail to SQLite | news.ycombinator.com | 2025-05-09

    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.

  11. sqlfluff

    A modular SQL linter and auto-formatter with support for multiple dialects and templated code.

  12. 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

    Project mention: Wk 3 Orchestration: MLOPs with DataTalks | dev.to | 2025-02-22

    Here, we use the free Mage Ai orchestration tool.

  13. sqlglot

    Python SQL Parser and Transpiler

    Project mention: Ask HN: What are you working on? (April 2025) | news.ycombinator.com | 2025-04-27

    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

  14. ibis

    the portable Python dataframe library

    Project mention: Coding as Craft: Going Back to the Old Gym | news.ycombinator.com | 2025-04-22

    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/

  15. 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/

    Project mention: Top 8 Open-Source CRUD Projects with the Most GitHub Stars | dev.to | 2024-09-04

    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/

  16. dataset

    Easy-to-use data handling for SQL data stores with support for implicit table creation, bulk loading, and transactions.

  17. dataherald

    Interact with your SQL database, Natural Language to SQL using LLMs

    Project mention: AIM Weekly 27 May 2024 | dev.to | 2024-05-28
  18. alembic

    A database migrations tool for SQLAlchemy.

    Project mention: Setting up a standalone SQLAlchemy 2.0 ORM application | dev.to | 2024-05-20

    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.

  19. 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

  20. 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-02

    You got it! You'll need three values set in settings.py:

    https://github.com/explorerhq/django-sql-explorer/blob/64170...

    ```

  21. 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-24

    PyPika: I don't know much about this one.

  22. pg_activity

    pg_activity is a top like application for PostgreSQL server activity monitoring.

    Project mention: Pg_activity: Htop for PostgreSQL | news.ycombinator.com | 2025-05-13
  23. sqlmesh

    Scalable and efficient data transformation framework - backwards compatible with dbt.

  24. fugue

    A unified interface for distributed computing. Fugue executes SQL, Python, Pandas, and Polars code on Spark, Dask and Ray without any rewrites.

  25. learning

    Learning Shell,Python,Golang,System,Network (by anzhihe)

  26. SaaSHub

    SaaSHub - Software Alternatives and Reviews. SaaSHub helps you find the best software and product alternatives

    SaaSHub logo
NOTE: The open source projects on this list are ordered by number of github stars. The number of mentions indicates repo mentiontions in the last 12 Months or since we started tracking (Dec 2020).

Python SQL discussion

Log in or Post with

Python SQL related posts

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

Sponsored
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.
www.influxdata.com

Did you know that Python is
the 2nd most popular programming language
based on number of references?