=====================================
What's that?
-----------
Is a library that you can use to build sql queries if your are accustomed to use Django ORM
How to use
----------
There are 4 main objects Q, F, QuerySet and SQLModel.
Using it
---------------
.. code-block:: python
from sqlquerybuilder import SQLModel, Queryset, Q, F
class Client(SQLModel):
table = "clients"
Client.objects.filter(name="Jhon").exclude(lastname="Doe").group_by("family")
sql = Queryset("clients").filter(name="Jhon").exclude(lastname="Doe").group_by("family")
sql = Client.objects.filter(Q(name="John") & ~Q(lastname="Doe"))
sql.group_by("family")
sql = Queryset("users")\
.filter(nombre="jose")\
.order_by( "nombre", "-fecha")\
.filter(fecha__lte=F("now()"))[:10]
"SELECT * FROM users WHERE ((nombre='jose') AND (fecha<=now())) ORDER BY nombre, fecha DESC LIMIT 10"
Queryset("usuarios").values("name").extra({'select': 'count(*) as total'})
"SELECT name , count(*) as total FROM usuarios"
Metadata
Release files for sqlquerybuilder 0.0.13
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | |
|---|---|---|---|---|
| sqlquerybuilder-0.0.13.tar.gz | 6.0 kB | Without provenance | Details |
Release files / sqlquerybuilder-0.0.13.tar.gz
| Download URL | sqlquerybuilder-0.0.13.tar.gz |
|---|---|
| Size | 6.0 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
461c2b70aa867ca81a7f61bc19884b8cb3344e5070180f97c9580d28a202f4ae
|
|
BLAKE2b-256 checksum How to use checksums |
1ae411ad634b1cde1ffc2ba10909dd3e33439c3bd2063254bd7d9a9334929c22
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
Security for sqlquerybuilder 0.0.13
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
No provenance found
None of the files in this release were uploaded with provenance metadata.
A note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.