---
- name: virtualenv setup
hosts: localhost
vars:
venv_dir: ~/.environments
tasks:
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 create_engine, MetaData | |
from sqlalchemy.ext.automap import automap_base | |
from sqlalchemy.orm import sessionmaker | |
def create_sa_connection(connection_string): | |
""" A nice helper function for creating the session and engine required | |
for sqlalchemy interactions with the database. | |
:param connection: | |
:return: |
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
[defaults] | |
hash_behaviour=merge | |
roles_path=../common/roles:./roles | |
host_key_checking=False | |
pipelining=True |
markdown.py
@environmentfilter
def markdown(env, value):
"""
Markdown filter with support for extensions.
"""
try:
import markdown as md
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
# THIS PROJECT IS AN EXAMPLE APP. SOME CODE MAY NOT BE ACTUALLY USEFUL | |
# FOR DEMONSTRATION PURPOSES ONLY | |
# YOUR MILEAGE MAY VARY | |
# Requirements are Flask, Flask-WTF, Flask-SQLAlchemy | |
import os | |
from flask import (Flask, | |
Blueprint, | |
redirect, |