Cross-Language .properties file parser
Project description
XProperties
Install
pip install XProperties
Examples
Example 1
# example1.properties
username=Duelit
password=password
# example1.py
import XProperties
prop = XProperties.Properties()
prop.load("example1.properties")
# get property
print(prop.get_property("username"))
print(prop["username"])
# set property
prop.set_property("password", "password1")
prop["password"] = "password1"
# delete property
prop["delete"] = "delete me"
prop.delete_property("delete")
prop["delete"] = "delete me"
del prop["delete"]
# iterator
print(prop.list())
print([i for i in prop])
print(len(prop))
prop.save()
Example 2
# example2.py
import XProperties
prop = XProperties.Properties()
prop["username"] = "Duelit"
prop["password"] = "password"
prop.save("example2.properties")
License
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 Distributions
No source distribution files available for this release.See tutorial on generating distribution archives.
Built Distribution
Close
Hashes for XProperties-1.0.4-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 20c749d9daad0ae7007f725fa52bd6c595e4df57080c8ce24568de8e46970a36 |
|
MD5 | d573fed78abaf54744b1af8efe6ca8b7 |
|
BLAKE2b-256 | 7c407872a1f0ef127eaba91068d73635ff99a37038fe3ff2bc40c75eb6d4f075 |