Skip to main content

With PySQLe you can easily write parameterized SQL queries in Python, and run it against any SQLAlchemy-supported database.

Project description

With PySQLe you can easily write parameterized SQL queries in Python, and run it against any SQLAlchemy-supported database.

from pysqle import PysqleModule, one

class MyQueries(PysqleModule):
    @one
    def find_user(self, user_id:):
        return "select * from users where user_id = :user_id"

# Create the module and directly connect to the database
queries = MyQueries("sqlite:///foo.db")

# Invoke queries
user = queries.find_user(user_id=666)

print(repr(user))            #  (666, 'thebeast')
print(repr(user._asdict()))  #  {'user_id': 666, 'username': 'thebeast'}

This is the way of running SQL with Python. Install PySQLe 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

pysqle-0.1.0.tar.gz (4.8 kB view details)

Uploaded Source

Built Distribution

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

pysqle-0.1.0-py3-none-any.whl (6.0 kB view details)

Uploaded Python 3

File details

Details for the file pysqle-0.1.0.tar.gz.

File metadata

  • Download URL: pysqle-0.1.0.tar.gz
  • Upload date:
  • Size: 4.8 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: poetry/2.4.1 CPython/3.14.6 Darwin/24.6.0

File hashes

Hashes for pysqle-0.1.0.tar.gz
Algorithm Hash digest
SHA256 c830b83e04af2082d2e7e5f5f321d45f2e4e3615e1a34433530548fa3583421d
MD5 abd085a829a7aa0a8a8f63a300034f05
BLAKE2b-256 9d253730b280836f82e5f8592d9ac1253f6a937b04340fb0cfdc57380e78e029

See more details on using hashes here.

File details

Details for the file pysqle-0.1.0-py3-none-any.whl.

File metadata

  • Download URL: pysqle-0.1.0-py3-none-any.whl
  • Upload date:
  • Size: 6.0 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: poetry/2.4.1 CPython/3.14.6 Darwin/24.6.0

File hashes

Hashes for pysqle-0.1.0-py3-none-any.whl
Algorithm Hash digest
SHA256 9f899ebb008049e5875d6f4f5d411fc0019b7b15948ca0d1b229aecb7f8b917e
MD5 cc1a2589694e3e143df379997ffb941c
BLAKE2b-256 3a1d108e1bbe1586c05e26e2896656e9a3555251670761d012fe24457653ec89

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