rats-apps 0.1.3__py3-none-any.whl → 0.1.3.dev8__py3-none-any.whl
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- rats/apps/__init__.py +10 -33
- rats/apps/_annotations.py +136 -46
- rats/apps/_composite_container.py +1 -3
- rats/apps/_container.py +8 -104
- rats/apps/_ids.py +7 -3
- rats/apps/_plugin_container.py +2 -17
- rats/apps/_scoping.py +2 -6
- {rats_apps-0.1.3.dist-info → rats_apps-0.1.3.dev8.dist-info}/METADATA +1 -3
- rats_apps-0.1.3.dev8.dist-info/RECORD +13 -0
- rats_apps-0.1.3.dev8.dist-info/entry_points.txt +3 -0
- rats/annotations/__init__.py +0 -25
- rats/annotations/_functions.py +0 -145
- rats/annotations/py.typed +0 -0
- rats/apps/_executables.py +0 -34
- rats/apps/_plugins.py +0 -23
- rats/apps/_runtimes.py +0 -41
- rats/apps/_simple_apps.py +0 -163
- rats/cli/__init__.py +0 -22
- rats/cli/_annotations.py +0 -40
- rats/cli/_click.py +0 -38
- rats/cli/_executable.py +0 -23
- rats/cli/_plugin.py +0 -68
- rats/cli/_plugins.py +0 -81
- rats/cli/py.typed +0 -0
- rats/logs/__init__.py +0 -8
- rats/logs/_plugin.py +0 -63
- rats_apps-0.1.3.dist-info/RECORD +0 -29
- rats_apps-0.1.3.dist-info/entry_points.txt +0 -4
- {rats_apps-0.1.3.dist-info → rats_apps-0.1.3.dev8.dist-info}/WHEEL +0 -0
rats/logs/__init__.py
DELETED
rats/logs/_plugin.py
DELETED
@@ -1,63 +0,0 @@
|
|
1
|
-
import logging.config
|
2
|
-
|
3
|
-
from rats import apps
|
4
|
-
|
5
|
-
logger = logging.getLogger(__name__)
|
6
|
-
|
7
|
-
|
8
|
-
@apps.autoscope
|
9
|
-
class _PluginEvents:
|
10
|
-
CONFIGURE_LOGGING = apps.ServiceId[apps.Executable]("configure-logging")
|
11
|
-
|
12
|
-
|
13
|
-
@apps.autoscope
|
14
|
-
class PluginServices:
|
15
|
-
EVENTS = _PluginEvents
|
16
|
-
|
17
|
-
|
18
|
-
class PluginContainer(apps.Container):
|
19
|
-
_app: apps.Container
|
20
|
-
|
21
|
-
def __init__(self, app: apps.Container) -> None:
|
22
|
-
self._app = app
|
23
|
-
|
24
|
-
@apps.group(PluginServices.EVENTS.CONFIGURE_LOGGING)
|
25
|
-
def _configure_logging(self) -> apps.Executable:
|
26
|
-
# in the future, we can use this plugin to make logging easily configurable
|
27
|
-
return apps.App(
|
28
|
-
lambda: logging.config.dictConfig(
|
29
|
-
{
|
30
|
-
"version": 1,
|
31
|
-
"disable_existing_loggers": False,
|
32
|
-
"formatters": {
|
33
|
-
"colored": {
|
34
|
-
"()": "colorlog.ColoredFormatter",
|
35
|
-
"format": (
|
36
|
-
"%(log_color)s%(asctime)s %(levelname)-8s [%(name)s][%(lineno)d]: "
|
37
|
-
"%(message)s%(reset)s"
|
38
|
-
),
|
39
|
-
"datefmt": "%Y-%m-%d %H:%M:%S",
|
40
|
-
"log_colors": {
|
41
|
-
"DEBUG": "white",
|
42
|
-
"INFO": "green",
|
43
|
-
"WARNING": "yellow",
|
44
|
-
"ERROR": "red,",
|
45
|
-
"CRITICAL": "bold_red",
|
46
|
-
},
|
47
|
-
}
|
48
|
-
},
|
49
|
-
"handlers": {
|
50
|
-
"console": {
|
51
|
-
"class": "logging.StreamHandler",
|
52
|
-
"level": "DEBUG",
|
53
|
-
"formatter": "colored",
|
54
|
-
"stream": "ext://sys.stderr",
|
55
|
-
}
|
56
|
-
},
|
57
|
-
"loggers": {
|
58
|
-
"": {"level": "INFO", "handlers": ["console"]},
|
59
|
-
"azure": {"level": "WARNING", "handlers": ["console"]},
|
60
|
-
},
|
61
|
-
}
|
62
|
-
)
|
63
|
-
)
|
rats_apps-0.1.3.dist-info/RECORD
DELETED
@@ -1,29 +0,0 @@
|
|
1
|
-
rats/annotations/__init__.py,sha256=wsGhRQzZrV2oJTnBAX0aGgpyT1kYT235jkP3Wb8BTRY,498
|
2
|
-
rats/annotations/_functions.py,sha256=ziAZOqS1lojfjDjZW7qPYNJUAFuLBWtVAoPsmJqxqpE,4356
|
3
|
-
rats/annotations/py.typed,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
4
|
-
rats/apps/__init__.py,sha256=z_6eujGnU6pW12xTRR1caTJzv5v8VEbt8yLmwnMBiik,1511
|
5
|
-
rats/apps/_annotations.py,sha256=6qBqjxfBBZyVMLT3COGgQ-flQL6Wkuzp_TtndD4TwmE,2458
|
6
|
-
rats/apps/_composite_container.py,sha256=s_of6NyyrjFVYWGVehyEHe9WJIPRCnbB-tyWyNF8zyc,585
|
7
|
-
rats/apps/_container.py,sha256=GTPu6qmVCy69w87kMsQcL5BJavgW9O9RxH0z0zQu3fY,6242
|
8
|
-
rats/apps/_executables.py,sha256=QJ5_UPdZPmDQ1a3cLRJDUoeUMzNMwa3ZHYhYeS3AVq4,971
|
9
|
-
rats/apps/_ids.py,sha256=T8Onrj79t8NPfBMQBk0xI6fIWDKF0m2JfFNrdtXAbWg,353
|
10
|
-
rats/apps/_namespaces.py,sha256=THUV_Xj5PtweC23Ob-zsSpk8exC4fT-qRwjpQ6IDm0U,188
|
11
|
-
rats/apps/_plugin_container.py,sha256=wmaBgxmvKo82ue9CrKHRXafgik5wIXh8XkEYMfhcTjs,1530
|
12
|
-
rats/apps/_plugins.py,sha256=mvSYQPi11wTGZpM4umoyD37Rc8CQX8nt5eAJbmLrBFM,688
|
13
|
-
rats/apps/_runtimes.py,sha256=nQWwC-O-j0bKCEkGpBSXhdtE0-X2ACeP7zXZfqaPGqg,1545
|
14
|
-
rats/apps/_scoping.py,sha256=EIUopw3b38CEV57kCmSKQTAnQQMcXHZ_vwtk9t0K__g,1453
|
15
|
-
rats/apps/_simple_apps.py,sha256=n-3zeHY3iintZ9LN597c7zDHv3DiIdl7c8NTk0gUk1Y,5477
|
16
|
-
rats/apps/py.typed,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
17
|
-
rats/cli/__init__.py,sha256=dMrubxMJocbl8QoI_3fKI0Dt0QHYAM5Mxh5Vj8OaX-w,664
|
18
|
-
rats/cli/_annotations.py,sha256=0dI8hu_y754Y53Pka1-mGEgHjjVcnIOGd8l1SFx8OBY,1190
|
19
|
-
rats/cli/_click.py,sha256=7-ClnYSW4poFr_B-Q6NT45DnMF1XL7ntUgwQqQ7q_eo,1036
|
20
|
-
rats/cli/_executable.py,sha256=kAQ9hImv3hBaScu6e19o_BMvl7tdYJql38E76S3FjSk,580
|
21
|
-
rats/cli/_plugin.py,sha256=j9exzjL4sTCrGvine0rxumdfl0RPGpOFk7Ysk73aKWk,2278
|
22
|
-
rats/cli/_plugins.py,sha256=H3-QdaICPJhCC5FkLHdXpwqe7Z0mpvsenakhNiPllC8,2739
|
23
|
-
rats/cli/py.typed,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
24
|
-
rats/logs/__init__.py,sha256=fCn4pfpYiAcTtt5CsnUZX68CjOB3KJHxMSiYxsma4qE,183
|
25
|
-
rats/logs/_plugin.py,sha256=eAAG4ci-XS9A9ituXj9PrcI6zH-xlCqhJlUbSGC-MYM,2175
|
26
|
-
rats_apps-0.1.3.dist-info/METADATA,sha256=Yq2F-tR2frGkVD_6doTpkajE1kFpoSIDzARZ58mwQfk,756
|
27
|
-
rats_apps-0.1.3.dist-info/WHEEL,sha256=sP946D7jFCHeNz5Iq4fL4Lu-PrWrFsgfLXbbkciIZwg,88
|
28
|
-
rats_apps-0.1.3.dist-info/entry_points.txt,sha256=9oOvf2loQr5ACWQgvuu9Q3KZIVIxKE5Aa-rLuUII5WQ,91
|
29
|
-
rats_apps-0.1.3.dist-info/RECORD,,
|
File without changes
|