Dot Notation Access for API Response Handling #56
Labels
status: available
No one has claimed responsibility for resolving this issue.
type: feature
New feature or request
py-jelastic version
0.0.4
Jelastic version
8.4.1
Feature type
New functionality
Proposed functionality
The addition of a feature to convert dictionaries to objects with dot notation access in py-jelastic would enhance the flexibility and readability of the code when managing Jelastic environment configurations. The feature would involve creating a new utility class within py-jelastic that can recursively convert dictionaries into objects. This class should be able to handle nested dictionaries and convert them into nested objects, providing a clean and Pythonic way to access response keys. It should also include error handling to manage attempts to access keys that do not exist.
Use case
This feature would be beneficial for py-jelastic users who prefer object-oriented access to configurations rather than dictionary-based access, which can be verbose and error-prone when dealing with deeply nested structures. For instance, users managing complex configurations with multiple nested parameters would find it easier to read and write
config.database.host
instead ofconfig['database']['host']
. This can also reduce the likelihood of typos and runtime errors due to incorrect key access, thus improving the overall reliability of configuration management within the py-jelastic framework.External dependencies
No response
The text was updated successfully, but these errors were encountered: