pyjavaproperties3
================
* Project hosting: <https://github.com/tgates42/pyjavaproperties/>
.. contents::
About
------------------
This is a "fork" of the "python replacement for java.util.Properties" recipe
on ASPN: <http://code.activestate.com/recipes/496795/> and uploaded by
Anand Balachandran Pillai.
The project is maintained by Jesse Noller <jnoller@gmail.com>, Anand Pilla
<abpillai@gmail.com>.
License
------------------
As with all ASPN recipes not otherwise licensed prior to July 15, 2008 on
aspn.activestate.com, the original recipe is under PSF License. For more
information, see the ASPN terms of service here:
<http://code.activestate.com/help/terms/>
While the licensing under the PSF license is sub-optimal, it is what it is. See
<http://docs.python.org/license.html> for more information about the PSF
license.
What this is
------------------
This module is designed to be a python equivalent to the `java.util.Properties <http://java.sun.com/j2se/1.5.0/docs/api/java/util/Properties.html>`_ class.
Currently, the basic input/output methods are supported, and there are plans
to add the XML input/output methods found in J2SE 5.0.
Fundamentally, this module is designed so that users can easily parse and
manipulate Java Properties files - that's it. There's a fair number of us
pythonistas who work in multi-language shops, and constantly writing your own
parsing mechanism is just painful. Not to mention Java guys are notoriously
unwilling to use anything which is cross-language for configuration, unless
it's XML, which is a form of self-punishment. :)
Plans
------------------
Here is a rough plan of features:
- Keep/maintain blank lines and comments found in the original file
- Make the module compatible with the new methods in J2SE 5.0
- Switch to/add python property access rather than direct dictionary get/set
- Add unit tests
- Add unicode support
- When-Pigs-Fly: If running within Jython, switch to java.util.Properties
under the hood
- Coercion/conversion to python types for values
Usage
------------------
This is the easy part::
from pyjavaproperties3 import Properties
p = Properties()
p.load(open('test2.properties'))
p.list()
print p
print p.items()
print p['name3']
p['name3'] = 'changed = value'
print p['name3']
p['new key'] = 'new value'
p.store(open('test2.properties','w'))
See also the Properties.list() method, which will return an iterator over the
property keys
Changes & News
--------------
0.6:
- Fix license, whitespace.
0.4:
- Patch from Pepper Lebeck-Jobe for handling ! style comments.
0.3:
- Keys that are added which were not part of the original file
are simply appended to the index. Shenanigans.
0.2:
- Added an internal list (self._keyorder) to keep an ordered index of keys
as they are encountered, so the file can we written-back out in the
same order.
0.1:
- Initial release/fork.
- Added setup/packaging and doc
- added in {foo} style references for previous properties, thanks to N B
on ASPN.
Metadata
Release files for pyjavaproperties3 0.6
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | Actions |
|---|---|---|---|---|
| pyjavaproperties3-0.6.tar.gz | 7.6 kB | Without provenance | Details for pyjavaproperties3-0.6.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| pyjavaproperties3-0.6-py3-none-any.whl | Python 3 | none | any | Details for pyjavaproperties3-0.6-py3-none-any.whl |
Total release size: 15.1 kB
Release files / pyjavaproperties3-0.6.tar.gz
| Download URL | pyjavaproperties3-0.6.tar.gz |
|---|---|
| Size | 7.6 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
19a60b02654c2e1eaaaf386c98b14b7b7808bdb04341d9d2fd00498dd080ee87
|
|
BLAKE2b-256 checksum How to use checksums |
e5872def1c5f4d92df1bb929833b0075d3b1cf118c27d13174e92148cfb13486
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/1.12.1 pkginfo/1.4.2 requests/2.21.0 setuptools/40.6.3 requests-toolbelt/0.8.0 tqdm/4.28.1 CPython/3.6.1
|
Release files / pyjavaproperties3-0.6-py3-none-any.whl
| Download URL | pyjavaproperties3-0.6-py3-none-any.whl |
|---|---|
| Size | 7.4 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
668656f36ec6192944f5d0c99eee6a3e3945e669b052d8fd8ccb9cb29aae2500
|
|
BLAKE2b-256 checksum How to use checksums |
92a60e86b70cec1aa5a8aa1923ed792e500c4b68633360dc3606f812476575cf
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/1.12.1 pkginfo/1.4.2 requests/2.21.0 setuptools/40.6.3 requests-toolbelt/0.8.0 tqdm/4.28.1 CPython/3.6.1
|
Security for pyjavaproperties3 0.6
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
No provenance found
None of the files in this release were uploaded with provenance metadata.
A note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.