Skip to content

Phernando82/api_cost_of_living

Repository files navigation

Title

Unofficial Numbeo API

Index

Project Description

This project uses the Scrapy framework to web crawl the Numbeo page and extract the following information as an example:

Meal, Inexpensive Restaurant

Meal for 2 People, Mid-range Restaurant, Three-course

One-way Ticket (Local Transport)

Monthly Pass (Regular Price)

Gasoline (1 liter)

Basic (Electricity, Heating, Cooling, Water, Garbage) for 85m2 Apartment

Internet (60 Mbps or More, Unlimited Data, Cable/ADSL)

Apartment (1 bedroom) in City Centre

Apartment (1 bedroom) Outside of Centre

Apartment (3 bedrooms) in City Centre

Apartment (3 bedrooms) Outside of Centre

Average Monthly Net Salary (After Tax)

The information is saved in a SQLite database and can be retrieved for direct query to the database. Using Flask, routes are created to provide information in JSON format through URLs, thus generating an API that can be consumed to search for this information. This project was hosted on Heroku in order to provide a continuously integrated server, since it is possible to run Scrapy, update the information and then deploy.

Utility

Used in projects that need information about the cost of living in a given city.

Project Status

Badge under development

Project Features

  • Web Scraping: scans the searched city cost information
  • Storage: save information in database
  • Flask API: provides information in JSON file

Project Access

  • Github: fork the project
  • Dependencies: install dependencies from requirements.txt file
  • Database: run the db_script.py script to generate the database
  • Scan the page: set the value of the city variable and run the scrapy crawl numbeo command
  • API in service: run api_numbeo.py file to leave in service
  • Authorization: via the default url first generate the default_url/login token and set the x-access-token variable
  • Get data: via the standard url first select the endpoint: /city and then the http verb GET

Technologies used

Fer-Python- Python

Fer-Pyc - Pycharm

Fer-Her - Heroku

Fer-Flas - Flask

Fer-Vsc - VS Code

Fer-Sql - SQLite

People-Developers of the Project


Fernando

Github Issues: Github Forks: GitHub Org's stars Github License:

About

Numbeo Unofficial API

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published