superfunctions-sqlalchemy
SQLAlchemy adapter for superfunctions.db
Location: packages/python-sqlalchemy/
Package: superfunctions-sqlalchemy
Import: from superfunctions_sqlalchemy import create_adapter
Installation
pip install superfunctions-sqlalchemy
# With PostgreSQL
pip install superfunctions-sqlalchemy[postgres]
# With MySQL
pip install superfunctions-sqlalchemy[mysql]
# With async support
pip install superfunctions-sqlalchemy[asyncpg]
Usage
from sqlalchemy import create_engine
from superfunctions_sqlalchemy import create_adapter
# Create SQLAlchemy engine
engine = create_engine("postgresql://user:password@localhost/dbname")
# Create adapter
adapter = create_adapter(engine)
# Use with superfunctions libraries
from authfn import create_authfn, AuthFnConfig
auth = create_authfn(
AuthFnConfig(
database=adapter,
namespace="authfn",
)
)
Features
- ✅ Full CRUD operations
- ✅ Transaction support
- ✅ Batch operations
- ✅ Query builders (where, orderBy, limit, offset)
- ✅ All SQL operators
- ✅ Works with PostgreSQL, MySQL, SQLite
- ✅ Sync and async engines
Example
from sqlalchemy import create_engine
from superfunctions_sqlalchemy import create_adapter
from superfunctions.db import CreateParams, FindManyParams, WhereClause, Operator
engine = create_engine("postgresql://localhost/mydb")
adapter = create_adapter(engine)
# Create
user = await adapter.create(
CreateParams(
model="users",
data={"name": "Alice", "email": "alice@example.com"},
)
)
# Query
users = await adapter.find_many(
FindManyParams(
model="users",
where=[
WhereClause(field="email", operator=Operator.LIKE, value="%@example.com")
],
limit=10,
)
)
License
MIT
Metadata
Release files for superfunctions-sqlalchemy 0.1.0
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | Actions |
|---|---|---|---|---|
| superfunctions_sqlalchemy-0.1.0.tar.gz | 5.1 kB | Without provenance | Details for superfunctions_sqlalchemy-0.1.0.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| superfunctions_sqlalchemy-0.1.0-py3-none-any.whl | Python 3 | none | any | Details for superfunctions_sqlalchemy-0.1.0-py3-none-any.whl |
Total release size: 10.7 kB
Release files / superfunctions_sqlalchemy-0.1.0.tar.gz
| Download URL | superfunctions_sqlalchemy-0.1.0.tar.gz |
|---|---|
| Size | 5.1 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
e4edc30b044f3a5abe65be3155493e5fa034fd61bd02f66ae909485c99b27070
|
|
BLAKE2b-256 checksum How to use checksums |
d074ec8dde95b18c4b54bae4d2e6254b8b4c892002d2c7c1dfd783f0766b775a
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/6.2.0 CPython/3.12.3
|
Release files / superfunctions_sqlalchemy-0.1.0-py3-none-any.whl
| Download URL | superfunctions_sqlalchemy-0.1.0-py3-none-any.whl |
|---|---|
| Size | 5.6 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
17567f809b972f21052a4335e5a5127efcf76fe3b9f8953ab106e41b777ec74c
|
|
BLAKE2b-256 checksum How to use checksums |
49f5325d9986ebbf63a6f7472be8090336afe789004214cebdbcc01236274465
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/6.2.0 CPython/3.12.3
|
Security for superfunctions-sqlalchemy 0.1.0
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
No provenance found
None of the files in this release were uploaded with provenance metadata.
A note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.