Skip to main content

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


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 details)

Uploaded Source

Built Distribution

properties_py-1.2.1-py3-none-any.whl (5.0 kB view details)

Uploaded Python 3

File details

Details for the file properties_py-1.2.1.tar.gz.

File metadata

  • Download URL: properties_py-1.2.1.tar.gz
  • Upload date:
  • Size: 3.5 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: poetry/1.7.0 CPython/3.9.13 Windows/10

File hashes

Hashes for properties_py-1.2.1.tar.gz
Algorithm Hash digest
SHA256 c08c75842985ce6d7c3a01c55d018945ec4e8ce06ae7b10510ed1b0b402ed252
MD5 55f3512971fd33226f52edaf856775b3
BLAKE2b-256 a3e8ddfc4d18bbb200ec4aec8d88836406d6d8c69f9bcd563552826c651ece6f

See more details on using hashes here.

File details

Details for the file properties_py-1.2.1-py3-none-any.whl.

File metadata

  • Download URL: properties_py-1.2.1-py3-none-any.whl
  • Upload date:
  • Size: 5.0 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: poetry/1.7.0 CPython/3.9.13 Windows/10

File hashes

Hashes for properties_py-1.2.1-py3-none-any.whl
Algorithm Hash digest
SHA256 82fd9247509f513a449122e18b5e6d384ed24be99841c0e82518b64798f2bb77
MD5 5a6861bfb8e5e30425358050416dc898
BLAKE2b-256 e7444a57fde8655f3f6e577980c50a95c0d62edc31bb39ed49f3cc5c03630937

See more details on using hashes here.

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