github3.py icon indicating copy to clipboard operation
github3.py copied to clipboard

Allow preventing file contents retrieval to enable updating large files

Open stevennyman opened this issue 5 years ago • 0 comments

Please allow creating a file_contents object without retrieving the current contents. This is because GitHub's contents API only supports retrieving files up to 1mb, and I need to update a file that is larger than 1mb but not necessarily read it. I would suggest the following syntax: repo.file_contents('folder/myfile.txt', retrieve=False). Attempting to access file contents on an object without it's contents retrieved yet could either attempt to retrieve and return the contents, return None, or throw an exception. Manual retreival could be attempted with .retrieve(). #741 is a slightly related issue. Thanks!

stevennyman avatar Apr 16 '19 01:04 stevennyman