Last updated:
0 purchases
properties.py 1.2.1
properties.py
Description
Module for reading/writing properties-files.
Installation
pip install -U properties.py
Usage
Code
import properties
user = {"name": "NoName", "age": -1, "sex": "M", "data": {"region": 39, "keywords": ["man", "human", 14.88]}}
with open("test.properties", "w", encoding="utf-8", errors="ignore") as file:
properties.dump(user, file)
with open("test.properties", "r", encoding="utf-8", errors="ignore") as file:
data = properties.load(file)
print(data)
Output
{'name': 'NoName', 'age': -1, 'sex': 'M', 'data': {'region': 39, 'keywords': ['man', 'human', 14.88]}}
For personal and professional use. You cannot resell or redistribute these repositories in their original state.
There are no reviews.