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)
| File | Size | Uploaded | |
|---|---|---|---|
| sqlclasses-1.5.tar.gz | 20.8 kB | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| 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
|