javaproperties
Read & write Java .properties files
What it is and what it does
javaproperties is a library for reading and writing Java .properties configuration files from Python. It handles both the standard line-oriented format (key=value pairs with escape sequences) and the XML variant, and provides a json-like API with load/loads/dump/dumps functions. It also includes an optional Properties class that mimics Java's java.util.Properties behavior for developers migrating from Java or needing close compatibility.
The package handles Unicode properly, including escape sequences like \uXXXX, and supports common .properties features such as comments, whitespace, and colon/equals delimiters. It has no runtime dependencies and works on modern Python versions (3.8+) across CPython and PyPy, making it suitable for configuration interchange between Java and Python systems.
Use it for:
- Load Java application configuration files into Python for testing or tooling without manual parsing
- Export Python configuration dictionaries to .properties format for consumption by Java applications
- Convert between .properties line format and XML format for compatibility with different Java tools
- Build Python utilities that manipulate Java .properties files while preserving formatting and comments
- Interoperate with legacy Java systems that use .properties for configuration management
Worth the install?
AI-flagged interpretation of the facts on this page — verify before relying
Reads and writes Java .properties files in both line-oriented and XML formats with a simple API modeled on the json module, plus an optional Properties class for Java compatibility.
Yes. javaproperties is a focused, well-maintained library with zero dependencies, permissive licensing, and active upstream support. Install it if you need to read or write Java .properties files from Python; it solves that problem cleanly without friction. No known security issues.
Install
javaproperties on PyPI
pip
pip install javapropertiesuv
uv add javapropertiespoetry
poetry add javapropertiesInstalling javaproperties
Before you install
Low friction: pure Python wheel with no runtime dependencies. Actively maintained as of 2026-07-20 with support across Python 3.8–3.13 and both CPython and PyPy.
License in practice
MIT license is permissive; you may use, modify, and distribute this package freely in commercial and private projects with minimal restrictions.
Quickstart
import javaproperties
properties = {"key": "value", "host:port": "127.0.0.1:80"}
print(javaproperties.dumps(properties))
loaded = javaproperties.loads("key=value\nhost\\:port=127.0.0.1:80")
print(loaded)
Requires Python 3.8 or higher.
Verify before relying
- Whether XML parsing handles all Java .properties DTD variants without loss of fidelity
- Performance characteristics when handling large .properties files (thousands of keys)
Package facts
| License | MIT (permissive) |
| Python support | supports the current Python release (>=3.8) |
| Install friction | low — pure-Python wheel |
| Runtime dependencies | none |
| Maintenance | actively maintained — 621 days since the last release |
| Last repo commit | |
| First released | |
| Downloads | 5,895,523/month — #2,016 on PyPI (30-day window, as of 2026-08-14) |
| Known vulnerabilities | none known (OSV.dev, checked 2026-08-14) |
Evidence: javaproperties-0.8.2-py3-none-any.whl
Keywords: config, configfile, configuration, java, javaproperties, properties
Tags
More Software Development packages
Provides backported and experimental type hints…
permissive · top 100 on PyPI
numpyNumPy provides an N-dimensional array object…
permissive · top 100 on PyPI
fastapiFastAPI is a Python web framework for building…
permissive · top 100 on PyPI
annotated-docProvides a way to document function parameters,…
permissive · top 100 on PyPI
typerTyper builds command-line applications from…
permissive · top 1,000 on PyPI
distlibDistlib provides low-level packaging utilities…
permissive · top 1,000 on PyPI
dict2xmlConverts Python dictionaries into XML strings…
permissive · top 5,000 on PyPI
in-placeProvides an InPlace class for reading and…
permissive · top 15,000 on PyPI
mpxjReads and writes project management file…
copyleft · top 15,000 on PyPI
numpyencoderProvides a custom JSON encoder class that…
permissive · top 15,000 on PyPI
dicttoxmlConverts Python dictionaries and other native…
copyleft · top 5,000 on PyPI
java-manifestEncode and decode Java's META-INF/MANIFEST.MF…
unclear · top 15,000 on PyPI
py-serializableSerializes and deserializes Python classes to…
permissive · top 1,000 on PyPI
read-versionExtracts a version string or other variable…
permissive · top 15,000 on PyPI
typing-jsonProvides type-aware JSON serialization and…
permissive · top 15,000 on PyPI
biocReads and writes biomedical text annotation…
permissive · top 15,000 on PyPI