SQLoad
A simple utility tool that scan SQL files with queries separated by comments into python dicts.
Usage
Given a file called queries.sql with the following content:
-- find-all-by-name
SELECT * FROM users WHERE name = :name
-- find-one-by-id
SELECT * FROM users WHERE id = 10 LIMIT 1
-- find-users-join-products
SELECT * FROM users u
INNER JOIN products p ON u.id = p.user_id
WHERE u.id = 1
LIMIT 1
You can load those queries into dicts as follow:
from sqload import load
q = load('queries.sql')
assert q['find-all-by-name'] == "SELECT * FROM users WHERE name = :name"
Metadata
Release files for sqload 0.1.0
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 | Actions |
|---|---|---|---|---|
| sqload-0.1.0.tar.gz | 1.7 kB | Without provenance | Details for sqload-0.1.0.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| sqload-0.1.0-py3-none-any.whl | Python 3 | none | any | Details for sqload-0.1.0-py3-none-any.whl |
Total release size: 4.4 kB
Release files / sqload-0.1.0.tar.gz
| Download URL | sqload-0.1.0.tar.gz |
|---|---|
| Size | 1.7 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
c2faf7afe4fd4e1ca21a85c2409adbd42e8f4174a6325c548f6f398e929a635d
|
|
BLAKE2b-256 checksum How to use checksums |
45684f19359a2f21a532d8d8db4e7dd49721b87ce806bb9ecee5da004605515a
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/2.0.0 pkginfo/1.5.0.1 requests/2.22.0 setuptools/41.2.0 requests-toolbelt/0.9.1 tqdm/4.36.1 CPython/3.7.4
|
Release files / sqload-0.1.0-py3-none-any.whl
| Download URL | sqload-0.1.0-py3-none-any.whl |
|---|---|
| Size | 2.7 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
f5863a4b5fc3f681b36ac0d293a702ac1157b1e53ebfd2983d9e0a60de56ef53
|
|
BLAKE2b-256 checksum How to use checksums |
d64699c3cc3b2e45a1f0fa523a7b01babfa02c8683534d3dd734c7f89f1bcf56
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/2.0.0 pkginfo/1.5.0.1 requests/2.22.0 setuptools/41.2.0 requests-toolbelt/0.9.1 tqdm/4.36.1 CPython/3.7.4
|
Security for sqload 0.1.0
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.