Skip to main content

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


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)

Uploaded Source

Built Distribution

properties.py-1.1.0-py3-none-any.whl (4.6 kB view hashes)

Uploaded Python 3

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page