blob: 1bde92bb9f0e7952247d349fd8a0ce596b88c693 [file] [log] [blame]
import cbor
data = {
"name": "python-cbor",
"versions": ["1", "2"],
"group": {
"is_a_package": True,
"value": 42
}
}
serialized = cbor.dumps(data)
print(serialized)
with open("/tmp/data.cbor", "wb") as f:
f.write(serialized)