githubusercontent

githubusercontent url


Keywords
github, pypi, python, python-library
License
BSD-3-Clause
Install
pip install githubusercontent==0.0.1

Documentation

Travis

Install

$ [sudo] pip install githubusercontent

Features

  • generate raw.githubusercontent.com urls like https://raw.githubusercontent.com/owner/repo/master/path/to/file
  • replace special characters

Examples

>>> from githubusercontent import githubusercontent

>>> githubusercontent("owner/repo", "folder/image.png")
'https://raw.githubusercontent.com/owner/repo/master/folder/image.png'

# replace special characters
>>> githubusercontent("owner/repo", "folder/image 1.png")
https://raw.githubusercontent.com/owner/repo/master/folder/image%201.png

Sources