Module for reading/writing properties-files.
Project description
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]}}
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.2.1.tar.gz
(3.5 kB
view hashes)
Built Distribution
Close
Hashes for properties_py-1.2.1-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 82fd9247509f513a449122e18b5e6d384ed24be99841c0e82518b64798f2bb77 |
|
MD5 | 5a6861bfb8e5e30425358050416dc898 |
|
BLAKE2b-256 | e7444a57fde8655f3f6e577980c50a95c0d62edc31bb39ed49f3cc5c03630937 |