import pathlib
pathlib.Path('7006.mvt.json').write_text(...)
or the historical alternative
with open(...) as f:
f.write(...)