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

All Samples(6)  |  Call(6)  |  Derive(0)  |  Import(0)
Return true if the section/key pair exists

src/s/e/serverherald-1-0.0.1/serverherald/notifiers/sendgrid.py   serverherald(Download)
 
        # Sendgrid requires an API key and API username
        if not self.config_has('sendgrid'):
            print ('`sendgrid` notification type requires an API username'
                   ' and an API key to be specified in the config file.')
            sys.exit(1)
 
        if not self.config_has('sendgrid', 'apiuser'):
            sys.exit(1)
 
        if not self.config_has('sendgrid', 'apikey'):
            print 'Sendgrid requires an API key in the config file'
            sys.exit(1)

src/s/e/serverherald-1-0.0.1/serverherald/notifiers/mailgun.py   serverherald(Download)
 
        # Mailgun requires a domain name and API key
        if not self.config_has('mailgun'):
            print ('`mailgun` notification type requires a Mailgun domain and'
                   ' API key to be specified in the config file.')
            sys.exit(1)
 
        if not self.config_has('mailgun', 'domain'):
            sys.exit(1)
 
        if not self.config_has('mailgun', 'apikey'):
            print 'Mailgun requires an API key in the config file'
            sys.exit(1)