Metadata-Version: 2.4
Name: domovoy
Version: 0.6.0
Author: cargsl
License-File: LICENSE
Requires-Python: >=3.13.2
Requires-Dist: aiohttp>=3.10.5
Requires-Dist: apscheduler>=3.10.1
Requires-Dist: astral>=3.2
Requires-Dist: coloredlogs>=15.0.1
Requires-Dist: cron-converter>=1.2.1
Requires-Dist: idna>=3.7
Requires-Dist: importlab>=0.8
Requires-Dist: orjson>=3.10.6
Requires-Dist: pyserde[yaml]>=0.23.0
Requires-Dist: python-dateutil>=2.8.2
Requires-Dist: pytz~=2024.2
Requires-Dist: pyyaml>=6.0
Requires-Dist: requests<3,>=2.32.3
Requires-Dist: servents-data-model>=0.6.0
Requires-Dist: strawberry-graphql>=0.241.0
Requires-Dist: watchdog>=5.0.2
Requires-Dist: websockets>=12.0
Description-Content-Type: text/markdown

# Domovoy

Domovoy is a powerful application framework designed to drive automations for Home Assistant using Python. If you prefer writing your automations in pure Python rather than YAML, Node Red, or n8n, providing a more flexible and developer-friendly approach to home automation.

Inspired by AppDaemon, Domovoy is a completely new codebase built from the ground up with Python's async/await throughout, resulting in significantly improved resource efficiency and performance.

## Key Features

- **ServEnts Integration**: When paired with ServEnts (a Home Assistant custom component), Domovoy can create devices and entities directly from Python code, eliminating the need for manually configuring helpers in HA.

- **Type Safety**: Full support for Python typing, including typechecking for entities and services on the Home Assistant instance it connects to, catching errors before they happen.

- **Python-First Approach**: Write all your automations in Python with full IDE support, and the ability to leverage Python's rich ecosystem of libraries.

- **High Performance**: Leverages Python's async/await for efficient, non-blocking operations that make the most of your system resources.

## How to run

We prefer to use docker to execut

```bash
uv sync
python domovoy/cli.py --config config.yml
```

Missing Docs

## Basic App Template with Config

```python
from dataclasses import dataclass
from domovoy.applications import AppBase, AppConfigBase

# If the App uses a per-instance configuration
@dataclass
class AppNameConfig(AppConfigBase):
    ...


class AppName(AppBase[AppNameConfig]):
    async def initialize(self):
        ...
```

## Basic App Template without Config

```python
from domovoy.applications import AppBase, EmptyAppConfig

# If the App takes no configuration
class AppName(AppBase[EmptyAppConfig]):
    async def initialize(self):
        ...
```

## How to register an app

```python
from domovoy.applications.registration import register_app


register_app(
    app_class=AppName,
    app_name="app_name",
    config=AppNameConfig(

    ),
)
```

## Register multiple instances of the same AppType

```python
from domovoy.applications.registration import register_app_multiple


apps_to_register = {
    "some_app_name_a": SomeConfig(
        ...
    ),
    "some_app_name_b": SomeConfig(
        ...
    ),
    "some_app_name_c": SomeConfig(
        ...
    ),
    ...
}


register_app_multiple(
    app_class=AppName,
    configs=apps_to_register,
)
```
