write and validate opengraph objects in python