Join us and get access to hundreds of tutorials and a community of expert Pythonistas.

Unlock This Lesson

This lesson is for members only. Join us and get access to hundreds of tutorials and a community of expert Pythonistas.

Unlock This Lesson

Query String Parameters

What are query strings? How do I use them? In this lesson you’ll learn exactly that. The .get() function accepts a params argument, which can be a dictionary, a list of tuples or raw bytes. The following example uses the GitHub Search API looking for the requests library:

>>> requests.get(
...     'https://api.github.com/search/repositories',
...     params={'q': 'requests+language:python'}
... )
<Response [200]>

Comments & Discussion

Become a Member to join the conversation.