'Create a file in this repository.
See also: http://developer.github.com/v3/repos/contents/#create-a-file
:param str path: (required), path of the file in the repository
:param str message: (required), commit message
:param bytes content: (required), the actual data in the file
:param str branch: (optional), branch to create the commit on.
Defaults to the default branch of the repository
:param dict committer: (optional), if no information is given the
authenticated user\'s information will be used. You must specify
both a name and email.
:param dict author: (optional), if omitted this will be filled in with
committer information. If passed, you must specify both a name and
email.
:returns: {
\'content\': :class:`Contents <github3.repos.contents.Contents>`:,
\'commit\': :class:`Commit <github3.git.Commit>`}'

@requires_auth
def create_file(self, path, message, content, branch=None, committer=None, author=None):

    if (content and (not isinstance(content, bytes))):
        raise ValueError(u'content    must    be    a    bytes    object')
    json = None
    if (path and message and content):
        url = self._build_url(u'contents', path, base_url=self._api)
        content = b64encode(content).decode(u'utf-8')
        data = {u'message': message, u'content': content, u'branch': branch, u'committer': validate_commmitter(committer), u'author': validate_commmitter(author)}
        self._remove_none(data)
        json = self._json(self._put(url, data=dumps(data)), 201)
        if (json and (u'content' in json) and (u'commit' in json)):
            json[u'content'] = Contents(json[u'content'], self)
            json[u'commit'] = Commit(json[u'commit'], self)
    return json
