- Python Machine Learning Blueprints
- Alexander Combs Michael Roman
- 157字
- 2021-07-02 13:49:36
Acquisition
Since one of the more common ways to access data is through a RESTful API, one library that you'll want to be aware of is the Python Requests library, http://www.python-requests.org/en/latest/. Dubbed HTTP for humans, it makes interacting with APIs a clean and simple experience.
Let's take a look at a sample interaction, using requests to pull down data from GitHub's API. Here, we will make a call to the API and request a list of starred repositories for a user:
import requests r = requests.get(r"https://api.github.com/users/acombs/starred") r.json()
This will return a JSON of all the repositories the user has starred, along with attributes about each. Here is a snippet of the output for the preceding call:

The requests library has an amazing number of features—far too many to cover here, but I do suggest you check out the documentation.
- 觸摸屏實用技術與工程應用
- 深入理解Spring Cloud與實戰
- 基于ARM的嵌入式系統和物聯網開發
- 計算機應用與維護基礎教程
- 深入淺出SSD:固態存儲核心技術、原理與實戰(第2版)
- 計算機維修與維護技術速成
- Large Scale Machine Learning with Python
- Practical Machine Learning with R
- 深入理解序列化與反序列化
- 單片機項目設計教程
- 計算機組裝與維護(慕課版)
- 零基礎輕松學修電腦主板
- Practical Artificial Intelligence and Blockchain
- Nagios系統監控實踐(原書第2版)
- Exceptional C++:47個C++工程難題、編程問題和解決方案(中文版)