diff --git a/src/zrb/task_env/env.py b/src/zrb/task_env/env.py index a5c5a4b3..29ff8c33 100644 --- a/src/zrb/task_env/env.py +++ b/src/zrb/task_env/env.py @@ -26,34 +26,43 @@ def __init__( def get_name(self) -> str: ''' + # Description Return environment's name. ''' return self.__name def get_os_name(self) -> Optional[str]: ''' + # Description Return environment's os name. ''' return self.__os_name def get_default(self) -> str: ''' + # Description Return environment's default value. ''' return self.__default def should_render(self) -> bool: ''' + # Description Return boolean value, whether the value should be rendered or not. ''' return self.__should_render def get(self, prefix: str = '') -> str: ''' + # Description + Return environment value. - You can use prefix to distinguish 'DEV', 'PROD' - Example: + You can use prefix to distinguish development environment + (e.g., 'DEV', 'PROD') + + # Example + ```python os.environ['DEV_SERVER'] = 'localhost' os.environ['PROD_SERVER'] = 'example.com' diff --git a/src/zrb/task_env/env_file.py b/src/zrb/task_env/env_file.py index a09f083a..cdcdcb6a 100644 --- a/src/zrb/task_env/env_file.py +++ b/src/zrb/task_env/env_file.py @@ -25,7 +25,16 @@ def __init__( def get_envs(self) -> List[Env]: ''' + # Description + Return list of Env based on the environment file. + + # Example + + ```python + env_file = EnvFile(env_file='some_file.env') + envs: List[Env] = env_file.get_envs() + ``` ''' if self.__env_list_fetched: return self.__env_list