Skip to content

Instantly share code, notes, and snippets.

@ekiara
Created November 27, 2013 13:59
Show Gist options
  • Save ekiara/7676136 to your computer and use it in GitHub Desktop.
Save ekiara/7676136 to your computer and use it in GitHub Desktop.
SQL Alchemy SQLITE relative path
#SQL Alchemy SQLITE relative path
# Relative path is the path 'raw' after the three initial slashses
e = create_engine('sqlite:///path/to/database.db')
e = create_engine('sqlite:///relative/path/here.db')
# Absolute path is a slash after the three initial slashses
e = create_engine('sqlite:////tmp/absolute_path_database.db')
@m-primo
Copy link

m-primo commented Nov 10, 2021

Thanks @valhuber

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment