This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import eventlet | |
eventlet.monkey_patch() | |
from sqlalchemy import exc | |
import itertools | |
import pymysql | |
import random | |
from eventlet.green import time | |
import greenlet |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import eventlet | |
eventlet.monkey_patch() | |
import itertools | |
import pymysql | |
import random | |
from eventlet.green import time | |
import greenlet | |
def connect(): |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
from sqlalchemy import Column, Integer, create_engine | |
from sqlalchemy.ext.declarative import declarative_base | |
Base = declarative_base() | |
# a model | |
class Thing(Base): | |
__tablename__ = 'thing' | |
id = Column(Integer, primary_key=True) |