It might be nice to let a user pass a pydantic model directly to the write functions, rather than calling model_dump to convert to a dict first.