Skip to content

How can I get headers or a specific header from my backend API?

I want to retrieve a specific header from my API inside a function with fastAPI, but I can’t found a solution for this. In flask was simply: request.headers[‘your-header-name’] Why the hell with fastAPI is so complicated to do a simple thing like this? Anyone know a solution to retrieve a he…

Get all dates between start and end date pandas columns

I’m trying to get a list of dates between two start and end date pandas columns, with individual IDs. I’ve found an answer that is basically what I’m after (https://stackoverflow.com/a/53409207/14463396) but this only works if the periods between the start and end dates don’t overlap, …

patch object spawned in sub-processs

I am using multiprocessing package for crating sub-processes. I need to handle exceptions from sub-process. catch, report, terminate and re-spawn sub-process. I struggle to create test for it. I would like to patch object which represent my sub-process and raise exception to see if handling is correct. But it…