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
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file pugsql-0.1.16.tar.gz.
File metadata
- Download URL: pugsql-0.1.16.tar.gz
- Upload date:
- Size: 11.7 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: poetry/0.12.16 CPython/3.7.3 Darwin/18.7.0
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
d5e462313463e30311d62dbf4def5fe035381c2d9ee5ce5a7d9586ff053d4160
|
|
| MD5 |
3e5f875b646981d00a85c347d9946495
|
|
| BLAKE2b-256 |
06b606af0b71496b2ba47ea87d549933ce10955471ea5716744811230c2825e5
|
File details
Details for the file pugsql-0.1.16-py3-none-any.whl.
File metadata
- Download URL: pugsql-0.1.16-py3-none-any.whl
- Upload date:
- Size: 13.6 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: poetry/0.12.16 CPython/3.7.3 Darwin/18.7.0
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
883b1e59615cd848fb64929bbd0458ec2bd9685a4d50021bc1f4759ba0b7b042
|
|
| MD5 |
ca25b3111edc67b07f5d002c50361422
|
|
| BLAKE2b-256 |
dfa19c25a2b801388eb609118babeabac338acffa32655d922b1e529f70236fe
|