About 573,000 results
Open links in new tab
  1. rest - Making a request to a RESTful API using Python - Stack …

    Assuming the API returns a JSON, parse the JSON object into a Python dict using json.loads function Loop through the dict to extract information. Requests module provides you useful function to loop for success and failure.

  2. How to make a simple Python REST server and client?

    Mar 5, 2020 · I'm attempting to make the simplest possible REST API server and client, with both the server and client being written in Python and running on the same computer. From this tutorial: https://blog.

  3. How to loop through paginated API using python

    May 19, 2019 · I need to retrieve the 500 most popular films from a REST API, ... REST API using requests in python. 0.

  4. How can I get an oauth2 access_token using Python

    Apr 19, 2016 · Once you have the access token, you can use it to authenticate API calls to the OAuth2 provider. This is just an example and may not work with all OAuth2 providers. You may need to adjust the code and the parameters to match the specific requirements of …

  5. Python request with authentication (access_token)

    Dec 12, 2012 · I am trying to use an API query in Python. From the command line I can use curl like so: curl --header "Authorization:access_token myToken" https://website.example/id This gives some JSON

  6. rest - Python POST binary data - Stack Overflow

    Jan 17, 2013 · Basically what you do is correct. Looking at redmine docs you linked to, it seems that suffix after the dot in the url denotes type of posted data (.json for JSON, .xml for XML), which agrees with the response you get - Processing by AttachmentsController#upload as XML.

  7. Calling REST API with an API key using the requests package in …

    Oct 31, 2018 · What should the python code to call the REST API below using the requests package? I do not know how to pass the "apikey" curl -X POST -u "apikey":"1234abcd" -H "Accept: application/json" -F "file=@{input_file}" https://api_url Thank you for your help.

  8. Python, HTTPS GET with basic authentication - Stack Overflow

    Aug 9, 2011 · In Python 3 the following will work. I am using the lower level http.client from the standard library. Also check out section 2 of rfc2617 for details of basic authorization.

  9. How to access a sharepoint site via the REST API in Python?

    Jan 6, 2014 · When I access this from the browser, it prompts me for the username and password and then works fine. However I am trying to do the same using the REST API in Python. I am using the requests library, and this is what I have done:

  10. Making an API call in Python with an API that requires a bearer token

    Apr 29, 2015 · Looking for some help with integrating a JSON API call into a Python program. I am looking to integrate the following API into a Python .py program to allow it to be called and the response to be printed. The API guidance states that a bearer token must be generated to allow calls to the API, which I have done successfully.

Refresh