When working with a large digital collection, it can often be scattered with hundreds of redundant system files which can create bugs in our workflows and cause problems if ingested in to digital preservation systems, fortunately these can easily be removed with only a few lines of Python code.
There may be times where you have to alter filenames in all subfolders. Python is very useful and flexible for this task. In this guide, we will show you how replace all instances of ‘foo’ in filenames with ‘bar’. For example, ‘foo_0001.jpg’ will be replaced by ‘bar_0001.jpg'.
This guide is a walk-through on using the requests library to get data from a API. The guide will handle the basics of setting up a script to fetch data and some data manipulation.