A friendly wrapper for SQLAlchemy.

SQLAlchemy is great can be difficult to setup.

So, instead of having to write something like this:

from sqlalchemy import create_engine
from sqlalchemy.ext.declarative import declarative_base
from sqlalchemy.orm import sessionmaker, Column, Integer

engine = create_engine('sqlite:///:memory:')
Session = sessionmaker(bind=engine)
session =
Model = declarative_base()

class ToDo(Model):
    id = Column(Integer, primary_key=True)

session = Session()
todos = session.query(ToDo).all()

with SQLA-Wrapper you can write it like this:

from sqla_wrapper import SQLAlchemy

db = SQLAlchemy('sqlite:///:memory:')

class ToDo(db.Model):
    id = db.Column(db.Integer, primary_key=True)

todos = db.query(ToDo).all()

It can also paginate the results for you.

Since 2.0, only Python 3.6 or later are supported. Please use the 1.9.1 version if your project runs on a previous Python version.

API Reference

If you are looking for information on a specific function, class or method, this part of the documentation is for you.