Skip to main content

Construct SQL commands and queries using Python classes.

from sqlclasses import sql

login = "me"
password = "secret"

query = sql.select( ("firstname", "lastname", "login",),
                    ("users",),
                    sql.where("login = ", sql.string_literal(login),
                              " AND ",
                              "password = ", sql.string_literal(password)) )

print(repr(query))

# >> select: <SELECT firstname, lastname, login FROM users WHERE login = 'me' AND password = 'secret'>

This used to be at the core of my Object Ralational Membrane years ago. I have ported it to Python 3 and re-publish it here. More documentation forthcomming.

Metadata

Release files for sqlclasses 1.5

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for sqlclasses 1.5
File Size Uploaded
sqlclasses-1.5.tar.gz 20.8 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for sqlclasses 1.5
File Interpreter ABI Platform
sqlclasses-1.5-py3-none-any.whl Python 3 none any Details

Total release size: 41.7 kB

Release files / sqlclasses-1.5.tar.gz

Download URL sqlclasses-1.5.tar.gz
Size 20.8 kB
Tags Source
SHA-256 checksum
How to use checksums
ba45f76e7ab752476332dd5434854b5e6e97d5316253884997b48b7f20a5fc87
BLAKE2b-256 checksum
How to use checksums
7f7cad4ebe3d453588ac0782324961f4deaf43e9b8b33c3023bcb092f652777c
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.2.0 CPython/3.13.13

Release files / sqlclasses-1.5-py3-none-any.whl

Download URL sqlclasses-1.5-py3-none-any.whl
Size 20.9 kB
Tags Python 3
SHA-256 checksum
How to use checksums
b58f9d94fb30ab28ffcce8bf55c08fa1721774ae805b7cc2566b3a6b4e1c3f2e
BLAKE2b-256 checksum
How to use checksums
466f9629864c9d52d97774fa1c0f5ee611f4fae3b1e513fd366ea738947aa56b
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.2.0 CPython/3.13.13

Release history Release notifications | RSS feed

This release

1.5 This release

2 release files

1.4

2 release files

1.3

2 release files

1.2

2 release files

1.1

2 release files

1.0

2 release files

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page