add code documentation
This commit is contained in:
parent
4479bd2429
commit
bc842244c7
7 changed files with 261 additions and 31 deletions
|
|
@ -1,3 +1,7 @@
|
|||
"""Script to initialize the database.
|
||||
Serves database url, engine, connection and session.
|
||||
"""
|
||||
|
||||
from sqlalchemy import create_engine
|
||||
from sqlalchemy.orm import Session
|
||||
from sqlalchemy.ext.declarative import declarative_base
|
||||
|
|
@ -9,4 +13,6 @@ session = Session(engine)
|
|||
Base = declarative_base()
|
||||
|
||||
def init_db():
|
||||
"""Initialize the database.
|
||||
"""
|
||||
Base.metadata.create_all(bind=engine)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue