The function of getting the period of a user's following

Pick a python library to do the HTTP requests

Plug the URL and data formats into the library as needed by that libraries docs

???

Profit

I believe most people use requests

I have some sample code (that calls the streams endpoint) here