How the safe Data Plain Text from Python Request to CSV

0 votes

I'm new at python and trying to program something, where i grab data from a API and export the Output to a csv file. But i got problems to export the plain text.

The Code looks like that for the API-Request

import requests

url = ""

headers = {
    'Accept': "application/json",
    'Content-Type': "application/json",
    'Authorization': "Bearer {}",

response = requests.request("GET", url, headers=headers)




Like i wrote, i want to export the output (Response) to a csv and i don't know how to make that. I tried that with pandas but it didn't work.

Thank u all
Sep 2, 2020 in Python by SleeperSimulant
• 120 points

Hi, @ SleeperSimulant 

Are you using the Postman tool for this?

Hey, @SleeperSimulant,

How is the JSON structure coming from API?

No answer to this question. Be the first to respond.

Your answer

Your name to display (optional):
Privacy: Your email address will only be used for sending these notifications.

Related Questions In Python

0 votes
1 answer

How to read data from a text file using Python?

Refer to the below example where the ...READ MORE

answered May 13, 2019 in Python by Sushma
0 votes
2 answers
0 votes
2 answers

How do I convert text file to CSV file with only plain python. Meaning no panda or any other special module?

Steps to Convert Text File to CSV ...READ MORE

answered Oct 15, 2020 in Python by Abdul Shekh
0 votes
1 answer

How to get text label from SAP using pywinauto[python]

Hi. Can you please tell me what ...READ MORE

answered Jun 28, 2018 in Python by Nietzsche's daemon
• 4,260 points
0 votes
3 answers

How to get the return value from a thread using python?

FWIW, the multiprocessing module has a nice interface for ...READ MORE

answered Dec 15, 2020 in Python by Roshni
• 10,480 points
0 votes
1 answer

How can I change the data type to string in Python?

You can use str(variablename) This is called conversion ...READ MORE

answered Dec 18, 2018 in Python by Shuvodip
0 votes
0 answers

How to read lines from compressed text files in Python

Is it easy to read a line ...READ MORE

Dec 27, 2018 in Python by Anirudh
• 2,080 points
0 votes
1 answer

How to use read a WSDL file from the file system using Python suds?

Hi, good question. It is a very simple ...READ MORE

answered Jan 21, 2019 in Python by Nymeria
• 3,540 points
0 votes
1 answer

How to find the value of a row in a csv file in python?

If you want to find the value ...READ MORE

answered May 20, 2019 in Python by Sanam
+1 vote
1 answer

How to convert records from csv to a list in Python?

If you are using Python 3.x then ...READ MORE

answered Jun 25, 2019 in Python by Arvind
• 3,020 points

edited Jun 26, 2019 by Kalgi 7,159 views