ORIONIS API REFERENCE

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
def all(cls) -> dict[str, Any]: (source)

Retrieve all environment variables as a dictionary.

Access the shared DotEnv singleton instance and return all loaded environment variables in dictionary format for inspecting current environment configuration.

Returns
dict[str, Any]Dictionary containing all environment variables loaded by DotEnv.
def get(cls, key: str, default: object | None = None) -> object: (source)

Get the value of an environment variable by key.

Parameters
key:strName of the environment variable to retrieve.
default:object | None, optionalValue to return if the environment variable is not found. Defaults to None.
Returns
objectValue of the environment variable if it exists, otherwise the provided default value.
def reload(cls) -> bool: (source)

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
boolTrue 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
RuntimeErrorIf 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:strName of the environment variable to set or update.
value:str | float | bool | list | dict | tuple | setValue to assign to the environment variable.
type_hint:str | EnvironmentValueType | None, optionalType hint for the variable. Supported types: 'str', 'int', 'float', 'bool', 'list', 'dict', 'tuple', 'set', 'base64', 'path'.
only_os:bool, optionalIf True, set the variable only in the OS environment.
Returns
boolTrue if the environment variable was set successfully, otherwise False.
def unset(cls, key: str, *, only_os: bool = False) -> bool: (source)

Remove an environment variable from the .env file.

Parameters
key:strName of the environment variable to remove.
only_os:bool, optionalIf True, remove the variable only from the OS environment. Defaults to False.
Returns
boolTrue if the environment variable was removed successfully, False otherwise.