Example #1
0
File: env.py Project: neoden/typo
from __future__ import with_statement

import sys
import os
import configparser

from alembic import context
from sqlalchemy import engine_from_config, pool, create_engine
from logging.config import fileConfig

sys.path.append(os.getcwd())

from typo import create_app
from typo.core import db

app = create_app('config.local.py', purpose='alembic')

# this is the Alembic Config object, which provides
# access to the values within the .ini file in use.
config = context.config

# Interpret the config file for Python logging.
# This line sets up loggers basically.
fileConfig(config.config_file_name)

# add your model's MetaData object here
# for 'autogenerate' support
# from myapp import mymodel
# target_metadata = mymodel.Base.metadata
target_metadata = db.metadata
Example #2
0
File: env.py Project: neoden/typo
from __future__ import with_statement

import sys
import os
import configparser

from alembic import context
from sqlalchemy import engine_from_config, pool, create_engine
from logging.config import fileConfig

sys.path.append(os.getcwd())

from typo import create_app
from typo.core import db

app = create_app("config.local.py", purpose="alembic")

# this is the Alembic Config object, which provides
# access to the values within the .ini file in use.
config = context.config

# Interpret the config file for Python logging.
# This line sets up loggers basically.
fileConfig(config.config_file_name)

# add your model's MetaData object here
# for 'autogenerate' support
# from myapp import mymodel
# target_metadata = mymodel.Base.metadata
target_metadata = db.metadata
Example #3
0
File: run.py Project: neoden/typo
#!/usr/bin/env python

from typo import create_app

app = create_app('config.local.py')

if __name__ == '__main__':
    app.run(host='0.0.0.0', port=5000)