Skip to main content

Construct SQL commands and queries using Python classes.

Project description

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.

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

sqlclasses-1.5.tar.gz (20.8 kB view details)

Uploaded Source

Built Distribution

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

sqlclasses-1.5-py3-none-any.whl (20.9 kB view details)

Uploaded Python 3

File details

Details for the file sqlclasses-1.5.tar.gz.

File metadata

  • Download URL: sqlclasses-1.5.tar.gz
  • Upload date:
  • Size: 20.8 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.13.13

File hashes

Hashes for sqlclasses-1.5.tar.gz
Algorithm Hash digest
SHA256 ba45f76e7ab752476332dd5434854b5e6e97d5316253884997b48b7f20a5fc87
MD5 722f1152a9e1a98f5cd33842596f21ce
BLAKE2b-256 7f7cad4ebe3d453588ac0782324961f4deaf43e9b8b33c3023bcb092f652777c

See more details on using hashes here.

File details

Details for the file sqlclasses-1.5-py3-none-any.whl.

File metadata

  • Download URL: sqlclasses-1.5-py3-none-any.whl
  • Upload date:
  • Size: 20.9 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.13.13

File hashes

Hashes for sqlclasses-1.5-py3-none-any.whl
Algorithm Hash digest
SHA256 b58f9d94fb30ab28ffcce8bf55c08fa1721774ae805b7cc2566b3a6b4e1c3f2e
MD5 4f718357c607b6d8b02f72c4b2208c39
BLAKE2b-256 466f9629864c9d52d97774fa1c0f5ee611f4fae3b1e513fd366ea738947aa56b

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