orionis 0.226.0__py3-none-any.whl → 0.227.0__py3-none-any.whl
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.
- orionis/framework.py +1 -1
- orionis/luminate/support/environment/contracts/__init__.py +0 -0
- orionis/luminate/support/environment/contracts/env.py +68 -0
- orionis/luminate/support/environment/env.py +2 -1
- {orionis-0.226.0.dist-info → orionis-0.227.0.dist-info}/METADATA +1 -1
- {orionis-0.226.0.dist-info → orionis-0.227.0.dist-info}/RECORD +10 -8
- {orionis-0.226.0.dist-info → orionis-0.227.0.dist-info}/LICENCE +0 -0
- {orionis-0.226.0.dist-info → orionis-0.227.0.dist-info}/WHEEL +0 -0
- {orionis-0.226.0.dist-info → orionis-0.227.0.dist-info}/entry_points.txt +0 -0
- {orionis-0.226.0.dist-info → orionis-0.227.0.dist-info}/top_level.txt +0 -0
orionis/framework.py
CHANGED
File without changes
|
@@ -0,0 +1,68 @@
|
|
1
|
+
from abc import ABC, abstractmethod
|
2
|
+
from typing import Any, Optional, Union
|
3
|
+
|
4
|
+
class IEnv(ABC):
|
5
|
+
"""
|
6
|
+
Interface for a utility class to manage environment variables in a `.env` file.
|
7
|
+
"""
|
8
|
+
|
9
|
+
@staticmethod
|
10
|
+
@abstractmethod
|
11
|
+
def get(key: str, default: Optional[Any] = None) -> Any:
|
12
|
+
"""
|
13
|
+
Retrieve the value of an environment variable.
|
14
|
+
|
15
|
+
Parameters
|
16
|
+
----------
|
17
|
+
key : str
|
18
|
+
Name of the environment variable.
|
19
|
+
default : Any, optional
|
20
|
+
Default value if variable is not found.
|
21
|
+
|
22
|
+
Returns
|
23
|
+
-------
|
24
|
+
Any
|
25
|
+
Parsed value or default.
|
26
|
+
"""
|
27
|
+
pass
|
28
|
+
|
29
|
+
@staticmethod
|
30
|
+
@abstractmethod
|
31
|
+
def set(key: str, value: Union[str, int, float, bool, list, dict]) -> None:
|
32
|
+
"""
|
33
|
+
Set the value of an environment variable.
|
34
|
+
|
35
|
+
Parameters
|
36
|
+
----------
|
37
|
+
key : str
|
38
|
+
Name of the environment variable.
|
39
|
+
value : str, int, float, bool, list, or dict
|
40
|
+
Value to assign, will be serialized.
|
41
|
+
"""
|
42
|
+
pass
|
43
|
+
|
44
|
+
@staticmethod
|
45
|
+
@abstractmethod
|
46
|
+
def unset(key: str) -> None:
|
47
|
+
"""
|
48
|
+
Remove an environment variable.
|
49
|
+
|
50
|
+
Parameters
|
51
|
+
----------
|
52
|
+
key : str
|
53
|
+
Name of the environment variable.
|
54
|
+
"""
|
55
|
+
pass
|
56
|
+
|
57
|
+
@staticmethod
|
58
|
+
@abstractmethod
|
59
|
+
def all() -> dict:
|
60
|
+
"""
|
61
|
+
Retrieve all environment variables as a dictionary.
|
62
|
+
|
63
|
+
Returns
|
64
|
+
-------
|
65
|
+
dict
|
66
|
+
Dictionary of parsed environment variables.
|
67
|
+
"""
|
68
|
+
pass
|
@@ -1,13 +1,14 @@
|
|
1
1
|
import os
|
2
2
|
from typing import Any, Optional, Union
|
3
3
|
from dotenv import set_key, unset_key, dotenv_values
|
4
|
+
from orionis.luminate.support.environment.contracts.env import IEnv
|
4
5
|
from orionis.luminate.support.environment.functions import (
|
5
6
|
_initialize,
|
6
7
|
_parse_value,
|
7
8
|
_serialize_value,
|
8
9
|
)
|
9
10
|
|
10
|
-
class Env:
|
11
|
+
class Env(IEnv):
|
11
12
|
"""
|
12
13
|
A utility class for managing environment variables stored in a `.env` file.
|
13
14
|
"""
|
@@ -1,6 +1,6 @@
|
|
1
1
|
orionis/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
2
2
|
orionis/console.py,sha256=4gYWxf0fWYgJ4RKwARvnTPh06FL3GJ6SAZ7R2NzOICw,1342
|
3
|
-
orionis/framework.py,sha256=
|
3
|
+
orionis/framework.py,sha256=0nR8w7tJGfgogJhNQFfagqqt9GL60Wa2Ejc306-4RgA,1458
|
4
4
|
orionis/installer/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
5
5
|
orionis/installer/manager.py,sha256=Li4TVziRXWfum02xNG4JHwbnLk-u8xzHjdqKz-D894k,2755
|
6
6
|
orionis/installer/output.py,sha256=7O9qa2xtXMB_4ZvVi-Klneom9YazwygAd_4uYAoxhbU,8548
|
@@ -161,9 +161,11 @@ orionis/luminate/support/asynchrony/async_io.py,sha256=IkgVrJnnvNExkhy9brfZpTq2E
|
|
161
161
|
orionis/luminate/support/asynchrony/contracts/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
162
162
|
orionis/luminate/support/asynchrony/contracts/async_coroutine.py,sha256=lwtDa6r7I6qbxzKr5MyJtMRaYW6e5j2dbymEPNaNIEo,614
|
163
163
|
orionis/luminate/support/environment/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
164
|
-
orionis/luminate/support/environment/env.py,sha256=
|
164
|
+
orionis/luminate/support/environment/env.py,sha256=CNzVq-UQL4hu7Fdu9xAhpd_4VVFhC16yJxK6MDQ1GFU,3366
|
165
165
|
orionis/luminate/support/environment/functions.py,sha256=qiKc2oPaWwspSeUF0E8ZZYMsKlFDI1VGLl6vfpAnP4s,1129
|
166
166
|
orionis/luminate/support/environment/helper.py,sha256=G1670w1xkI1pj-rW_inv6D3XmU4oliwnWnrJO5CBm2E,818
|
167
|
+
orionis/luminate/support/environment/contracts/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
168
|
+
orionis/luminate/support/environment/contracts/env.py,sha256=buJfzebBOUuq2CnhQCWlnJuzJAEo06-S0_SPR4N_mOY,1647
|
167
169
|
orionis/luminate/support/inspection/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
168
170
|
orionis/luminate/support/inspection/container_integrity.py,sha256=6d9FsGk-Rm1AXgqBS3Nww49dR7n1ptXTTNyGUuBHgNY,10111
|
169
171
|
orionis/luminate/support/inspection/functions.py,sha256=4wDT7iNp-5l4vuHk0UsIxN9wakASJRD4V0KY24uMDzk,7227
|
@@ -248,9 +250,9 @@ tests/support/patterns/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3
|
|
248
250
|
tests/support/patterns/test_singleton.py,sha256=U5uwpgGcP7-fIazsnFLwg30mmc24S62udhVIHuL-scY,634
|
249
251
|
tests/support/standard/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
250
252
|
tests/support/standard/test_std.py,sha256=bJ5LV_OKEEZa_Bk3PTk9Kapk6qECLzcKf0hfR_x2QqM,2042
|
251
|
-
orionis-0.
|
252
|
-
orionis-0.
|
253
|
-
orionis-0.
|
254
|
-
orionis-0.
|
255
|
-
orionis-0.
|
256
|
-
orionis-0.
|
253
|
+
orionis-0.227.0.dist-info/LICENCE,sha256=-_4cF2EBKuYVS_SQpy1uapq0oJPUU1vl_RUWSy2jJTo,1111
|
254
|
+
orionis-0.227.0.dist-info/METADATA,sha256=BxMm8aSj3n5ZUXYQxq7ySfACGflGEX1qWyzk4bSARoM,3003
|
255
|
+
orionis-0.227.0.dist-info/WHEEL,sha256=In9FTNxeP60KnTkGw7wk6mJPYd_dQSjEZmXdBdMCI-8,91
|
256
|
+
orionis-0.227.0.dist-info/entry_points.txt,sha256=a_e0faeSqyUCVZd0MqljQ2oaHHdlsz6g9sU_bMqi5zQ,49
|
257
|
+
orionis-0.227.0.dist-info/top_level.txt,sha256=2bdoHgyGZhOtLAXS6Om8OCTmL24dUMC_L1quMe_ETbk,14
|
258
|
+
orionis-0.227.0.dist-info/RECORD,,
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|