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

Read typed environment values through the environment service facade.

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__ Declare that this class introduces no additional instance slots.
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, typing.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: object, 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:objectValue to serialize according to the hint, or its ordinary text form when no hint is supplied.
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 after the environment variable is successfully assigned.
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 after removal, including when the variable was already absent.
__slots__: tuple = (source)

Declare that this class introduces no additional instance slots.