I just submitted my first pypi package, xickle. Letting you persist and read from XML just as easily as you manipulate json using the json module. Indeed, the method signatures are the same. Example code:
toxml = {True: '1', False: 0} # Dictionary # To dump to a file import xickle xickle.dump(toxml, filename) # To dump to a string containing the well-formed xml import xickle xickle.dumps(toxml) # To read in from a file import xickle dictionary = xickle.load(filename) # To read in from a string import xickle dictionary = xickle.loads(xmlstring)
No comments:
Post a Comment