reorg and other stuff
This commit is contained in:
6
apps/app1/subdir/foo.py
Normal file
6
apps/app1/subdir/foo.py
Normal file
@@ -0,0 +1,6 @@
|
||||
from appdaemon.adapi import ADAPI
|
||||
|
||||
class Foo(ADAPI):
|
||||
def initialize(self):
|
||||
self.log(f'Initialized from {__file__}')
|
||||
|
||||
@@ -4,4 +4,8 @@ App1:
|
||||
|
||||
App2:
|
||||
module: app2.database
|
||||
class: OtherDatabaseApp
|
||||
class: OtherDatabaseApp
|
||||
|
||||
App1Foo:
|
||||
module: app1.subdir.foo
|
||||
class: Foo
|
||||
|
||||
@@ -1,27 +1,25 @@
|
||||
import logging
|
||||
import logging.config
|
||||
|
||||
import appdaemon.adbase as ad
|
||||
from appdaemon.adapi import ADAPI
|
||||
|
||||
|
||||
class HelloWorld(ad.ADBase):
|
||||
class HelloWorld(ADAPI):
|
||||
def initialize(self):
|
||||
self.adapi = self.get_ad_api()
|
||||
self.log = self.adapi.log
|
||||
self.log(f'Initialized app from {__file__}')
|
||||
|
||||
logging.config.dictConfig(
|
||||
{
|
||||
'version': 1,
|
||||
'disable_existing_loggers': False,
|
||||
'formatters': {'basic': {'style': '{', 'format': '{message}'}},
|
||||
'handlers': {'rich': {'()': 'rich.logging.RichHandler'}},
|
||||
'loggers': {
|
||||
'AppDaemon._app_management': {
|
||||
'level': 'DEBUG',
|
||||
'propagate': False,
|
||||
'handlers': ['rich'],
|
||||
}
|
||||
},
|
||||
}
|
||||
)
|
||||
# logging.config.dictConfig(
|
||||
# {
|
||||
# 'version': 1,
|
||||
# 'disable_existing_loggers': False,
|
||||
# 'formatters': {'basic': {'style': '{', 'format': '{message}'}},
|
||||
# 'handlers': {'rich': {'()': 'rich.logging.RichHandler'}},
|
||||
# 'loggers': {
|
||||
# 'AppDaemon._app_management': {
|
||||
# 'level': 'DEBUG',
|
||||
# 'propagate': False,
|
||||
# 'handlers': ['rich'],
|
||||
# }
|
||||
# },
|
||||
# }
|
||||
# )
|
||||
|
||||
@@ -0,0 +1,4 @@
|
||||
[project]
|
||||
name = "my_pkg"
|
||||
description="Config for AppDaemon testing"
|
||||
version = "0.1.0"
|
||||
@@ -1 +1,3 @@
|
||||
rich
|
||||
rich
|
||||
anyio
|
||||
pydantic
|
||||
@@ -1,8 +1,7 @@
|
||||
version: '3.9'
|
||||
services:
|
||||
appdaemon:
|
||||
container_name: appdaemon_dev
|
||||
image: appdaemon:jsl-dev
|
||||
image: appdaemon:local-dev
|
||||
volumes:
|
||||
- /etc/localtime:/etc/localtime:ro
|
||||
- /etc/timezone:/etc/timezone:ro
|
||||
|
||||
Reference in New Issue
Block a user