flask-sqlalchemy
flask-sqlalchemy copied to clipboard
Adds SQLAlchemy support to Flask
I need to retrieve data from several databases, same data model, different data. ```py class SomeModel(db.Model): id = db.Column(db.Integer, primary_key=True, nullable=False) site = db.Column(db.String) other = db.Column(db.String) ``` ```py app...
Backwards compatible change to address #327 ~~I'm of two minds about the place in the documentation. I was thinking of merging the customizing and configuration pages into one (which is...
The Metaclass Mixin classes now accept and propagate additional keywords provided. The name `**kw` has been chosen to stay consistent with [SQLAlchemy](https://github.com/sqlalchemy/sqlalchemy/blob/master/lib/sqlalchemy/orm/decl_api.py#L56). - fixes #1002 Checklist: - [x] Add tests...
Currently, the metaclass mixins provided by flask-sqlalchemy do not accept additional keyword arguments. Due to that, it breaks compatibility to the `__init_subclass_` hook. The bug was present in SQLAlchemy, and...
Hello, I'm loading a sqlite3 database, which is stored on disk to memory via: ```python source = sqlite3.connect(os.path.abspath('./db-auth.sqlite')) dest = sqlite3.connect("file:{}?mode=memory&cache=shared".format(sqlite_shared_name), uri=True) source.backup(dest) ``` Regarding to this SO answer (...
The goal of this is to fix #666.
Documentation for flask_sqlalchemy paginate class When error_out is True (default), the following rules will cause a 404 response: - No items are found and page is not 1. - page...
Rebased, squashed and pytest-ified version of #447 Thanks @fantix for this contribution
This PR fixes the issue reported in #645 by checking whether the current transaction is nested in the `before_commit` and `after_commit` handlers, and not doing anything if that's the case....
CLI support
Basic CLI support for Flask-SQLAlchemy, modeled after [the CLI support in Flask-Security](https://github.com/mattupstate/flask-security/blob/develop/flask_security/cli.py). Supports the following command: * `flask db create`