Skip to main content

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


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

pugsql-0.1.19.tar.gz (11.9 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

pugsql-0.1.19-py3-none-any.whl (13.9 kB view details)

Uploaded Python 3

File details

Details for the file pugsql-0.1.19.tar.gz.

File metadata

  • Download URL: pugsql-0.1.19.tar.gz
  • Upload date:
  • Size: 11.9 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: poetry/1.0.10 CPython/3.8.2 Darwin/19.5.0

File hashes

Hashes for pugsql-0.1.19.tar.gz
Algorithm Hash digest
SHA256 1ed46b182edf8f23f56a828663b8f2e9863d4ab082d59e8415a4d558e4947748
MD5 1b38c88c3f91dbb7b98a5e2c80afe8ec
BLAKE2b-256 7469d538c9e64c7c2d1f4327713441934d5f3b4aa0443d0488b13a6acb5aba52

See more details on using hashes here.

File details

Details for the file pugsql-0.1.19-py3-none-any.whl.

File metadata

  • Download URL: pugsql-0.1.19-py3-none-any.whl
  • Upload date:
  • Size: 13.9 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: poetry/1.0.10 CPython/3.8.2 Darwin/19.5.0

File hashes

Hashes for pugsql-0.1.19-py3-none-any.whl
Algorithm Hash digest
SHA256 fbdc9713f653ab50d76fc1fbd2ec35e8d65a2d2ab635347f43ed40876fae92a3
MD5 4440fc445dd717e2a6487ed1ef6cc73d
BLAKE2b-256 e38ffa5fad4064736ecabdfdb1d4cf260c69d1c1dc60a8c4c799f185e1724e91

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page