OSF in PsychoPy 3.0.4

Code to auto-sync at the end of a study could look something like this (untested):

from psychopy.projects import pavlovia
thisProj = pavlovia.Project(localRoot='.')
thisProj.stageFiles()  # adds any new/changed/deleted files
thisProj.commit( "added participant: {}".format(filename) )
thisProj.sync()
2 Likes