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.4.tar.gz (20.3 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.4-py3-none-any.whl (20.5 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: sqlclasses-1.4.tar.gz
  • Upload date:
  • Size: 20.3 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/5.1.1 CPython/3.10.15

File hashes

Hashes for sqlclasses-1.4.tar.gz
Algorithm Hash digest
SHA256 4264562fbd860d1921df1bd1e8b6f0c702a501722af709ec2bf9097f35a8319c
MD5 d08e4095bc1ce883bdd65bd453cb834c
BLAKE2b-256 01a9d67471f74daae5e72992eb827f815c4ecb108f48df382a4eead68a076d9d

See more details on using hashes here.

File details

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

File metadata

  • Download URL: sqlclasses-1.4-py3-none-any.whl
  • Upload date:
  • Size: 20.5 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/5.1.1 CPython/3.10.15

File hashes

Hashes for sqlclasses-1.4-py3-none-any.whl
Algorithm Hash digest
SHA256 60b9e762a4836d3192d0754226a0137acc25999ee3f5e5296e946092e13b628a
MD5 1db857af9f6fcb4b375cd1bb9fc6f86d
BLAKE2b-256 a1a46139abb8e186ffb0789ffd9826e6e6c31ca03127cff63a6319f4affb1e0a

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