No project description provided
Project description
安装 pip install pr-properties
这是一个读写properties工具
from pr_properties import pr_properties
# 读写properties文件
p = pr_properties.read(r'./pool.properties') # p = PropertiesHandler(r"./pool.properties").read()
print(p['master.initialSize']) # 4
# 支持get
print(p.get('master.initialSize'))
# 修改
p['master.initialSize'] = 5
# 写入,写入后会关闭文件;写入功能请慎重使用
p.write()
p.read(r'./pool.properties')
# 验证是否修改
print(p['master.initialSize']) # 5
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
pr_properties-1.8.5.tar.gz
(16.2 kB
view details)
Built Distribution
File details
Details for the file pr_properties-1.8.5.tar.gz
.
File metadata
- Download URL: pr_properties-1.8.5.tar.gz
- Upload date:
- Size: 16.2 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/4.0.2 CPython/3.9.7
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | e1cf7fb193b1be37f7adadf94bbe94732f4c6cbde8209c3ed69203667d44506d |
|
MD5 | 6bc54adec00df25c8162796334eb5226 |
|
BLAKE2b-256 | 8b1cdc2f2744e17bde2518d310362011777c2cc322d2781af2a7d51f9fb172ce |
File details
Details for the file pr_properties-1.8.5-py3-none-any.whl
.
File metadata
- Download URL: pr_properties-1.8.5-py3-none-any.whl
- Upload date:
- Size: 18.0 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/4.0.2 CPython/3.9.7
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 53aad266714e8f46da616cda5e10d57c7fdfe90607f72e8ad6dd179147932181 |
|
MD5 | 3fe879df8c5ffbbde3cc80e3511fbf6f |
|
BLAKE2b-256 | 4cce6768b739e73066f895cab10b16e31ac816652d9edcab099189573741ea12 |