def get_sessionmaker(sqlalchemy_url, engine=None):
    """
    Create session with database to work in
    """
    if engine is None:
        engine = create_engine(sqlalchemy_url)
    return sessionmaker(bind=engine)
Create session with database to work in