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.3.7.tar.gz (12.0 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.3.7-py3-none-any.whl (14.8 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: pugsql-0.3.7.tar.gz
  • Upload date:
  • Size: 12.0 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.7

File hashes

Hashes for pugsql-0.3.7.tar.gz
Algorithm Hash digest
SHA256 899efc5000854bcd1d3ecda65e7eb0e08679716dacf175cc2191c9c2f2f82615
MD5 b4d62a36a0db716a2abeaef09a4f7626
BLAKE2b-256 0d9d24ec72b248e7c43f4e0373aa01e3d596dc96d14a99629b856e5d4cdc4edc

See more details on using hashes here.

Provenance

The following attestation bundles were made for pugsql-0.3.7.tar.gz:

Publisher: release.yml on mcfunley/pugsql

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

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

File metadata

  • Download URL: pugsql-0.3.7-py3-none-any.whl
  • Upload date:
  • Size: 14.8 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.7

File hashes

Hashes for pugsql-0.3.7-py3-none-any.whl
Algorithm Hash digest
SHA256 c03729d4ef741c4d943838cfce4faa93d531a4ebd9caa38f69550d079e748229
MD5 b2ca7a3de9dfad62ac7c102555d34c71
BLAKE2b-256 2b9b0f6dfddc4dcc6fc6280be75f865ced3bfb00eaed6e05586d85e5814a7a70

See more details on using hashes here.

Provenance

The following attestation bundles were made for pugsql-0.3.7-py3-none-any.whl:

Publisher: release.yml on mcfunley/pugsql

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

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