/flask-sacore

Flask extension for SQLAlchemy Core

Primary LanguagePython

Flask extension for SQLAlchemy Core.

To be used in projects that do not use the SQLAlchemy ORM, but only the core.

The idea is to start and end a transaction on request boundaries, the way Pyramid is doing this with its Tweens.

A minimal example:

from flask import Flask
from flask_sacore import SACore

app = Flask(__name__)
db = SACore('<sqlalchemy style dsn>', app)

records = db.con.execute("SELECT * FROM schema.table")