pygit is just enough git (implemented in Python) to create a repo and push to GitHub. It's about 500 lines of Python 3 code that can create a repository, add files to the git index, commit, and push to GitHub.
This repo was created and pushed to GitHub using pygit. Read the full story here.