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 Distribution
properties.py-1.0.2.tar.gz
(3.4 kB
view hashes)
Built Distribution
Close
Hashes for properties.py-1.0.2-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | db706708480da622f36f980cfcc8387e784382b8a9347e42edce3ed5b23af7df |
|
MD5 | 6aff3267cc987d6d44431467731a9683 |
|
BLAKE2b-256 | 409b1cd83e19d1d010560441edbc24bd91bb793d3bae10e1361a25f9164e4748 |