pythonapilinkedin-apigoogle-api-python-clientopenstack-python-api

Accessing data from API Using Python ( Doubts )


I'm a newbie in using API. I just want to get the data from API and store it in a database. I know there are many libraries/packages in python to extract the data from specific API (for example Google API: google-api-python-client). So is there any generic library to get the data from API?

Thank you


Solution

  • When you are trying to use a generic API service, inherently that means you want a library that can help you do the following:

    (Assuming they are RESTful APIs):

    1. POST requests
    2. GET requests
    3. PUT requests

    All you need is the requests module that fits the bill: https://pypi.org/project/requests/

    Tutorial to use it: https://www.w3schools.com/python/module_requests.asp

    For the second part, I am confused about what you exactly want to do. Do you want anyone to view some data if the have the URL to it? I can update my answer based on your inputs.