Use pyODK to upload and publish media files?

Have you or others (I’m thinking of you @ahblake ) done this to update an entire folder of files? Lets say I have a folder of a couple hundred .pngs or .jpgs. I’m thinking particularly as I’m making a new form, I like to add images as I go and make sure they are displaying right as opposed to uploading them all at the end. Is there a way similar to do this with pyODK similar to the Central Web interface that only allows files to be uploaded that are in the current form definition? I ask because usually I have an a folder that doesn’t have the exact same files as the current form definition.

Could you just run?

from pyodk.client import Client

with Client(project_id=2) as client:
    client.forms.update(
        form_id="myformID",
        attachments=["\Path\to\my\folder_w_form_attachments\"])

EDIT: Here is a method to automate this process with Google Drive/Google Sheets.