Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/minshug/pyusmap
.usmap parser
https://github.com/minshug/pyusmap
Last synced: 25 days ago
JSON representation
.usmap parser
- Host: GitHub
- URL: https://github.com/minshug/pyusmap
- Owner: MinshuG
- Created: 2021-01-09T06:34:26.000Z (almost 4 years ago)
- Default Branch: master
- Last Pushed: 2024-01-07T22:48:17.000Z (12 months ago)
- Last Synced: 2024-08-11T11:06:24.632Z (4 months ago)
- Language: Python
- Size: 25.4 KB
- Stars: 2
- Watchers: 1
- Forks: 2
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# pyUsmap
.usmap reader[![pypi](https://img.shields.io/pypi/v/pyusmap.svg)](https://pypi.python.org/pypi/pyusmap/)
[![Downloads](https://pepy.tech/badge/pyusmap)](https://pepy.tech/project/pyusmap)# Installation
`pip install pyUsmap`# Usages
```py
from Usmap import Usmap
import jsonwith open("xyz.usmap", "rb") as f:
data = Usmap(f).read()# from bytes or byte array
import iodata = 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)```
# Requirements* Python 3
* Brotli