Skip to content

Version 1.4.3

Latest
Compare
Choose a tag to compare
@croketillo croketillo released this 28 Jul 04:48

Refactorized code.

Renaming the Main Class: GetDockerContainers was renamed to DockerHelper to make it more descriptive and conventionally shorter.

Improvement in get_container_by_name: The logic was corrected to ensure that None is only returned if the container is not found. Previously, None was returned immediately if the first container did not match.

Simplified Properties: For methods that return container configurations, more concise methods like get with default values were used instead of manually checking if the information is an empty string.

Use of Dictionaries: The properties networks and mounted_volumes now use get to access attributes, making the code cleaner and safer against non-existent key errors.

Config Property: A config property was added to get the complete container configuration, eliminating the need to directly access attrs.

Log Methods: The methods related to logs were renamed to make them clearer (get_logs_since_date instead of get_logs_format_date).