Giter VIP home page Giter VIP logo

yahoo_scraper's Introduction

Python CCY Exchange Rate Task

For this task we want you to scrape live currency exchange rate data from https://uk.finance.yahoo.com/currencies/ as it's requested by a client. This is similar to something you might work on while at Mollybet.

Getting started

You should make a python3.8 virtual env, and then install the dependencies in requirements.txt

python3 -m venv env
. ./env/bin/activate
pip install -r requirements.txt

Inside yahoo_scraper/__main__.py you'll find a simple server that listens on localhost 8080. Make sure you've activated the env and then start it with:

python -m yahoo_scraper

In another terminal you can connect to it as a client with nc localhost 8080 and send some requests, this is how we will test your solution.

$ nc localhost 8080
Connected!
EUR:USD
0.0
USD:EUR
0.0

Your task

Spend 3 to 4 hours filling out the server so that it will scrape the live exchange rate for the requested currency pair and send it back to the client. We're happy for you to use any relatively common python library that you think would help. If you do add it to the requirements.in file and then run:

pip-compile requirements.in > requirements.txt

This task is intentionally open ended, so you are free to structure the code however you want, and make changes to the server if you think it will help. Here are some things that we'll have in mind when judging your solution.

  • Correctness: Does the server fetch the correct rate from the yahoo website
  • Speed: How long does the client wait for a rate
  • Style: Is your code idiomatic python

This is your opportunity to show us what you know and impress us, so don't hesitate to make a change to the server or add parts if you think it would need it.

Once you've written your solution do a small write up of how it works and what changes (if any) you would make before deploying this server to production. After that please zip all the files and send it back to us.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.