If all you need to do is to get settings.YOUTUBE_API['params'] to be correct for the requests.get call below, then make a copy of the dict, and update it, then use the copy.  Changing the global settings value in this function can't be necessary.  If you think it is, let's talk more about why.