yta-programming-env 0.3.1__tar.gz → 0.3.2__tar.gz

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: yta-programming-env
3
- Version: 0.3.1
3
+ Version: 0.3.2
4
4
  Summary: Youtube Autonomous Programming Dependencies Module
5
5
  License-File: LICENSE
6
6
  Author: danialcala94
@@ -1,6 +1,6 @@
1
1
  [project]
2
2
  name = "yta-programming-env"
3
- version = "0.3.1"
3
+ version = "0.3.2"
4
4
  description = "Youtube Autonomous Programming Dependencies Module"
5
5
  authors = [
6
6
  {name = "danialcala94",email = "danielalcalavalera@gmail.com"}
@@ -54,7 +54,6 @@ class Environment:
54
54
  )
55
55
  )
56
56
 
57
-
58
57
  @staticmethod
59
58
  def get_current_project_env(
60
59
  variable: str,
@@ -72,3 +71,14 @@ class Environment:
72
71
  ParameterValidator.validate_mandatory_string('variable', variable, do_accept_empty = False)
73
72
 
74
73
  return Environment.get_current_project_env_dict(env_filename).get(variable, default_value)
74
+
75
+ @staticmethod
76
+ def get_env(
77
+ variable: str,
78
+ default_value: Union[str, bool, float, int, None] = None,
79
+ ):
80
+ """
81
+ Get the `variable` from the `os` environment by doing
82
+ a `os.getenv(variable)`.
83
+ """
84
+ return os.getenv(variable, default_value)