skillfed

javaproperties

Read & write Java .properties files

javaproperties v0.8.2 5.9M downloads/30d#2,016 on PyPI32
Permissive license MIT Active released

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 javaproperties

uv

uv add javaproperties

poetry

poetry add javaproperties

Installing 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

Intended Audience :: DevelopersLicense :: OSI Approved :: MIT LicenseProgramming Language :: Python :: 3Programming Language :: Python :: 3 :: OnlyProgramming Language :: Python :: 3.10Programming Language :: Python :: 3.11Programming Language :: Python :: 3.12Programming Language :: Python :: 3.13Programming Language :: Python :: 3.8Programming Language :: Python :: 3.9Programming Language :: Python :: Implementation :: CPythonProgramming Language :: Python :: Implementation :: PyPyTopic :: Software DevelopmentTopic :: Software Development :: Libraries :: Java LibrariesTopic :: UtilitiesTyping :: Typed

Tags

java properties file parserread write .properties filesjava configuration files pythonproperties file serializationjava properties xml formatconfig file interop java
java-interopconfig-format

More Software Development packages