.usmap reader
pip install pyUsmap
from Usmap import Usmap
import json
with open("xyz.usmap", "rb") as f:
data = Usmap(f).read()
# from bytes or byte array
import io
data = Usmap(io.BytesIO(b'')).read()
# writing to json
jsondict = data.GetValue() # get json serializable dict
with open("Mappings.json", "w") as f:
json.dump(jsondict, f, indent=4)
- Python 3
- Brotli