github-contents
github-contents copied to clipboard
More ergonomic handing of Unicode strings
It would be nice if you didn't have to manually convert to and from byte strings every time you use this library.
A .read_text(...) similar to in pathlib would be nice.
The .write(...) methods could take either bytes or str and encode as utf8 automatically.
This code here could use utf8 encoding when sending large Unicode strings, avoiding the extra overhead of base64:
https://github.com/simonw/github-contents/blob/a125e533a9125be0b4b395b664407e446b3b23ae/github_contents.py#L102-L109