def create_file(self, path, message, content,<EOL>branch=github.GithubObject.NotSet,<EOL>committer=github.GithubObject.NotSet,<EOL>author=github.GithubObject.NotSet):
assert isinstance(path, (str, unicode)),'<STR_LIT>'<EOL>assert isinstance(message, (str, unicode)),'<STR_LIT>'<EOL>assert isinstance(content, (str, unicode, bytes)),'<STR_LIT>'<EOL>assert branch is github.GithubObject.NotSetor isinstance(branch, (str, unicode)),'<STR_LIT>'<EOL>assert author is github.GithubObject.NotSetor isinstance(author, github.InputGitAuthor),'<STR_LIT>'<EOL>assert committer is github.GithubObject.NotSetor isinstance(committer, github.InputGitAuthor),'<STR_LIT>'<EOL>if atLeastPython3:<EOL><INDENT>if isinstance(content, str):<EOL><INDENT>content = content.encode('<STR_LIT:utf-8>')<EOL><DEDENT>content = b64encode(content).decode('<STR_LIT:utf-8>')<EOL><DEDENT>else:<EOL><INDENT>if isinstance(content, unicode):<EOL><INDENT>content = content.encode('<STR_LIT:utf-8>')<EOL><DEDENT>content = b64encode(content)<EOL><DEDENT>put_parameters = {'<STR_LIT:message>': message, '<STR_LIT:content>': content}<EOL>if branch is not github.GithubObject.NotSet:<EOL><INDENT>put_parameters['<STR_LIT>'] = branch<EOL><DEDENT>if author is not github.GithubObject.NotSet:<EOL><INDENT>put_parameters["<STR_LIT>"] = author._identity<EOL><DEDENT>if committer is not github.GithubObject.NotSet:<EOL><INDENT>put_parameters["<STR_LIT>"] = committer._identity<EOL><DEDENT>headers, data = self._requester.requestJsonAndCheck(<EOL>"<STR_LIT>",<EOL>self.url + "<STR_LIT>" + urllib.quote(path),<EOL>input=put_parameters<EOL>)<EOL>return {'<STR_LIT:content>': github.ContentFile.ContentFile(self._requester, headers, data["<STR_LIT:content>"], completed=False),<EOL>'<STR_LIT>': github.Commit.Commit(self._requester, headers, data["<STR_LIT>"], completed=True)}<EOL>
Create a file in this repository.

        :calls: `PUT /repos/:owner/:repo/contents/:path <http://developer.github.com/v3/repos/contents#create-a-file>`_
        :param path: string, (required), path of the file in the repository
        :param message: string, (required), commit message
        :param content: string, (required), the actual data in the file
        :param branch: string, (optional), branch to create the commit on. Defaults to the default branch of the repository
        :param committer: InputGitAuthor, (optional), if no information is given the authenticated user's information will be used. You must specify both a name and email.
        :param author: InputGitAuthor, (optional), if omitted this will be filled in with committer information. If passed, you must specify both a name and email.
        :rtype: {
            'content': :class:`ContentFile <github.ContentFile.ContentFile>`:,
            'commit': :class:`Commit <github.Commit.Commit>`}