Search code examples
pythonapikivyurllib

Force the Kivy Loader to use a specific set of headers?


I am running into an issue where the API I am trying to use to access some images requires a reference header. I am able to access these images using requests and urllib, but have no clue how to make Kivy's Loader use these headers without making intrusive changes to the code.

kivy/loader.py is where the magic happens. I know how to add headers to it by changing that file, but I wanted to see if there was a better way to do this beyond hacking up the original library.


Solution

  • At the moment, you can't. There is however a pull request on Github that adds that functionality.

    https://github.com/kivy/kivy/pull/7669