# standard imports import os # external imports import requests # constants IMAGE_URL = 'https://www.bsfs.io/testdata/eik7AhvohghaeN5.nef' ## code ## def get(): """Download a raw test image.""" target = os.path.join(os.path.dirname(__file__), 'testimage.nef') if not os.path.exists(target): with open(target, 'wb') as ofile: ans = requests.get(IMAGE_URL) ofile.write(ans.content) ## EOF ##