Coder Social home page Coder Social logo

oluwoledove / python_api_csv_json_mysql Goto Github PK

View Code? Open in Web Editor NEW
0.0 2.0 0.0 163 KB

This code fetch data from an API, writes the dataset to CSV, converts it to JSON and then saves the data in MySQL database

License: Creative Commons Zero v1.0 Universal

Python 100.00%

python_api_csv_json_mysql's Introduction

PYTHON_API_CSV_JSON_MySQL

This code fetch data from an API, writes the dataset to CSV, converts it to JSON and then saves the data in MySQL database

Language used - PYTHON

Database used - MySQL Install MySQL and configure your database and user parameters Be carefull to remeber your log in parameters Also install MySQL Workbench for data visualization

pip install the following modules python modules

  • mysql.connector
  • numpy
  • pandas
  • quandl

Find this block of code in the program file and fill them with your MySQL database parameters

mydb = mysql.connector.connect( host="localhost", user="{Your Database username}", password="{Your Database Password}", database="{Your Model's Name}" #returns an error if DB does not exist )

Delete bsa_csv.csv and bse_json.json - I only left them for you to see the output, the code should generate your own output

You may also need to install other necessary modules as stated in the program Sign up with https://data.nasdaq.com/sign-up to get your API key Log in, then Follow the link below Data source - https://data.nasdaq.com/data/BSE/BOM542248-deccan-health-care-ltd-eod-prices

Click the API

Cheers!

python_api_csv_json_mysql's People

Contributors

oluwoledove avatar

Watchers

 avatar  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.