properties.py 1.2.1

Creator: bigcodingguy24

Last updated:

Add to Cart

Description:

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]}}

License

For personal and professional use. You cannot resell or redistribute these repositories in their original state.

Customer Reviews

There are no reviews.