As the api key is required it might be nicer either make it a required argument, or raise an exception if it's not set.

When checking if something is not None you could more simply do 

```python
if  flickr_api_key:
    # handle it
```

Unless you really need to know if it is not actually None (this would also not do anything if the api key was an empty string for example)

Additionally vars shouldn't be upper case unless they are constants.