Module for reading and writing properties-files.
Project description
properties.py
Installation
pip install --upgrade properties.py
Usage
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) # {'name': 'NoName', 'age': -1, 'sex': 'M', 'data': {'region': 39, 'keywords': ['man', 'human', 14.88]}}
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distributions
No source distribution files available for this release.See tutorial on generating distribution archives.
Built Distribution
Close
Hashes for properties.py-1.0.0-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 61912ba854b526b9f2a76fc00ba4f366c4b1e2fbbe4695844e81bb9742e48a2d |
|
MD5 | 5d595f83b91025e37f4e8fac353102f8 |
|
BLAKE2b-256 | 2f7ff5c00e2f42297825b502e2b44036d1802ac9a95f41363514651603d27ff7 |