I don’t want to dedent this because it doesn’t look nice, but the output is indented, which is not what I wanted.
f.write("""\
```aosr-deck-config
{
"rule": {
"conditions": {
"all": [{
"fact": "card",
"operator": "regexMatch",
"value": "RandTest",
"path": "$.path"
}]
},
"event": {
"type": "match"
}
}
}
```""")