PugSQL is an anti-ORM that facilitates interacting with databases using SQL in files.
Project description
PugSQL is a simple Python interface for using parameterized SQL, in files, with any SQLAlchemy-supported database.
For more information and full documentation, visit pugsql.org.
import pugsql
# Create a module of database functions from a set of sql files on disk.
queries = pugsql.module('resources/sql')
# Point the module at your database.
queries.connect('sqlite:///foo.db')
# Invoke parameterized queries, receive dicts!
user = queries.find_user(user_id=42)
# -> { 'user_id': 42, 'username': 'mcfunley' }
In the example above, the query would be specified like this:
--- :name find_user :one
select * from users where user_id = :user_id
So throw away your bulky ORM and talk to your database the way the gods intended! Install PugSQL today!
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
File details
Details for the file pugsql-0.3.5.tar.gz
.
File metadata
- Download URL: pugsql-0.3.5.tar.gz
- Upload date:
- Size: 11.5 kB
- Tags: Source
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.12.9
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 |
d47991d67fc7615e5aa14d1df6c3fb08c1f161d35fb4d76291950390c65fb507
|
|
MD5 |
2f2f06e9b47cfa553bae9b90a56fbdb6
|
|
BLAKE2b-256 |
cb84823f076dbc4864ff95aa8d8782848a1cd04e688b1e91e297470bbf36ed8b
|
Provenance
The following attestation bundles were made for pugsql-0.3.5.tar.gz
:
Publisher:
release.yml
on mcfunley/pugsql
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1
-
Predicate type:
https://docs.pypi.org/attestations/publish/v1
-
Subject name:
pugsql-0.3.5.tar.gz
-
Subject digest:
d47991d67fc7615e5aa14d1df6c3fb08c1f161d35fb4d76291950390c65fb507
- Sigstore transparency entry: 185788668
- Sigstore integration time:
-
Permalink:
mcfunley/pugsql@845ad7d5621b9df0b81aba5cae8ba4bbb4ea85b8
-
Branch / Tag:
refs/tags/v0.3.5
- Owner: https://github.com/mcfunley
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com
-
Runner Environment:
github-hosted
-
Publication workflow:
release.yml@845ad7d5621b9df0b81aba5cae8ba4bbb4ea85b8
-
Trigger Event:
push
-
Statement type:
File details
Details for the file pugsql-0.3.5-py3-none-any.whl
.
File metadata
- Download URL: pugsql-0.3.5-py3-none-any.whl
- Upload date:
- Size: 14.2 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.12.9
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 |
a76e2e866860b28291de45d9dfd3293be4c78ecc0d09ec5e764827ec5259c23c
|
|
MD5 |
195aab149e1d68ffe9f40c3ffb73e5bf
|
|
BLAKE2b-256 |
6ba9095c9e4801bc505b8f7b6321cda17840d0c3c0e8e522f0497b28366f60a4
|
Provenance
The following attestation bundles were made for pugsql-0.3.5-py3-none-any.whl
:
Publisher:
release.yml
on mcfunley/pugsql
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1
-
Predicate type:
https://docs.pypi.org/attestations/publish/v1
-
Subject name:
pugsql-0.3.5-py3-none-any.whl
-
Subject digest:
a76e2e866860b28291de45d9dfd3293be4c78ecc0d09ec5e764827ec5259c23c
- Sigstore transparency entry: 185788669
- Sigstore integration time:
-
Permalink:
mcfunley/pugsql@845ad7d5621b9df0b81aba5cae8ba4bbb4ea85b8
-
Branch / Tag:
refs/tags/v0.3.5
- Owner: https://github.com/mcfunley
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com
-
Runner Environment:
github-hosted
-
Publication workflow:
release.yml@845ad7d5621b9df0b81aba5cae8ba4bbb4ea85b8
-
Trigger Event:
push
-
Statement type: