Back to .md Directory

Lesson 4: Information Retrieval

In this session, you will learn how to obtain data from web APIs as well as parse and normalize the data to use in a chart.

May 2, 2026
0 downloads
0 views
ai eval
View source

Lesson 4: Information Retrieval

In this session, you will learn how to obtain data from web APIs as well as parse and normalize the data to use in a chart.

Objectives

By the end of this lesson, you should be able to:

  1. Make an AJAX request from the server to grab data from an external API
  2. Use a scheduler to continuously pull data from external sources

Welcome

Slides: npm run day4

Challenge

The focus over the next two sessions will be to build the following app...

Flask Bitcoin

Build an app that will find the best exchange rates for Bitcoin (USD -> Bitcoin) from the following cryptocurrency exchanges:

  1. Bitstamp
  2. Kraken
  3. Bittrex

It should have the following pages:

  1. The first page should display the rates and highlight the best one
  2. The second page should display the rates over time

Instructions

We'll work through the pseudocode together. You'll code the app either alone (or with the awesome, good-looking people at your table). We'll come together after each step to review.

Part 1 - Server

Code Along!

  1. Project Setup
  2. Add SQLite
  3. Get Data
  4. Add scheduler

Example code: https://github.com/realpython/flask-bitcoin-example

Homework

  1. Compare your code from class with the flask-bitcoin-example code. Make any necessary changes to your code.
  2. Refactor to use SQLAlchemy
  3. Deploy to Heroku
  4. Add the remaining bitcoin exchanges

Related Documents