Construct SQL commands and queries using Python classes.
```python
from sqlclasses import sql
login = "me"
password = "secred"
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 = 'secred'>
```
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.
Raw data
{
"_id": null,
"home_page": "https://github.com/dvorberg/sqlclasses",
"name": "sqlclasses",
"maintainer": null,
"docs_url": null,
"requires_python": ">=3.7",
"maintainer_email": null,
"keywords": null,
"author": "Diedrich Vorberg",
"author_email": "diedrich@tux4web.de",
"download_url": "https://files.pythonhosted.org/packages/28/a7/85bae3595599b0504306f20e6745c7a006b1f492b0f9bf6ed83b1679a3ce/sqlclasses-1.3.tar.gz",
"platform": null,
"description": "Construct SQL commands and queries using Python classes.\n\n```python\n\nfrom sqlclasses import sql\n\nlogin = \"me\"\npassword = \"secred\"\n\nquery = sql.select( (\"firstname\", \"lastname\", \"login\",),\n (\"users\",),\n sql.where(\"login = \", sql.string_literal(login),\n \" AND \",\n \"password = \", sql.string_literal(password)) )\n\nprint(repr(query))\n\n# >> select: <SELECT firstname, lastname, login FROM users WHERE login = 'me' AND password = 'secred'>\n\n```\n\nThis 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. \n",
"bugtrack_url": null,
"license": null,
"summary": "Construct SQL commands and queries using Python classes.",
"version": "1.3",
"project_urls": {
"Homepage": "https://github.com/dvorberg/sqlclasses"
},
"split_keywords": [],
"urls": [
{
"comment_text": "",
"digests": {
"blake2b_256": "33ba0cc50136d0a984769671e88e39b18ac82ee07203bd73029b8128e6c6af89",
"md5": "6d118928dd7e55a7c76ccf11939e0e8a",
"sha256": "8fdba258115f042a9667bef3e1dfe8b6990cab3230f1a5fad9fe8add888ca725"
},
"downloads": -1,
"filename": "sqlclasses-1.3-py3-none-any.whl",
"has_sig": false,
"md5_digest": "6d118928dd7e55a7c76ccf11939e0e8a",
"packagetype": "bdist_wheel",
"python_version": "py3",
"requires_python": ">=3.7",
"size": 20355,
"upload_time": "2024-09-04T21:32:30",
"upload_time_iso_8601": "2024-09-04T21:32:30.056205Z",
"url": "https://files.pythonhosted.org/packages/33/ba/0cc50136d0a984769671e88e39b18ac82ee07203bd73029b8128e6c6af89/sqlclasses-1.3-py3-none-any.whl",
"yanked": false,
"yanked_reason": null
},
{
"comment_text": "",
"digests": {
"blake2b_256": "28a785bae3595599b0504306f20e6745c7a006b1f492b0f9bf6ed83b1679a3ce",
"md5": "ec9a2f3a85d3dacf3145c056dc412ebc",
"sha256": "c4691008a01ad66b0260e693b34ac531666e63d24da78b6dced20b11500fa972"
},
"downloads": -1,
"filename": "sqlclasses-1.3.tar.gz",
"has_sig": false,
"md5_digest": "ec9a2f3a85d3dacf3145c056dc412ebc",
"packagetype": "sdist",
"python_version": "source",
"requires_python": ">=3.7",
"size": 20158,
"upload_time": "2024-09-04T21:32:32",
"upload_time_iso_8601": "2024-09-04T21:32:32.109922Z",
"url": "https://files.pythonhosted.org/packages/28/a7/85bae3595599b0504306f20e6745c7a006b1f492b0f9bf6ed83b1679a3ce/sqlclasses-1.3.tar.gz",
"yanked": false,
"yanked_reason": null
}
],
"upload_time": "2024-09-04 21:32:32",
"github": true,
"gitlab": false,
"bitbucket": false,
"codeberg": false,
"github_user": "dvorberg",
"github_project": "sqlclasses",
"travis_ci": false,
"coveralls": false,
"github_actions": false,
"lcname": "sqlclasses"
}