Add python Requests library

Hello, I am creating custom script with Python and it’s rely on Requests. Is there any way to add Requests? Is there option on CE source code?

Thanks in advance.

If it’s a Kodi add on you are writing then there’s a script that adds it


You just need to import it into your addon.xml

<import addon="script.module.requests" version="2.21.0"/>

If on the other hand it’s general python code that you need to run outside of Kodi then you should be able to download it from github, copy the requests directory into your project and import it. Not sure if it requires any other dependency’s though.

Requests Github

Thank you.

Can you elaborate on second option. How can I ‘import’ from source directory?

After looking at it I think requests has too many dependency’s for that to be a viable option :frowning:

urllib2 is available, it’s old and requires more code but it still works.

1 Like

I agree. Now, I am going to change my code.