官术网_书友最值得收藏!

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!

主站蜘蛛池模板: 朔州市| 广安市| 甘孜县| 印江| 旬邑县| 六盘水市| 吉水县| 栾城县| 鹤庆县| 将乐县| 昭苏县| 福建省| 凌海市| 全州县| 分宜县| 南部县| 图们市| 五大连池市| 丰宁| 双牌县| 肇源县| 临安市| 南宁市| 金塔县| 岳阳县| 丰原市| 新乡市| 高邮市| 怀来县| 封丘县| 兰西县| 山东省| 万年县| 祁阳县| 肇源县| 屯昌县| 麻城市| 阆中市| 阿拉善右旗| 甘德县| 祁阳县|