Defining Python dependencies at the top of the file
Earlier in the year, I wrote about updating Flickr metadata using Python. For this script to work, I needed to install the flickrapi package first. I recently came across PEP 723 – Inline script metadata that makes this much easier for single file scripts like my sync-flickr-dates script. Essentially, we can now put a special comment block at the top of the file, before our import statements like this: # /// script # requires-python =… continue reading.