Exemple #1
0
    def __init__(self, json_dictionary):
        Decorator.__init__(self)
        self.json_dictionary = json_dictionary
        self.alphabet = json.loads(json_dictionary)

        # make sure we have field definitions
        if not self.alphabet['fields']:
            alphabet_dump = json.dumps(self.alphabet, indent=3)
            raise ValueError('Can\'t find field definitions in short code alphabet:\n%s' % (alphabet_dump))
        else:
            # build up field expanders
            self.expanders = []
            for field in self.alphabet['fields']:
                self.expanders.append(FieldExpander(field))
 def __init__(self, attach_full_info=False):
     Decorator.__init__(self, "Google Reverse Geocoder")
     self.attach_full_info = attach_full_info
 def __init__(self, attach_full_info=False):
     Decorator.__init__(self, "Google Reverse Geocoder")
     self.attach_full_info = attach_full_info
Exemple #4
0
 def __init__(self, sizes=['large'], thumbnail=True):
     Decorator.__init__(self, 'Twitter Image Data Decorator')
     self.sizes = sizes
     self.thumbnail = thumbnail