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

All Samples(16)  |  Call(16)  |  Derive(0)  |  Import(0)
Return the section or section/key value

src/s/e/serverherald-1-0.0.1/serverherald/notifiers/prowl.py   serverherald(Download)
    def notify(self, context):
        """Send message notification"""
        url = 'https://api.prowlapp.com/publicapi/add'
 
        data = {'apikey': self.config('prowl', 'apikey'),
                'priority': self.config('prowl', 'priority', 0),

src/s/e/serverherald-1-0.0.1/serverherald/notifiers/mail.py   serverherald(Download)
    def get_subject(self):
        """Set the email subject based on config, fall back to default"""
        return self.config('email', 'subject', 'New Cloud Server Online')
 
    def get_recipients(self):
        """Convert recipients from the config file into a list, if needed"""
        recipients = self.config('email', 'to')

src/s/e/serverherald-1-0.0.1/serverherald/notifiers/twilio.py   serverherald(Download)
    def notify(self, context):
        """Send SMS notification"""
        url = ('https://api.twilio.com/2010-04-01/Accounts'
               '/%s/SMS/Messages.json' %
               self.config('twilio', 'accountsid'))
        data = {'From': self.config('twilio', 'from'),
                'To': self.config('twilio', 'to'),
 
        response = requests.post(url, data=data,
                                 auth=(self.config('twilio',
                                                   'accountsid'),
                                       self.config('twilio', 'token')))

src/s/e/serverherald-1-0.0.1/serverherald/notifiers/nexmo.py   serverherald(Download)
    def notify(self, context):
        """Send SMS notification"""
        url = 'https://rest.nexmo.com/sms/json'
        data = {'api_key': self.config('nexmo', 'apikey'),
                'api_secret': self.config('nexmo', 'apisecret'),
                'from': self.config('nexmo', 'from'),
                'to': self.config('nexmo', 'to'),

src/s/e/serverherald-1-0.0.1/serverherald/notifiers/webhook.py   serverherald(Download)
    def notify(self, context):
        """Send HTTP(S) notification"""
        url = self.config('webhook', 'url')
        response = requests.post(url,
                                 data=json.dumps(

src/s/e/serverherald-1-0.0.1/serverherald/notifiers/pushover.py   serverherald(Download)
        url = 'https://api.pushover.net/1/messages.json'
        data = {'token': app_apikey,
                'user': self.config('pushover', 'apikey'),
                'message': self.render_template('sms', context)}
        response = requests.post(url, data=data)

src/s/e/serverherald-1-0.0.1/serverherald/notifiers/pagerduty.py   serverherald(Download)
               '/generic/2010-04-15/create_event.json')
        description = 'Server %s online' % context['server'].name
        data = {'service_key': self.config('pagerduty', 'apikey'),
                'event_type': 'trigger',
                'description': description,