- Python Programming Blueprints
- Daniel Furtado Marcus Pennington
- 224字
- 2021-06-24 18:53:53
Exchange Rates and the Currency Conversion Tool
In the previous chapter, we built a really cool application to count votes on Twitter and learned how to authenticate and consume the Twitter API using Python. We also had a good introduction to how to use Reactive Extensions for Python. In this chapter, we are going to create a terminal tool that will fetch exchange rates for the current day from fixer.io and use this information to convert the value between different currencies.
Fixer.io is a very nice project created by https://github.com/hakanensari; on a daily basis, it fetches foreign exchange rate data from the European Central Bank. The API that he created is simple to use and works pretty well.
Our project starts out by creating a framework around the API; when that is in place, we are going to create a terminal application where we can perform currency conversion. All the data that we fetch from the fixer.io is going to be stored in a MongoDB database, so we can perform conversions without doing requests to fixer.io all the time. This will increase the performance of our application.
In this chapter, we will cover the following:
- How to use pipenv to install and manage our project's dependencies
- Working with MongoDB using the PyMongo module
- Consuming REST APIs using Requests
With that said, let's get started!
- 網(wǎng)絡(luò)故障現(xiàn)場處理實踐(第4版)
- TCP/IP入門經(jīng)典(第5版)
- 物聯(lián)網(wǎng)+BIM:構(gòu)建數(shù)字孿生的未來
- 面向云平臺的物聯(lián)網(wǎng)多源異構(gòu)信息融合方法
- 大話社交網(wǎng)絡(luò)
- 電力物聯(lián)網(wǎng)工程技術(shù)原理與應用
- 面向5G-Advanced的關(guān)鍵技術(shù)
- Master Apache JMeter:From Load Testing to DevOps
- 計算機網(wǎng)絡(luò)技術(shù)及應用
- 物聯(lián)網(wǎng)工程導論(第3版)
- 一本書讀懂TCP/IP
- OSPF協(xié)議原理與功能拓展
- ReasonML Quick Start Guide
- 通信系統(tǒng)實戰(zhàn)筆記:無處不在的信號處理
- Microsoft System Center 2012 Configuration Manager:Administration Cookbook