Skip to main content

Thin wrapper on top of SQL that enables you write SQL code in python easily

Project description

SuperSQL: SQL for Humans

SuperSQL is a powerful, pythonic SQL query builder that lets you write SQL using native Python objects.

It is NOT an ORM. There are no magic .save() methods, no hidden lazy-loading, and no confusing state management. You write explicit SQL queries (SELECT, INSERT, UPDATE) using a fluent Python API that looks and feels like SQL, but with the power of Python's type system and tooling.


Features

  • Pythonic Syntax: Write SQL using chainable Python methods (.SELECT().FROM().WHERE()).
  • Type Safe: Define tables using Python classes for autocomplete and validation.
  • Vendor Agnostic: Support for PostgreSQL, MySQL, SQLite, Oracle, and SQL Server.
  • Async & Sync: Built for modern async Python (asyncio) but supports sync execution.
  • No Magic: You control the exact SQL being generated.
  • Pytastic Integration: Built-in schema validation using Pytastic.

Installation

# Install with PostgreSQL support
pip install supersql[postgres]

# Or with all drivers
pip install supersql[postgres,mysql,sqlite]

Quick Start

from supersql import Query, Table

# 1. Connect to your database
query = Query("postgres", database="mydb")

# 2. Define your Table (Dynamic, no class needed!)
users = Table("users")

# 3. Write Pythonic SQL
# SELECT name, email FROM users WHERE age > 25
results = await query.SELECT(
    users.name, users.email
).FROM(
    users
).WHERE(
    users.age > 25
).run()

Why SuperSQL?

SuperSQL gives you the power of a Query Builder without the overhead of an ORM.

  1. Zero Boilerplate: No need to define classes or duplicate your schema in Python.
  2. Explicit Control: You control the exact SQL execution.
  3. Dynamic: Works great with ad-hoc queries or evolving schemas.

Read the Documentation

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

supersql-2026.3.30.tar.gz (34.6 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

supersql-2026.3.30-py3-none-any.whl (46.1 kB view details)

Uploaded Python 3

File details

Details for the file supersql-2026.3.30.tar.gz.

File metadata

  • Download URL: supersql-2026.3.30.tar.gz
  • Upload date:
  • Size: 34.6 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: poetry/2.3.2 CPython/3.12.3 Linux/6.17.0-19-generic

File hashes

Hashes for supersql-2026.3.30.tar.gz
Algorithm Hash digest
SHA256 18a2d0261d59f6991970231e1585a9ca771afd997101aa26db35d4a584d4bb4d
MD5 b19697e3d812deb773e021b46df898a2
BLAKE2b-256 6d54f9f1acd6c939a42b428d160761b43403d5f6c18a796739b6b07aa9b4acf1

See more details on using hashes here.

File details

Details for the file supersql-2026.3.30-py3-none-any.whl.

File metadata

  • Download URL: supersql-2026.3.30-py3-none-any.whl
  • Upload date:
  • Size: 46.1 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: poetry/2.3.2 CPython/3.12.3 Linux/6.17.0-19-generic

File hashes

Hashes for supersql-2026.3.30-py3-none-any.whl
Algorithm Hash digest
SHA256 b9c770e48df3cd1729489f84e7d69db5ddc3dbff3f4df65eadc00c63a8d2b60c
MD5 23b7c3eaa33e11357b991d346b55fcf6
BLAKE2b-256 1ce36cf6a39fdd232f2150b2f5c7e89676b2e234e2a50df376d2a7994606cc8f

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page