Skip to content

Instantly share code, notes, and snippets.

@piotrkilczuk
Last active June 4, 2021 11:31
Show Gist options
  • Save piotrkilczuk/9f03ff2a20a923085242eade1c4b6c35 to your computer and use it in GitHub Desktop.
Save piotrkilczuk/9f03ff2a20a923085242eade1c4b6c35 to your computer and use it in GitHub Desktop.
from sqlalchemy import create_engine
from sqlalchemy.orm import Session
engine = create_engine("sqlite:///mydatabase.db")
connection = engine.connect()
transaction = connection.begin()
session = Session(bind=connection)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment