Holy moley is it hard to do MUCK stuff relationally.
This commit is contained in:
parent
c72417e5e4
commit
d9ed6d5cd7
8 changed files with 89 additions and 24 deletions
14
muck/app.py
Normal file
14
muck/app.py
Normal file
|
|
@ -0,0 +1,14 @@
|
|||
from sqlalchemy import create_engine
|
||||
from sqlalchemy.orm import sessionmaker, scoped_session
|
||||
|
||||
from muck.models.dbref import Base
|
||||
from muck.init import bootstrap_world
|
||||
|
||||
engine = create_engine("sqlite:///muck.db", echo=True)
|
||||
SessionLocal = scoped_session(sessionmaker(bind=engine))
|
||||
|
||||
Base.metadata.create_all(engine)
|
||||
|
||||
session = SessionLocal()
|
||||
|
||||
bootstrap_world(session)
|
||||
Loading…
Add table
Add a link
Reference in a new issue