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.1.0.tar.gz
(3.6 kB
view hashes)
Built Distribution
Close
Hashes for properties.py-1.1.0-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 3ee22a4b5b7f518797af09e9744224fca068ab7062dc1a63967555e28d582c9c |
|
MD5 | c9d59066e9e99c5d26c9ec7c79b48434 |
|
BLAKE2b-256 | 0ef374e9836b165ef9996982eff0df3ccc5bdb837b9b705c817c5226f3afeaca |