ApiMoedas - This API is a extesion of API

Overview

🪙 Api Moeda 🪙

Este projeto é uma extensão da API Awesome API. Basicamente, ele mostra todas as moedas que a Awesome API tem e todas as suas conversões possíveis de serem utilizadas, além de mostrar o país de cada moeda.

🧑‍💻 Tecnologias utilizadas 🧑‍💻

  • Python 3.8
  • Selenium
  • BeautifulSoup
  • pandas
  • Json
  • Flask

Scrapy das páginas

Foi realizado o Scraping de ambas as páginas para se obter as seguintes informações:

  • Código da Moeda
  • Nome do País a que se refere
  • Código da Conversão entre duas moedas distintas
  • Nome por extenso dessa operação
  1. Como usar

    • Fazendo uma requisição:
import requests as r

#Pegar os tipos de moedas
dados_moedas = r.get("http://apimoeda.herokuapp.com/moedas")

#Pegar os tipos de conversões
dados_conversões =  r.get("http://apimoeda.herokuapp.com/conversao")
  1. Manipulando o arquivo em formato json

    • Fazendo a conversão:
import json
dict_moedas = dados_moedas.json()
dict_conversoes = dados_conversões.json()
  1. Obtendo os valores e chaves:

for i in dict_moedas['Tipo da moeda']:
    for key, value in i.items():
        print(key,value)

for i in dict_conversoes['Tipo de conversao']:
    for key, value in i.items():
        print(key,value)
  1. Criando uma tabela de forma estruturada

import pandas as pd
#Pegando os valores de cada dicionário
values = [value.values() for value in dict_moedas['Tipo da moeda']]
#Pegando as chaves de cada dicionário
keys = [key.keys() for key in dict_moedas['Tipo da moeda']]

df = pd.DataFrame(values, index=keys, columns=['Cód Moeda', "País"])
print(df)
  1. Resultado

  • Para o caso de Moedas
Cód Moeda País
(Cod_da_moeda, Paises) AFN Afghani do Afeganistao
(Cod_da_moeda, Paises) MGA Ariary Madagascarense
(Cod_da_moeda, Paises) THB Baht Tailandes
(Cod_da_moeda, Paises) PAB Balboa Panamenho
(Cod_da_moeda, Paises) ETB Birr Etiope
... ... ...
(Cod_da_moeda, Paises) XAGG XPrata
(Cod_da_moeda, Paises) XRP XRP
(Cod_da_moeda, Paises) CNY Yuan Chines
(Cod_da_moeda, Paises) CNH Yuan chines offshore
(Cod_da_moeda, Paises) PLN Zloti Polones

[155 rows x 2 columns]

Feito por

Abel ❤️

Minhas Rede Sociais:

You might also like...
An API Wrapper for Gofile API

Gofile2 from gofile2 import Gofile g_a = Gofile() print(g_a.upload(file="/home/itz-fork/photo.png")) An API Wrapper for Gofile API. About API Gofile

A simple API wrapper for the Tenor API

Gifpy A simple API wrapper for the Tenor API Installation Python 3.9 or higher is recommended python3 -m pip install gifpy Clone repository: $ git cl

wyscoutapi is an extremely basic API client for the Wyscout API (v2 & v3) for Python

wyscoutapi wyscoutapi is an extremely basic API client for the Wyscout API (v2 & v3). Usage Install with pip install wyscoutapi. To connect to the Wys

Beyonic API Python official client library simplified examples using Flask, Django and Fast API.
Beyonic API Python official client library simplified examples using Flask, Django and Fast API.

Beyonic API Python official client library simplified examples using Flask, Django and Fast API.

A Python API wrapper for the Twitter API!

PyTweet PyTweet is an api wrapper made for twitter using twitter's api version 2! Installation Windows py3 -m pip install PyTweet Linux python -m pip

A new coin listing alert bot using Python, Flask, MongoDB, Telegram API and Binance API
A new coin listing alert bot using Python, Flask, MongoDB, Telegram API and Binance API

