Registry / serialization / application-properties

application-properties

JSON →
library0.9.3pypypi✓ verified 23d ago

Application-properties is a Python library (current version 0.9.2) that provides a simple, unified manner of accessing program properties. It supports loading configuration from various formats including JSON, TOML, YAML, JSON5, and traditional .properties files. The library emphasizes ease of use, testability, extensibility, and hierarchical property access, releasing frequently with new features and fixes.

pip install application-properties
INSTALL
IMPORT
SIG · APPLICATION-PROPER
A
application-properties
serializationpythonv0.9.3
Install
2.0s avg
Import
230ms
Disk
22MB
Pass rate
10/ 10
Env Coverage10 / 10
glibc
3.93.13
musl
3.93.13
Install & Compatibility
Where this runs
tested against v0.9.3 · pip install
no network on importno background threads
Install × environment matrix
Each cell = how many times install + import succeeded across repeated harness runs. Partial = flaky.
glibc = Debian/Ubuntu slim · musl = Alpine Linux
musl
py 3.103.910 runs
installs and imports cleanly · install 0.0s · import 0.235s · 24.7MB
glibc
py 3.103.910 runs
installs and imports cleanly · install 2.0s · import 0.225s · 22MB
22MB installed
● package 22MB
Code
Verified usage

Verified import paths — ran on the pinned version, not inferred.

ApplicationProperties
from application_properties import ApplicationProperties

Demonstrates how to load properties from a simple `.properties` file and access values. The example creates a temporary `config.properties` file and cleans it up afterwards.

import os from application_properties import ApplicationProperties # Create a dummy config file for demonstration config_content = """ my.setting = some_value another.setting = 123 """ with open("config.properties", "w") as f: f.write(config_content) try: # Load properties from a file named config.properties app_props = ApplicationProperties("config.properties") # Access a property value = app_props.get_string_property("my.setting") print(f"Value of 'my.setting': {value}") # Access a property with a default value if not found not_found_value = app_props.get_string_property("non.existent", "default_value") print(f"Value of 'non.existent' (with default): {not_found_value}") except Exception as e: print(f"An error occurred: {e}") finally: # Clean up the dummy file if os.path.exists("config.properties"): os.remove("config.properties")
Debug
Known issues
gotchaStarting from version 0.9.2, the library's loaders for JSON, YAML, and TOML gained enhanced support for handling `.` characters within keys. By default, `.` implies hierarchical structure. If you relied on `.` being treated as a literal character in keys for these formats in older versions, you might need to adjust your configuration or use the 'master switch' to control this behavior.
fix
Review configuration files (especially JSON, YAML, TOML) to ensure correct hierarchical parsing. If a literal `.` in a key is intended, consult the official documentation for the 'master switch' to disable hierarchical interpretation for specific keys or loaders.
affects: >=0.9.2
gotchaFunctionality for YAML, TOML, and JSON5 files requires installing optional dependencies. If these are not installed, attempts to load these file types will fail with import errors.
fix
Install with optional extras, e.g., `pip install application-properties[yaml,toml,json5]` to include all supported loaders. Install only the specific extras you need to avoid unnecessary dependencies.
affects: All versions
breakingThe `application-properties` library requires Python 3.10 or newer. Installing or running on older Python versions will result in environment or syntax errors.
fix
Ensure your Python environment is version 3.10.0 or higher. Upgrade Python if necessary.
affects: <3.10.0
Errors
Common errors & fixes
ModuleNotFoundError: No module named 'application_properties'
The 'application-properties' package is not installed or the module name is incorrect.
fix
Install the package using 'pip install application-properties' and import it correctly.
ImportError: cannot import name 'properties' from 'application_properties'
Attempting to import a non-existent 'properties' attribute from the 'application_properties' module.
fix
Check the library's documentation for the correct import statements and available attributes.
TypeError: 'NoneType' object is not subscriptable
The configuration file is missing or incorrectly specified, leading to a NoneType object when attempting to access properties.
fix
Ensure the configuration file exists at the specified path and is correctly formatted.
ValueError: No section: 'default'
The specified section 'default' is missing in the configuration file.
fix
Add the 'default' section to the configuration file or specify an existing section.
FileNotFoundError: [Errno 2] No such file or directory: 'config.properties'
The specified configuration file 'config.properties' does not exist in the expected directory.
fix
Verify the file's existence and provide the correct path to the configuration file.
Upgrade
Version history
0.9.3latest on PyPI · released Jun 2, 2026
Audit
Dependencies
PyYAMLoptionalRequired for loading properties from YAML files.
tomloptionalRequired for loading properties from TOML files.
json5optionalRequired for loading properties from JSON5 files (which support comments).
Agent activity
24 hits · last 30 days
node
20
OpenAI (training)
1
Resources
application-properties — pip install application-properties · libregistry