DSW-Unit 5-Data, Part 1
Summary
JSON, JSON APIs (read only), Python requests module, access tokens, computing with JSON data
Topics
- Python requests module
- JSON syntax
- JSON modules in Python (json.loads() and json.dumps())
- Accessing JSON APIs
- Access tokens and rate limits
- Review of environment variables for storing access tokens
- Review of key/values in dictionaries
- Review of indexing into lists
- Computing functions over nested list/dictionary data structures
- Presenting JSON data in a web application via HTML tables and lists
Learning Objectives
- The student will be able to use the Python request module to write code to process simple HTTP GET and POST requests
- The student will be able to write simple encodings of data using JSON syntax
- The student will be able to locate and correct simple syntax errors in JSON syntax
- The student will be able to write code demonstrating the proper use of the Python json.loads() and json.dumps() methods
- The student will be able to correctly identify what the letters API stand for, and explain the concept
- The student will be able to explain the concept of a rate limited API
- The student will be able to write code that accesses read-only APIs via HTTP, using access tokens and respecting rate limits
- The student will be able to correctly write Python code that computes functions over the data returned by a JSON API, given that the data structure may contain nested lists and dictionaries.
- The student will be able to write Python code that presents the results of JSON queries in a way that is readable by a human end user, using HTML tables or lists, as appropriate.