You can try the python package detective-snapshot
Any run of the python program will log the inputs/outputs of the function to a file under _snapshots/
from detective import snapshot
@snapshot()
def main():
# your main code here
pass
if __name__ == "__main__":
main()