reorg and other stuff
This commit is contained in:
6
apps/my_repo/src/my_pkg/__init__.py
Normal file
6
apps/my_repo/src/my_pkg/__init__.py
Normal file
@@ -0,0 +1,6 @@
|
||||
# print(f' Importing {__name__} '.center(50, '='))
|
||||
|
||||
from .foo import Foo
|
||||
from .my_sub_pkg.bar import Bar
|
||||
|
||||
# print(' Done '.center(50, '='))
|
||||
18
apps/my_repo/src/my_pkg/foo.py
Normal file
18
apps/my_repo/src/my_pkg/foo.py
Normal file
@@ -0,0 +1,18 @@
|
||||
from pathlib import Path
|
||||
|
||||
from appdaemon.adbase import ADBase
|
||||
|
||||
filename = Path(__file__).name
|
||||
# print(f' Importing {filename} '.center(50, '-'))
|
||||
|
||||
class Foo(ADBase):
|
||||
changes: bool = True
|
||||
|
||||
def initialize(self):
|
||||
self.adapi = self.get_ad_api()
|
||||
|
||||
self.adapi.log(f'Initialized app from {filename} new line changes: {self.changes}')
|
||||
# self.adapi.log(f'New log line: {self.changes}')
|
||||
# self.adapi.log(f'Even newer log line: {self.changes}')
|
||||
|
||||
# print(f' Foo.changes = {Foo.changes} '.center(50, '-'))
|
||||
5
apps/my_repo/src/my_pkg/my_sub_pkg/__init__.py
Normal file
5
apps/my_repo/src/my_pkg/my_sub_pkg/__init__.py
Normal file
@@ -0,0 +1,5 @@
|
||||
# print(f' Importing {__name__} '.center(50, '+'))
|
||||
|
||||
from .bar import Bar
|
||||
|
||||
# print(f' Done {__name__} '.center(50, '+'))
|
||||
12
apps/my_repo/src/my_pkg/my_sub_pkg/bar.py
Normal file
12
apps/my_repo/src/my_pkg/my_sub_pkg/bar.py
Normal file
@@ -0,0 +1,12 @@
|
||||
from pathlib import Path
|
||||
|
||||
from appdaemon.adbase import ADBase
|
||||
|
||||
filename = Path(__file__).name
|
||||
# print(f' Importing {filename} '.center(50, '-'))
|
||||
|
||||
class Bar(ADBase):
|
||||
def initialize(self):
|
||||
self.adapi = self.get_ad_api()
|
||||
self.adapi.log(f'Initialized app from {filename}')
|
||||
# self.adapi.log(f'CHANGED')
|
||||
13
apps/my_repo/src/my_pkg/my_sub_pkg/baz.py
Normal file
13
apps/my_repo/src/my_pkg/my_sub_pkg/baz.py
Normal file
@@ -0,0 +1,13 @@
|
||||
from pathlib import Path
|
||||
|
||||
from appdaemon.adbase import ADBase
|
||||
|
||||
filename = Path(__file__).name
|
||||
# print(f' Importing {filename} '.center(50, '-'))
|
||||
|
||||
class Baz(ADBase):
|
||||
def initialize(self):
|
||||
self.adapi = self.get_ad_api()
|
||||
self.adapi.log(f'Initialized app from {filename}')
|
||||
# self.adapi.log(f'Initialized app from {filename}')
|
||||
# self.adapi.log(f'CHANGED')
|
||||
Reference in New Issue
Block a user