Code Monkey home page Code Monkey logo

goldsilver_flask_service's Introduction

Welcome to my Web-Scraper for gold and silver historical data.

    -   fetch.py is a program to fetch the historical prices and dates of gold and silver from these 2 URLs:

        https://www.investing.com/commodities/gold-historical-data
        https://www.investing.com/commodities/silver-historical-data

        and store them locally in a csv file.

    -   app.py is a Flask REST API that Create an endpoint that will accept HTTP GET with the below arguments, 
        and returns a json time series, mean and variance computed over the specified period.

        * start_date - required (iso format like 2017-05-10)
        * end_date - required (iso format like 2017-05-22)
        * commodity_type - required (gold, silver)

        GET request example with curl:
        curl 'http://0.0.0.0:8080/commodity?start_date=2019-04-04&end_date=2019-05-03&commodity_type=gold'


To create data locally, pulled from the two URLs above:

    $ python3 fetch.py

To run Flask server:

    $ python3 app.py

In the case that programs do not run because of dependencies:

    $ pip3 install -r requirements.txt

goldsilver_flask_service's People

Contributors

juanandreas-acc avatar juanandreas avatar

Watchers

 avatar

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.