Twitch API usage Python

Hi, I’ve done a bot for the twitch chat of a friend, with Python, and, to do some improvements, I need to know the state of the stream (up or not and other things…). So I searched, how to use the twitch API (for now I almost only use the IRC chat…) and I found almost all I need on the official documentation… But I don’t know how to do a great HTTP request (and don’t get the 400 error…) with Python…
Thanks for help, and sorry if my English isn’t so good…

Check out the requests library, that one should make things easier for you