- 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.
- FPGA從入門到精通(實戰(zhàn)篇)
- 基于ARM的嵌入式系統(tǒng)和物聯(lián)網(wǎng)開發(fā)
- Getting Started with Qt 5
- AMD FPGA設(shè)計優(yōu)化寶典:面向Vivado/SystemVerilog
- micro:bit魔法修煉之Mpython初體驗
- Building 3D Models with modo 701
- Machine Learning with Go Quick Start Guide
- Hands-On Artificial Intelligence for Banking
- Spring Cloud微服務(wù)和分布式系統(tǒng)實踐
- Hands-On Motion Graphics with Adobe After Effects CC
- Spring Security 3.x Cookbook
- FPGA進階開發(fā)與實踐
- USB 3.0編程寶典
- Learn Qt 5
- INSTANT Website Optimization for Retina Displays How-to