Bzzmans New Coin Listing Detection Bot Architecture About Project Work in progress. This bot basically gets new coin listings from Binance using Binan

🚧 finCLI's own News API. No more limited API calls. Unlimited credible and latest information on BTC, Ethereum, Indian and Global Finance.
🚧 finCLI's own News API. No more limited API calls. Unlimited credible and latest information on BTC, Ethereum, Indian and Global Finance.

🚧 finCLI's own News API. No more limited API calls. Unlimited credible and latest information on BTC, Ethereum, Indian and Global Finance.

Python API wrapper library for Convex Value API

convex-value-python Python API wrapper library for Convex Value API. Further Links: Convex Value homepage @ConvexValue on Twitter JB on Twitter Authen

Dicha herramienta esta creada con una api... esta api permite enviar un SMS cada 12 horas dependiendo del pais... Hay algunos paises y operadoras no están soportados.
Dicha herramienta esta creada con una api... esta api permite enviar un SMS cada 12 horas dependiendo del pais... Hay algunos paises y operadoras no están soportados.

SMSFree pkg install python3 pip install requests git clone https://github.com/Hidden-parker/SMSFree cd SMSFree python sms.py DISFRUTA... Dicha herrami

Owner
Abel
Desde que aprendi estatística na faculdade decidi me aventurar em Data Science.
Abel
Python API wrapper around Trello's API

A wrapper around the Trello API written in Python. Each Trello object is represented by a corresponding Python object. The attributes of these objects

Richard Kolkovich 904 Jan 2, 2023
PRAW, an acronym for "Python Reddit API Wrapper", is a python package that allows for simple access to Reddit's API.

PRAW: The Python Reddit API Wrapper PRAW, an acronym for "Python Reddit API Wrapper", is a Python package that allows for simple access to Reddit's AP

Python Reddit API Wrapper Development 3k Dec 29, 2022
alpaca-trade-api-python is a python library for the Alpaca Commission Free Trading API.

alpaca-trade-api-python is a python library for the Alpaca Commission Free Trading API. It allows rapid trading algo development easily, with support for both REST and streaming data interfaces

Alpaca 1.5k Jan 9, 2023
Telegram PHub Bot using ARQ Api and Pyrogram. This Bot can Download and Send PHub HQ videos in Telegram using ARQ API.

Tg_PHub_Bot Telegram PHub Bot using ARQ Api and Pyrogram. This Bot can Download and Send PHub HQ videos in Telegram using ARQ API. OS Support All linu

TheProgrammerCat 13 Oct 21, 2022
A python to scratch API connector. Can fetch data from the API and send it back in cloud variables.

Scratch2py Scratch2py or S2py is a easy to use, versatile tool to communicate with the Scratch API Based of scratchclient by Raihan142857 Installation

null 20 Jun 18, 2022
An API wrapper around the pythonanywhere's API.

pyaww An API wrapper around the pythonanywhere's API. The name stands for pythonanywherewrapper. 100% api coverage most of the codebase is documented

null 7 Dec 11, 2022
The Bot provide Hadith API and fetch content via api.hadith.sutanlab.id

Bot Hadith-API on Telegram The Bot provide Hadith API and fetch content via api.hadith.sutanlab.id Built With Python Asynchronous HTTP protocol client

xMan 12 Feb 19, 2022
Async ready API wrapper for Revolt API written in Python.

Mutiny Async ready API wrapper for Revolt API written in Python. Installation Python 3.9 or higher is required To install the library, you can just ru

null 16 Mar 29, 2022
🚀 An asynchronous python API wrapper meant to replace discord.py - Snappy discord api wrapper written with aiohttp & websockets

Pincer An asynchronous python API wrapper meant to replace discord.py ❗ The package is currently within the planning phase ?? Links |Join the discord

Pincer 125 Dec 26, 2022
Deploy a STAC API and a dynamic mosaic tiler API using AWS CDK.

Earth Observation API Deploy a STAC API and a dynamic mosaic tiler API using AWS CDK.

Development Seed 39 Oct 30, 2022