Simple dict of {'name': 'John Doe', 'email': 'name@example.com'}
346199
def add_signer(self, signer):
        
        if isinstance(signer, HelloSigner) and signer.validate():
            self.signers.append(signer)
        else:
            if not signer.validate():
                raise Exception("HelloSigner Errors %s" % (signer.errors,))
            else:
                raise Exception("add_signer signer must be an instance of class HelloSigner")
1143606
function(apiKey, contactId, fromName,
        fromAddress, toAddress, ccAddresses, bccAddresses, contentType,
        subject, htmlBody, textBody, header, receivedDate, sentDate,
        emailSentType) {}
760196
def _to_dict(self):
        """"""
        _dict = {}
        if hasattr(self, 'input') and self.input is not None:
            _dict['input'] = self.input._to_dict()
        if hasattr(self, 'intents') and self.intents is not None:
            _dict['intents'] = [x._to_dict() for x in self.intents]
        if hasattr(self, 'entities') and self.entities is not None:
            _dict['entities'] = [x._to_dict() for x in self.entities]
        return _dict
791884
def _get_userinfo(self):
        
        if not hasattr(self, "_userinfo"):
            userinfo = {
                "name": self.user_name,
                "email": self.user_email,
                "url": self.user_url
            }
            if self.user_id:
                u = self.user
                if u.email:
                    userinfo["email"] = u.email

                # If the user has a full name, use that for the user name.
                # However, a given user_name overrides the raw user.username,
                # so only use that if this comment has no associated name.
                if u.get_full_name():
                    userinfo["name"] = self.user.get_full_name()
                elif not self.user_name:
                    userinfo["name"] = u.get_username()
            self._userinfo = userinfo
        return self._userinfo
778269
def as_dict(self):
        """"""
        attrs = vars(self)
        return {key: attrs[key] for key in attrs if not key.startswith('_')}
1194249
def as_dict(self):
        
        data = get_dict_for_attrs(self, ['id', 'raw_id', 'short_id',
            'revision', 'date', 'message'])
        data['author'] = {'name': self.author_name, 'email': self.author_email}
        data['added'] = [node.path for node in self.added]
        data['changed'] = [node.path for node in self.changed]
        data['removed'] = [node.path for node in self.removed]
        return data
364760
def parse_email_url(url):
    """"""

    conf = {}

    url = urlparse.urlparse(url)

    # Remove query strings
    path = url.path[1:]
    path = path.split('?', 2)[0]

    # Update with environment configuration
    conf.update({
        'EMAIL_FILE_PATH': path,
        'EMAIL_HOST_USER': url.username,
        'EMAIL_HOST_PASSWORD': url.password,
        'EMAIL_HOST': url.hostname,
        'EMAIL_PORT': url.port,
    })

    if url.scheme in EMAIL_SCHEMES:
        conf['EMAIL_BACKEND'] = EMAIL_SCHEMES[url.scheme]

    if url.scheme == 'smtps':
        conf['EMAIL_USE_TLS'] = True
    else:
        conf['EMAIL_USE_TLS'] = False

    return conf
530976
def userToJson(user):
    
    obj = {
        'id': user.id,
        'username': user.username,
        'name': user.get_full_name(),
        'email': user.email,
    }

    return obj
877485
def get_recipients(self, name):
        
        to_str = self.render_string(self.data[name])
        formatted_emails = [
            email.utils.formataddr(addr_pair)
            for addr_pair in email.utils.getaddresses([to_str])
        ]
        return [i for i in formatted_emails if i]
1072443
def user_parse(data):
        """"""
        yield 'id', data.get('id')
        yield 'email', data.get('email')
        first_name, _, last_name = (data.get('name') or '').partition(' ')
        yield 'first_name', first_name
        yield 'last_name', last_name
        yield 'username', data.get('login')
        yield 'picture', data.get('avatar_url')
        yield 'link', data.get('html_url')
        location = data.get('location', '')
        if location:
            split_location = location.split(',')
            yield 'country', split_location[0].strip()
            if len(split_location) > 1:
                yield 'city', split_location[1].strip()
443522
def email(self):
        
        if "profile" in self._raw:
            email = self._raw["profile"].get("email")
        elif "bot_url" in self._raw:
            email = self._raw["bot_url"]
        else:
            email = None
        if not email:
            logging.debug("No email found for %s", self._raw.get("name"))
        return email
1270627
def _to_dict(self):
        """"""
        _dict = {}
        if hasattr(self, 'next_url') and self.next_url is not None:
            _dict['next_url'] = self.next_url
        if hasattr(self, 'matched') and self.matched is not None:
            _dict['matched'] = self.matched
        if hasattr(self, 'next_cursor') and self.next_cursor is not None:
            _dict['next_cursor'] = self.next_cursor
        return _dict
425604
def to_dict(self):
        """"""
        d = {}
        if self.query_params_match is not None:
            d['@query_params_match'] = self.query_params_match
        if self.query_person_match is not None:
            d['@query_person_match'] = self.query_person_match
        if self.valid_since is not None:
            d['@valid_since'] = datetime_to_str(self.valid_since)
        if self.source is not None:
            d['source'] = self.source.to_dict()
        d.update(self.fields_to_dict())
        return d
929484
def parse_contact(self):
        
        self.parse_whitespace()
        name = self.parse_name()  # parse a name expression and get the string.
        if not name:  # No name was found so shout it out.
            raise PartpyError(self, 'Expecting a name')

        self.parse_whitespace()
        # allow name and email to be delimited by either a ':' or '-'
        if not self.match_any_char(':-'):
            raise PartpyError(self, 'Expecting : or -')
        self.eat_length(1)
        self.parse_whitespace()

        email = self.parse_email()  # parse an email and store its string.
        if not email:
            raise PartpyError(self, 'Expecting an email address')
        return (name, email)
1344912
def emails_parse(emails_dict):
    
    result = emails_dict['ListVerifiedEmailAddressesResponse'][
        'ListVerifiedEmailAddressesResult']
    emails = [email for email in result['VerifiedEmailAddresses']]

    return sorted(emails)
703017
def to_dict(self):
        """"""
        data = {}

        if self.created_at:
            data['created_at'] = self.created_at.strftime(
                '%Y-%m-%dT%H:%M:%S%z')
        if self.image_id:
            data['image_id'] = self.image_id
        if self.permalink_url:
            data['permalink_url'] = self.permalink_url
        if self.thumb_url:
            data['thumb_url'] = self.thumb_url
        if self.type:
            data['type'] = self.type
        if self.url:
            data['url'] = self.url

        return data
1154737
def from_name(cls, name):
        """"""
        result = cls.list()
        dc_names = {}
        for dc in result:
            dc_names[dc['name']] = dc['id']

        return dc_names.get(name)