Add user facing API

This commit is contained in:
Luke Murphy 2020-02-28 11:32:58 +00:00
parent 026185cf74
commit d84011bf10
No known key found for this signature in database
GPG Key ID: 5E2EF5A63E3718CC

11
calibrestekje/api.py Normal file
View File

@ -0,0 +1,11 @@
"""User facing API."""
from sqlalchemy import create_engine
from sqlalchemy.orm import Session
from calibrestekje.bindings import * # noqa
def init_session(url: str):
"""Initialise a SQLAlchemy session against a Calibre database."""
return Session(create_engine(url))