THE ORIONIS API
Build with clarity.
Explore the building blocks of an async-first Python framework. Every module, class, and method — connected, searchable, and ready to build with.
class documentation
Undocumented
| Class Method | all |
Retrieve all environment variables as a dictionary. |
| Class Method | get |
Get the value of an environment variable by key. |
| Class Method | reload |
Reload environment variables from the .env file. |
| Class Method | set |
Set or update an environment variable. |
| Class Method | unset |
Remove an environment variable from the .env file. |
| Class Variable | __slots__ |
Undocumented |
Get the value of an environment variable by key.
| Parameters | |
key:str | Name of the environment variable to retrieve. |
default:object | None, optional | Value to return if the environment variable is not found. Defaults to None. |
| Returns | |
object | Value of the environment variable if it exists, otherwise the provided default value. |
Reload environment variables from the .env file.
Refresh the shared DotEnv singleton in place: the file is read again into the process environment and the in-memory snapshot is rebuilt, keeping the same instance. Useful when the .env file has been modified externally and the latest values need to be reflected in the application.
| Returns | |
bool | True if the environment variables were reloaded successfully, False if the shared DotEnv instance could not be built because of an OSError or a ValueError. |
| Raises | |
RuntimeError | If the reload itself fails. DotEnv.reload wraps every failure in this type, which is deliberately left to propagate. |
def set(cls, key:
str, value: str | float | bool | list | dict | tuple | set, type_hint: str | EnvironmentValueType | None = None, *, only_os: bool = False) -> bool:
(source)
¶
Set or update an environment variable.
| Parameters | |
key:str | Name of the environment variable to set or update. |
value:str | float | bool | list | dict | tuple | set | Value to assign to the environment variable. |
typestr | EnvironmentValueType | None, optional | Type hint for the variable. Supported types: 'str', 'int', 'float', 'bool', 'list', 'dict', 'tuple', 'set', 'base64', 'path'. |
onlybool, optional | If True, set the variable only in the OS environment. |
| Returns | |
bool | True if the environment variable was set successfully, otherwise False. |