Did I find the right examples for you? yes no      Crawl my project      Python Jobs

All Samples(2)  |  Call(1)  |  Derive(0)  |  Import(1)

        def get_email_handler(handler_name, email_options):

    if isinstance(handler_name, str):
        handler_name = handler_name.lower()

    user = email_options.get('user', None)
    user = user.lower() if isinstance(user, str) else user

    if (handler_name is None or user is None or user == 'none'):
        return None

    elif handler_name == 'text':
        return TextEmail(**email_options)

    elif handler_name == 'basic':
        return BasicEmail(**email_options)
        


src/d/a/dagobah-0.2.3/dagobah/daemon/daemon.py   dagobah(Download)
 
from dagobah.core import Dagobah, EventHandler
from dagobah.email import get_email_handler
 
app = Flask(__name__)
    handler = EventHandler()
 
    email_handler = get_email_handler(get_conf(config, 'Dagobahd.email', None),
                                      get_conf(config, 'Email', {}))