Metadata-Version: 2.4
Name: pysqle
Version: 0.1.0
Summary: With PySQLe you can easily write parameterized SQL queries in Python, and run it against any SQLAlchemy-supported database.
License-Expression: MIT
License-File: LICENSE
Keywords: sql,database,relational
Author: Doeke Zanstra
Author-email: doeke@zanstra.net
Requires-Python: >=3.9
Classifier: Programming Language :: Python :: 3
Classifier: Operating System :: OS Independent
Classifier: Development Status :: 4 - Beta
Classifier: License :: OSI Approved :: MIT License
Classifier: Intended Audience :: Developers
Classifier: Topic :: Database :: Front-Ends
Requires-Dist: sqlalchemy (>=2.0.31,<3.0.0)
Project-URL: Homepage, https://codeberg.org/doekman/PySQLe
Description-Content-Type: text/markdown

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

```python
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!


[SQLAlchemy]: https://docs.sqlalchemy.org/ "The Python SQL Toolkit and Object Relational Mapper."

