tiferet 1.0.0a7__py3-none-any.whl → 1.0.0a8__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.
tiferet/contexts/app.py CHANGED
@@ -14,13 +14,24 @@ from ..domain import *
14
14
 
15
15
  # ** context: app_interface_context
16
16
  class AppInterfaceContext(Model):
17
+ '''
18
+ The application interface context is a class that is used to create and run the application interface.
19
+ '''
20
+
21
+ # * attribute: interface_id
22
+ interface_id = StringType(
23
+ required=True,
24
+ metadata=dict(
25
+ description='The interface ID.'
26
+ ),
27
+ )
17
28
 
18
29
  # * attribute: name
19
30
  name = StringType(
20
31
  required=True,
21
32
  metadata=dict(
22
33
  description='The application name.'
23
- )
34
+ ),
24
35
  )
25
36
 
26
37
  # * field: features
@@ -29,7 +40,7 @@ class AppInterfaceContext(Model):
29
40
  required=True,
30
41
  metadata=dict(
31
42
  description='The feature context.'
32
- )
43
+ ),
33
44
  )
34
45
 
35
46
  # * field: errors
@@ -38,14 +49,16 @@ class AppInterfaceContext(Model):
38
49
  required=True,
39
50
  metadata=dict(
40
51
  description='The error context.'
41
- )
52
+ ),
42
53
  )
43
54
 
44
55
  # * method: init
45
- def __init__(self, app_name: str, feature_context: FeatureContext, error_context: ErrorContext):
56
+ def __init__(self, interface_id: str, app_name: str, feature_context: FeatureContext, error_context: ErrorContext):
46
57
  '''
47
58
  Initialize the application interface context.
48
59
 
60
+ :param interface_id: The interface ID.
61
+ :type interface_id: str
49
62
  :param app_name: The application name.
50
63
  :type app_name: str
51
64
  :param feature_context: The feature context.
@@ -56,6 +69,7 @@ class AppInterfaceContext(Model):
56
69
 
57
70
  # Initialize the model.
58
71
  super().__init__(dict(
72
+ interface_id=interface_id,
59
73
  name=app_name,
60
74
  features=feature_context,
61
75
  errors=error_context
tiferet/contexts/env.py CHANGED
@@ -96,13 +96,14 @@ class EnvironmentContext(Model):
96
96
  app_interface: AppInterface = self.interfaces.get(interface_id)
97
97
 
98
98
  # Get the default dependencies for the app interface.
99
+ app_context = app_interface.get_dependency('app_context')
99
100
  dependencies = dict(
100
101
  interface_id=app_interface.id,
101
102
  app_name=app_interface.name,
102
103
  feature_flag=app_interface.feature_flag,
103
104
  data_flag=app_interface.data_flag,
104
105
  app_context=container_service.import_dependency(
105
- **app_interface.app_context.to_primitive()
106
+ **app_context.to_primitive()
106
107
  ),
107
108
  **app_interface.constants
108
109
  )
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.1
2
2
  Name: tiferet
3
- Version: 1.0.0a7
3
+ Version: 1.0.0a8
4
4
  Summary: A multi-purpose application framework embodying beauty in form.
5
5
  Home-page: https://github.com/greatstrength/app
6
6
  Download-URL: https://github.com/greatstrength/app
@@ -8,9 +8,9 @@ tiferet/commands/feature.py,sha256=tXa-MDf14ByIJqwQFeSUu2QLUjHPdsyvFNhj1XeaQVk,2
8
8
  tiferet/configs/__init__.py,sha256=NfT6XFNcJznOLXjMuNmj3XeaOPVWwbc-N4kVWaVjuD0,845
9
9
  tiferet/configs/app.py,sha256=6N6EDInaKggFKR070a5j6Oex51CKXFaYh8gdrWOdeug,298
10
10
  tiferet/contexts/__init__.py,sha256=6ElZETwHoWC-gUEm0XWnXbV_-liIgLGByGh62DO4AY8,140
11
- tiferet/contexts/app.py,sha256=MPRFu3ut7DOmc3i3PqLR96ymvWMShW6BUbY9eG8i6Eg,3296
11
+ tiferet/contexts/app.py,sha256=iZIrTrSJzTSZ6gg34jIlmE9u4a0GtsW6o-ksal24Pj8,3730
12
12
  tiferet/contexts/container.py,sha256=FUZ-JPRj4Y6sEmcZMb_BBGjho93yTzu7Wr4c6gIXADk,5050
13
- tiferet/contexts/env.py,sha256=yTcymmwo4p-7A8Dg-VJGaYAN7D3Q9yMSQ41MAW9y8lA,3433
13
+ tiferet/contexts/env.py,sha256=GA6GfGOo1yKRzZBJijAfgAqRVBTM8uXPEPnCZMg33O4,3485
14
14
  tiferet/contexts/error.py,sha256=VO3Wgkmf5bdK6LoT0xhQn1WeSAVulQwUhvBAsoUPd1c,2503
15
15
  tiferet/contexts/feature.py,sha256=TB1ncuiBKYcMu2eIqbWtenCTjdvPcnHnyYYmmP4_DwI,2654
16
16
  tiferet/contexts/request.py,sha256=TOECa0V1wKuNGCYFIRKxwsZVpLtP0FS_Nm96DaEVsWU,2726
@@ -32,8 +32,8 @@ tiferet/repos/error.py,sha256=8CEUd-FVfb4E6_w9gtQcaDv2V95CRZ2mWBRpTHttOcE,4249
32
32
  tiferet/repos/feature.py,sha256=Z_S3nQU6wTe6YpXNsqp94EKrPa45w3uL9L93wRCLPHw,4745
33
33
  tiferet/services/__init__.py,sha256=rwaCBwIfhqLkdXage-Q0hl_Ou7MAlGVW1Bg555uAUD8,44
34
34
  tiferet/services/container.py,sha256=ISJhkiNLV--nHbAv6Ajd3ug1cGiyazZoePJOCJu5n_s,1130
35
- tiferet-1.0.0a7.dist-info/LICENSE,sha256=e8_GutFM0sxbRlgUaeVsGvJ5uE-KvruLApOzIoHy_zU,1513
36
- tiferet-1.0.0a7.dist-info/METADATA,sha256=KOunSqxOKGo2DQUq_Kdp4d8PJKiKF3oD9fYERXWJL_0,422
37
- tiferet-1.0.0a7.dist-info/WHEEL,sha256=R06PA3UVYHThwHvxuRWMqaGcr-PuniXahwjmQRFMEkY,91
38
- tiferet-1.0.0a7.dist-info/top_level.txt,sha256=g19Qw0j_VxPw-fgPF1TMPwbtHjnEhNQs0fa69wJZ6IM,8
39
- tiferet-1.0.0a7.dist-info/RECORD,,
35
+ tiferet-1.0.0a8.dist-info/LICENSE,sha256=e8_GutFM0sxbRlgUaeVsGvJ5uE-KvruLApOzIoHy_zU,1513
36
+ tiferet-1.0.0a8.dist-info/METADATA,sha256=GZz-LeMsA4ZrdKlJUQ7V_HRPzcQ9qWYqpgAMc0WtMbc,422
37
+ tiferet-1.0.0a8.dist-info/WHEEL,sha256=R06PA3UVYHThwHvxuRWMqaGcr-PuniXahwjmQRFMEkY,91
38
+ tiferet-1.0.0a8.dist-info/top_level.txt,sha256=g19Qw0j_VxPw-fgPF1TMPwbtHjnEhNQs0fa69wJZ6IM,8
39
+ tiferet-1.0.0a8.dist-info/RECORD,,