'Create a new key for the authenticated user.
:param str title: (required), key title
:param str key: (required), actual key contents, accepts path
as a string or file-like object
:param bool read_only: (optional), restrict key access to read-only,
default to False
:returns: :class:`Key <github3.users.Key>`'

@requires_auth
def create_key(self, title, key, read_only=False):

    json = None
    if (title and key):
        data = {u'title': title, u'key': key, u'read_only': read_only}
        url = self._build_url(u'user', u'keys')
        req = self._post(url, data=data)
        json = self._json(req, 201)
    return self._instance_or_null(users.Key, json)
