Skip to content

curl getting redirect instead of response

I’ve tested my REST API via Postman and tests and got a response, but when I use curl I’m getting screen from postman enter image description here the code: app.py route.py controller.py Answer By default curl doesn’t follow redirection, you have to use -L argument. In curl’s tradition…

Calculate delta in dictionary of dictionary

I have a dictionary of dictionaries which hold list of tuples like this: I would like to calculate the delta of the third items (which their first two items are identical) in each tuple inside of the dictionaries, between each week (e.g., week1 and week2,.. week19 and week20)and put them as new dictionaries i…

Adding n after every element in an XML python

I’m making an automation that takes an existing XML file, changes one of the values and overwrites the file. My main problem is that its important for me to keep the formatting of the original file and i can’t manage to do that, the new data has no line breaks and its all just a long line. My code…