holado 0.4.0__py3-none-any.whl → 0.4.2__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.
Potentially problematic release.
This version of holado might be problematic. Click here for more details.
- holado/common/handlers/object.py +6 -0
- {holado-0.4.0.dist-info → holado-0.4.2.dist-info}/METADATA +2 -1
- {holado-0.4.0.dist-info → holado-0.4.2.dist-info}/RECORD +46 -25
- holado_core/tools/abstracts/blocking_command_service.py +9 -1
- holado_django/__init__.py +31 -0
- holado_django/server/HOWTO.txt +27 -0
- holado_django/server/django_projects/rest_api/db.sqlite3 +0 -0
- holado_django/server/django_projects/rest_api/manage.py +22 -0
- holado_django/server/django_projects/rest_api/rest_api/__init__.py +0 -0
- holado_django/server/django_projects/rest_api/rest_api/application/__init__.py +0 -0
- holado_django/server/django_projects/rest_api/rest_api/application/admin.py +3 -0
- holado_django/server/django_projects/rest_api/rest_api/application/apps.py +9 -0
- holado_django/server/django_projects/rest_api/rest_api/application/migrations/__init__.py +0 -0
- holado_django/server/django_projects/rest_api/rest_api/application/models.py +3 -0
- holado_django/server/django_projects/rest_api/rest_api/application/tests.py +3 -0
- holado_django/server/django_projects/rest_api/rest_api/application/views.py +6 -0
- holado_django/server/django_projects/rest_api/rest_api/asgi.py +16 -0
- holado_django/server/django_projects/rest_api/rest_api/settings.py +130 -0
- holado_django/server/django_projects/rest_api/rest_api/urls.py +35 -0
- holado_django/server/django_projects/rest_api/rest_api/wsgi.py +16 -0
- holado_django/server/django_server.py +110 -0
- holado_django/server/grpc_django_server.py +57 -0
- holado_django/tests/behave/steps/__init__.py +16 -0
- holado_django/tests/behave/steps/django_server_steps.py +83 -0
- holado_grpc/tests/behave/steps/private/api/grpc_steps.py +9 -9
- holado_logging/common/logging/log_config.py +4 -3
- holado_multitask/multitasking/multitask_manager.py +36 -10
- holado_python/standard_library/ssl/resources/certificates/tcpbin.crt +16 -16
- holado_python/standard_library/ssl/resources/certificates/tcpbin.key +26 -26
- holado_python/standard_library/ssl/ssl.py +5 -1
- holado_rest/api/rest/TODO.txt +1 -1
- holado_rest/api/rest/rest_client.py +9 -7
- holado_rest/tests/behave/steps/private/api/rest_steps.py +11 -13
- holado_swagger/swagger_hub/mockserver/mockserver_client.py +1 -1
- holado_system/system/command/command.py +31 -9
- holado_system/system/global_system.py +3 -3
- test_holado/environment.py +6 -4
- test_holado/features/NonReg/api/REST.feature +7 -2
- test_holado/features/NonReg/api/gRPC.feature +0 -6
- test_holado/initialize_holado.py +62 -0
- test_holado/logging.conf +4 -0
- test_holado/tools/django/api_rest/db.sqlite3 +0 -0
- {holado-0.4.0.dist-info → holado-0.4.2.dist-info}/WHEEL +0 -0
- {holado-0.4.0.dist-info → holado-0.4.2.dist-info}/licenses/LICENSE +0 -0
- /holado_helper/holado_module_template/{test → tests}/behave/steps/__init__.py +0 -0
- /holado_helper/holado_module_template/{test → tests}/behave/steps/private/__init__.py +0 -0
holado/common/handlers/object.py
CHANGED
|
@@ -86,6 +86,12 @@ class DeleteableObject(Object):
|
|
|
86
86
|
func = FunctionThreaded(self.__delete, name=f"delete object '{self.name}'", register_thread=False)
|
|
87
87
|
func.start()
|
|
88
88
|
func.join(timeout=30, raise_if_still_alive=False) # timeout of 30s to limit deadlock impact ; raise to False since exceptions are omitted in gc collect context
|
|
89
|
+
except AttributeError as exc:
|
|
90
|
+
if "'NoneType' object has no attribute" in str(exc):
|
|
91
|
+
# Simply return, this exception can appear when system in interrupting
|
|
92
|
+
return
|
|
93
|
+
else:
|
|
94
|
+
raise exc
|
|
89
95
|
except Exception as exc:
|
|
90
96
|
if "Python is likely shutting down" in str(exc):
|
|
91
97
|
# Simply return
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.4
|
|
2
2
|
Name: holado
|
|
3
|
-
Version: 0.4.
|
|
3
|
+
Version: 0.4.2
|
|
4
4
|
Summary: HolAdo framework
|
|
5
5
|
Project-URL: Homepage, https://gitlab.com/holado_framework/python
|
|
6
6
|
Project-URL: Issues, https://gitlab.com/holado_framework/python/-/issues
|
|
@@ -16,6 +16,7 @@ Classifier: Programming Language :: Python :: 3.11
|
|
|
16
16
|
Classifier: Programming Language :: Python :: 3.12
|
|
17
17
|
Requires-Python: >=3.10
|
|
18
18
|
Requires-Dist: behave==1.2.7.dev6
|
|
19
|
+
Requires-Dist: psutil
|
|
19
20
|
Requires-Dist: python-dateutil
|
|
20
21
|
Provides-Extra: ais
|
|
21
22
|
Requires-Dist: pyais; extra == 'ais'
|
|
@@ -7,7 +7,7 @@ holado/common/context/service_manager.py,sha256=LaCn8ukE1aqJynmwoexAYj5hCkdb_F3h
|
|
|
7
7
|
holado/common/context/session_context.py,sha256=jyCXydCk7RnTf35MFcqaEflOsjX5eK2U33uITeGqP6U,22477
|
|
8
8
|
holado/common/handlers/__init__.py,sha256=d0KDUpaAAw1eBXyX08gaRh4RECnJlXjYQ0TcU-Ndicc,1372
|
|
9
9
|
holado/common/handlers/enums.py,sha256=ieqKVoukEiNyfE3KrKmMOImdbFS1ocUMud8JHe2xNLs,1662
|
|
10
|
-
holado/common/handlers/object.py,sha256
|
|
10
|
+
holado/common/handlers/object.py,sha256=5vR7iV2NUI1sZxvkzcUBOe7FT9LkzYaivNDTE4d_6ds,6703
|
|
11
11
|
holado/common/handlers/undefined.py,sha256=yXZRPIDZI8R0vT4kdf87JPkFhnltLcQwwc3zmKhmv30,2529
|
|
12
12
|
holado/common/tools/__init__.py,sha256=z-T6zX_tOVkJjniTDA0KSKmdtosjfEhjaNa1-3g8wTs,1374
|
|
13
13
|
holado/common/tools/gc_manager.py,sha256=TjQg7MisGRhxuiQ22hB3IuqNhnWCVEWpU253-rOjR0w,7611
|
|
@@ -139,7 +139,7 @@ holado_core/tests/behave/steps/common/resource_steps.py,sha256=YZjIAhsqoDmn2GGhR
|
|
|
139
139
|
holado_core/tests/behave/steps/common/tables_steps.py,sha256=NGbDQCRPraIRr0ioiQAFZjyE3qp0iob41dunIgWm094,27758
|
|
140
140
|
holado_core/tools/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
141
141
|
holado_core/tools/abstracts/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
142
|
-
holado_core/tools/abstracts/blocking_command_service.py,sha256=
|
|
142
|
+
holado_core/tools/abstracts/blocking_command_service.py,sha256=_mJ1DkIRMTKKASq2XCDLWQK3K0fbVAeU0IsMHNs9TdI,2796
|
|
143
143
|
holado_core/tools/abstracts/service.py,sha256=07JkHz5bK2WBpAtiH2YmpZnUZY6roaUbHfD4QJ1spD4,2062
|
|
144
144
|
holado_data/__init__.py,sha256=KpbIi2cm1BYZgoWf0LuhE0ei3ZCE15UcUtjC1cSA55M,1653
|
|
145
145
|
holado_data/data/generator/base.py,sha256=axzEsz0A_6Ty0gnZ-ebFskY40dqEb_hX4D2qjrB6b3o,3764
|
|
@@ -160,6 +160,26 @@ holado_db/tools/db/clients/sqlite/sqlite_client.py,sha256=QwYfwdF4ZZ50drZcXmmpvt
|
|
|
160
160
|
holado_db/tools/db/query/query_manager.py,sha256=7n-d_Q373hlsKQshY3accIH8XfqaLScqnhMdTT2oWC4,3642
|
|
161
161
|
holado_db/tools/db/query/base/query_builder.py,sha256=-nCyBe8zsRhOX39uCV0P7OY_YKobQJVIpJDL2sUA_H8,5926
|
|
162
162
|
holado_db/tools/db/query/pypika/pypika_query_builder.py,sha256=qwFtd-7dSRju-qwGkiaDPwSkNgYpdfKsunq-TM3HhI8,10988
|
|
163
|
+
holado_django/__init__.py,sha256=KpbIi2cm1BYZgoWf0LuhE0ei3ZCE15UcUtjC1cSA55M,1653
|
|
164
|
+
holado_django/server/HOWTO.txt,sha256=91z7uC1Hf_X6dNO2wxdqQFKG2U6wIIW6NKxirUglYOA,2085
|
|
165
|
+
holado_django/server/django_server.py,sha256=2nVH0WX99nGGH-c4QztfoC-zAJKmLrNTXvhTp4qsL08,4557
|
|
166
|
+
holado_django/server/grpc_django_server.py,sha256=dxK5Qs2u7wV0Sr4oa2hpBDdidZQqDbdR1_aurLyyhxk,2757
|
|
167
|
+
holado_django/server/django_projects/rest_api/db.sqlite3,sha256=LBFAfNepksCk8npTt9QtnG7CVtDKbZM7kmy13wv1Er0,131072
|
|
168
|
+
holado_django/server/django_projects/rest_api/manage.py,sha256=tElgH5cQY8xlY1-mVesjaqsqxe6U3Y--2kXfNIUZ5m0,664
|
|
169
|
+
holado_django/server/django_projects/rest_api/rest_api/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
170
|
+
holado_django/server/django_projects/rest_api/rest_api/asgi.py,sha256=aTxP-NQKwxMWy9eRFU05I0ZzetU-xjblCtJCrnx5ImM,404
|
|
171
|
+
holado_django/server/django_projects/rest_api/rest_api/settings.py,sha256=9Qqw6yM-6ZwZEuL2J_vVtVzl1weWGC0XWhbhJzyEDNo,3324
|
|
172
|
+
holado_django/server/django_projects/rest_api/rest_api/urls.py,sha256=oLiOBFhDSh2lo1strgl0-8cXzTA-vsuP_KNRVbG4OsY,1351
|
|
173
|
+
holado_django/server/django_projects/rest_api/rest_api/wsgi.py,sha256=vuHLvl2v-OGGWQUz0fd6ekLrjRrJsAdnmIBFqZazP7k,404
|
|
174
|
+
holado_django/server/django_projects/rest_api/rest_api/application/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
175
|
+
holado_django/server/django_projects/rest_api/rest_api/application/admin.py,sha256=VWlhkFyPcKZz6ThllvIz1NT1yhDC-eBsdDWtpsuuhO0,65
|
|
176
|
+
holado_django/server/django_projects/rest_api/rest_api/application/apps.py,sha256=5L4hx9Uup2zGtC04qOJnpOTLU96VWyW94dToVYJR1nM,187
|
|
177
|
+
holado_django/server/django_projects/rest_api/rest_api/application/models.py,sha256=wzz6N5oF4ngNFMn3G0Bf2ZunnZL0eNuQdopNLnNyyL8,59
|
|
178
|
+
holado_django/server/django_projects/rest_api/rest_api/application/tests.py,sha256=oGgalLR6qiJdN-bHSH1ZLbRNhJHX_MyZtKsaR4jRy_Q,62
|
|
179
|
+
holado_django/server/django_projects/rest_api/rest_api/application/views.py,sha256=BIgOSBC4dya-nkM7xQye____ahFlz1l5g1zQgWvw3hI,120
|
|
180
|
+
holado_django/server/django_projects/rest_api/rest_api/application/migrations/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
181
|
+
holado_django/tests/behave/steps/__init__.py,sha256=1x7ID0w53eDe1P-n4Y5XOnLOTg_bta54gZE2YI0-IHo,1281
|
|
182
|
+
holado_django/tests/behave/steps/django_server_steps.py,sha256=XAnKDUXJxsZ4L7-PYatjevh2BT3qdKIg5sXXG5Y3QFQ,3819
|
|
163
183
|
holado_docker/__init__.py,sha256=CtGYR7aEkaCdAHPDAsu_ErjpVtYE0yz9wbgbfRUwS8s,1574
|
|
164
184
|
holado_docker/sdk/docker/docker_client.py,sha256=bSJ66HkukTRDQxZuyUT_4CJctxYAO68kHZ6oxVmuqaI,10744
|
|
165
185
|
holado_docker/sdk/docker/docker_service.py,sha256=SvMSIZ7XTCbC7q5rur03lJhJVSHL3uIq1dBQz9oDpkw,3767
|
|
@@ -182,7 +202,7 @@ holado_grpc/ipc/rpc/grpc_services.py,sha256=8nYMq9z5_zLW8T20Pg01DaziNNRXW7wor_WQ
|
|
|
182
202
|
holado_grpc/tests/behave/steps/__init__.py,sha256=WBK90EHst7ZPtq9kvDCtv-3NL5h3FJ9_CYjKiquQEBk,1283
|
|
183
203
|
holado_grpc/tests/behave/steps/api/grpc_client_steps.py,sha256=h3o7w3g3xpE22lp3Pprd8-5kU0StkdRCHl-Dsr2mz04,9531
|
|
184
204
|
holado_grpc/tests/behave/steps/private/__init__.py,sha256=CWs_e6XSEnr9Y_kF3PxF3esA0EeRNnsqp4PEN8gBxrI,1276
|
|
185
|
-
holado_grpc/tests/behave/steps/private/api/grpc_steps.py,sha256=
|
|
205
|
+
holado_grpc/tests/behave/steps/private/api/grpc_steps.py,sha256=MF0h_AXjKcvGQ-KyoCAVRgk6OoQbfe4_J37a4u5skfU,4094
|
|
186
206
|
holado_helper/__init__.py,sha256=U5rV9zTT4OFE4MU2yiOIDlAmwQ_NO2CB0Adih2sn8eQ,1780
|
|
187
207
|
holado_helper/initialize_holado.py,sha256=UxNphXyjs-xraorzMWjDe6-QYw_Q3mtykyY-ENYZB1o,3464
|
|
188
208
|
holado_helper/debug/README.txt,sha256=kpsK1Ii5-t5pJCL9ChcEbZYyYTKt34fjKdiMC5DGOjc,2045
|
|
@@ -193,8 +213,8 @@ holado_helper/docker/run_holado_test_nonreg_in_docker.sh,sha256=_ndFQXg4gBE3Zs6T
|
|
|
193
213
|
holado_helper/docker/run_terminal_in_docker-with_docker_control.sh,sha256=EIKqew9xOAeA8KCEbz4DDSDM8s27g3FAT1j3sr2uWlI,3525
|
|
194
214
|
holado_helper/docker/run_terminal_in_docker.sh,sha256=GOOhbo9cEjw5Pp5BlhbzZm2U5XqZoqhHcVjlUwdV4WA,3397
|
|
195
215
|
holado_helper/holado_module_template/__init__.py,sha256=KpbIi2cm1BYZgoWf0LuhE0ei3ZCE15UcUtjC1cSA55M,1653
|
|
196
|
-
holado_helper/holado_module_template/
|
|
197
|
-
holado_helper/holado_module_template/
|
|
216
|
+
holado_helper/holado_module_template/tests/behave/steps/__init__.py,sha256=BHp8TYE_X4lWn4B8A51nXSYaJlczuiDVJLcKMy7p0Lw,1267
|
|
217
|
+
holado_helper/holado_module_template/tests/behave/steps/private/__init__.py,sha256=BHp8TYE_X4lWn4B8A51nXSYaJlczuiDVJLcKMy7p0Lw,1267
|
|
198
218
|
holado_helper/script/action.py,sha256=YPLS-3Ot-bti9d6VxilW5PwfYCU64hFd1qK1d2XepFY,6187
|
|
199
219
|
holado_helper/script/action_script.py,sha256=6yhb7M9aGe6jbqA4APa2rc3zC3INXvNTZjpGXDWMBug,22543
|
|
200
220
|
holado_helper/script/any_action_script.py,sha256=6P1bG3UoSO0JVS6kWaDGd4jP7MN-foiThRcVitW3Hjg,7901
|
|
@@ -219,7 +239,7 @@ holado_keycloak/tools/keycloak/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5
|
|
|
219
239
|
holado_keycloak/tools/keycloak/keycloak_client.py,sha256=QXAsf9rF0pKq1dHhXeZFZOxuEg_1uzp6vqXnwWDnegg,4019
|
|
220
240
|
holado_logging/__init__.py,sha256=EMmwm_jHe739gftVCmf6lb_dT20IVseVg0bbGGADn8w,2176
|
|
221
241
|
holado_logging/common/logging/holado_logger.py,sha256=vlU_q5jYD9Qf-xWFBogeNiIR9qpRri-68OfMofgbhy4,3320
|
|
222
|
-
holado_logging/common/logging/log_config.py,sha256=
|
|
242
|
+
holado_logging/common/logging/log_config.py,sha256=DdYEW-2YSZ6QZDZCeVn_IZOKQlwWvqi2NWEbPhvExxw,6578
|
|
223
243
|
holado_logging/common/logging/log_manager.py,sha256=gq92IAfnKEX-GKUHexNVgEI0UUrUdiWaC5GLcSTAaUE,13604
|
|
224
244
|
holado_multitask/__init__.py,sha256=EwuwiBmp8ICbPZ8CKPju8tHRTh2rG68PB_wGXczY9rw,2143
|
|
225
245
|
holado_multitask/multiprocessing/function_process.py,sha256=HFXjpnzWed5J1tjmWMQyRx8AGcY6D1laegHqZ5j1dco,4550
|
|
@@ -227,7 +247,7 @@ holado_multitask/multiprocessing/periodic_function_process.py,sha256=ubbdm2XSwjB
|
|
|
227
247
|
holado_multitask/multiprocessing/process.py,sha256=pSzeOXJpHF6poxT6oXx7g-2CcSm-EjVjSdZ4bIO3TD4,8591
|
|
228
248
|
holado_multitask/multiprocessing/processesmanager.py,sha256=WCWD-Zo5adBNKz-X34VhD3QifrlgAIaLzU-fVsQKtCs,5905
|
|
229
249
|
holado_multitask/multiprocessing/context/process_context.py,sha256=UADxmma8f5tW6etJz7kvrfDdeBOrFxNYCieRev0hFJY,1709
|
|
230
|
-
holado_multitask/multitasking/multitask_manager.py,sha256=
|
|
250
|
+
holado_multitask/multitasking/multitask_manager.py,sha256=lPi4gqK9HNK3FR4Mi-0hDn43PEq7RxXJ4JXKl2Nr_DM,21838
|
|
231
251
|
holado_multitask/multithreading/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
232
252
|
holado_multitask/multithreading/functionthreaded.py,sha256=gCLVMrxI18dKDNOQ9szH4hEKk_PQSWSuoO4enEEORzE,5570
|
|
233
253
|
holado_multitask/multithreading/loopfunctionthreaded.py,sha256=5kfONDR76uuT1bTJrAtnfSncHwvVvzl8jagWUvTduHw,2492
|
|
@@ -276,13 +296,13 @@ holado_python/standard_library/socket/echo_server.py,sha256=ntApbwcckiEEBw-qjE48
|
|
|
276
296
|
holado_python/standard_library/socket/message_socket.py,sha256=r9cAs-HWGE0t1Dn09RA-HJ5pBExEjBwN_y9F-JYxno8,5638
|
|
277
297
|
holado_python/standard_library/socket/non_blocking_socket.py,sha256=FGJHbSTTe5KgCBXva9YrU8Fxn7fGbckQy9jsBNtbQiI,7164
|
|
278
298
|
holado_python/standard_library/socket/socket.py,sha256=K2EURF_C8FttqOy7bfiMkVR74W8y3yH5Wbg_wXhzzyM,15781
|
|
279
|
-
holado_python/standard_library/ssl/ssl.py,sha256=
|
|
299
|
+
holado_python/standard_library/ssl/ssl.py,sha256=S0t9uBy6t6MWGUXgvZk3APmjhNom74qaOHbFyfznY0Y,10987
|
|
280
300
|
holado_python/standard_library/ssl/resources/certificates/NOTES.txt,sha256=GlPGGZT_lqV2fNeh-JKQZDC7xJOa3fLTYuwnC_-UYNg,384
|
|
281
301
|
holado_python/standard_library/ssl/resources/certificates/localhost.crt,sha256=iLmZpDuOQVawUlbZkb72g2-uv1c4SAmRJOrm4Th5anY,1123
|
|
282
302
|
holado_python/standard_library/ssl/resources/certificates/localhost.key,sha256=lP2NCvB9mr2E5sk8whA8FyQRcyU6H7sdWkJeKz80Hyc,1704
|
|
283
303
|
holado_python/standard_library/ssl/resources/certificates/rootCACert.pem,sha256=ECQDZ8OHRfqpZHCu6JRLMUjiONaPIhKZQF0-kidVrWQ,1424
|
|
284
|
-
holado_python/standard_library/ssl/resources/certificates/tcpbin.crt,sha256=
|
|
285
|
-
holado_python/standard_library/ssl/resources/certificates/tcpbin.key,sha256=
|
|
304
|
+
holado_python/standard_library/ssl/resources/certificates/tcpbin.crt,sha256=oHsODf9dBb01uVl8lzX2NU7qetZJjGGb1zPne1LDa4s,1237
|
|
305
|
+
holado_python/standard_library/ssl/resources/certificates/tcpbin.key,sha256=Web5wNqthE4vg4uYzr76y3mXqrZ6JAb_n2vjDiRuZLY,1704
|
|
286
306
|
holado_python/tests/behave/steps/__init__.py,sha256=TWEk-kBTTDHi9I4nuu48nufmNMdZ9FHAhPZv0A_cWzc,1661
|
|
287
307
|
holado_python/tests/behave/steps/convert_steps.py,sha256=bZqRvJVp_u6fSPpdu4ne9NwVyZmui7R-AVdO2-H-I1A,2728
|
|
288
308
|
holado_python/tests/behave/steps/iterable_steps.py,sha256=f4vGIWBH8Qnjq69Q-ZBluYyctQ8SKauazTc41dsktZA,4041
|
|
@@ -325,15 +345,15 @@ holado_report/report/reports/base_report.py,sha256=NGnWe66uyvT4bCjhd3upwVpc6yQ2g
|
|
|
325
345
|
holado_report/report/reports/feature_report.py,sha256=i0wpk3LQLArVjWDsP9UcNSJzAUWwLhe73HNyfye2gYQ,4810
|
|
326
346
|
holado_report/report/reports/scenario_report.py,sha256=eMyqw9EzaKMmX3pGFJN1rqAOQ5eqO2ISZdxAfK3XQR4,2945
|
|
327
347
|
holado_rest/__init__.py,sha256=BOeE6t6ejeqRYd44SE4vYJVTNz01BwcVCIWfwRQ5axg,1526
|
|
328
|
-
holado_rest/api/rest/TODO.txt,sha256=
|
|
329
|
-
holado_rest/api/rest/rest_client.py,sha256=
|
|
348
|
+
holado_rest/api/rest/TODO.txt,sha256=Oz8BYPkBEs9OAEgyYLLm7i5tJ1bRE5POBpT3SRFWTi4,29
|
|
349
|
+
holado_rest/api/rest/rest_client.py,sha256=a6CNXBEkuCF3MJnXRVhvBrVKBRqtV4NFohFsdFaInUc,5729
|
|
330
350
|
holado_rest/api/rest/rest_manager.py,sha256=nekokAwN73n7Dn3nLhwf22XaKDW1sYjy4-JLWdfGxBQ,3559
|
|
331
351
|
holado_rest/tests/behave/steps/__init__.py,sha256=lEH5NYkKtpgDV2ZAO1qAGNN4ipwILWMpgvQgnamgYKk,1283
|
|
332
352
|
holado_rest/tests/behave/steps/api/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
333
353
|
holado_rest/tests/behave/steps/api/rest_client_steps.py,sha256=-msAniL0tBxhwPGIIWMryxuvVCfzQS_B2TngIdluVZg,9793
|
|
334
354
|
holado_rest/tests/behave/steps/private/__init__.py,sha256=TGsd7qLZpPQRxphFzgepFa22NhHSoZgxAWSIqwvA4L8,1276
|
|
335
355
|
holado_rest/tests/behave/steps/private/api/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
336
|
-
holado_rest/tests/behave/steps/private/api/rest_steps.py,sha256=
|
|
356
|
+
holado_rest/tests/behave/steps/private/api/rest_steps.py,sha256=GT97p6BzX-fWDLMUIxZ7ingCP6pTwZgk_3QX7yEMhoE,3324
|
|
337
357
|
holado_s3/__init__.py,sha256=Gl285tg-QaPE-3etWwZql9sH26G7EnVoQn97B0NMvOI,1248
|
|
338
358
|
holado_s3/tests/behave/steps/__init__.py,sha256=q64qGCCey5QivEezEXq9LjABSBnjavTpq03PpaMSLkY,1320
|
|
339
359
|
holado_s3/tests/behave/steps/private/__init__.py,sha256=JmVFxoOewwdE3uAgX4u2Y3tLWL_GdYW3h2ZawNdpn38,1276
|
|
@@ -388,12 +408,12 @@ holado_sftp/tools/sftp/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3
|
|
|
388
408
|
holado_sftp/tools/sftp/sftp_client.py,sha256=ExpIQoImZt9KpHuGLuZmxZetvuzK426-DQ67pDPenOM,4486
|
|
389
409
|
holado_sftp/tools/sftp/sftp_server.py,sha256=N_Ym3Rm8w_QS6E0id543LZXfQ7G38DeKjVwCRH2irKA,1969
|
|
390
410
|
holado_swagger/__init__.py,sha256=VSOq3mr1SaTEnceP_4kwYBYAMTuyVE9_61wOdKKasis,1664
|
|
391
|
-
holado_swagger/swagger_hub/mockserver/mockserver_client.py,sha256=
|
|
411
|
+
holado_swagger/swagger_hub/mockserver/mockserver_client.py,sha256=L7P8aNi5Zuh2xRURbTLkMKeS3XcMENdgvb5BbOb3La0,4067
|
|
392
412
|
holado_swagger/swagger_hub/mockserver/mockserver_manager.py,sha256=5ubBMgtNNaoXcgDjPNM0BcJ0N_QaE_hvmy4i05Pq53w,1646
|
|
393
413
|
holado_swagger/tests/behave/steps/__init__.py,sha256=joCT_nKaotXBBMNTXxOBcmr98gjmjDkY1Zbu5lCL8B4,1290
|
|
394
414
|
holado_swagger/tests/behave/steps/swagger_hub/mockserver_steps.py,sha256=_M5WyF35qBjvDnXbohhMA9kV3D1H1aRnTBQ1iOtmxHA,3749
|
|
395
|
-
holado_system/system/global_system.py,sha256=
|
|
396
|
-
holado_system/system/command/command.py,sha256=
|
|
415
|
+
holado_system/system/global_system.py,sha256=ZuC7Hbs3EMm2QQ6CRLYKMOS7ACcpi1N9vRuDhQT2jS8,8253
|
|
416
|
+
holado_system/system/command/command.py,sha256=9lv9kgvvIq4Fqx6fJXU_HQA8pCO80Ws9rpd2FwzAn0I,9053
|
|
397
417
|
holado_system/system/command/command_result.py,sha256=sunGDegNVOtpK9s9r4HCAJlREu4iKS0w3HY4KKDEQkw,4613
|
|
398
418
|
holado_system/system/command/curl_command.py,sha256=CEMaO0_qLyKe4tLytMlHzmCuS_gi-oU479hwOaEyZ60,3743
|
|
399
419
|
holado_system/system/command/exceptions.py,sha256=InT6t8GVeGCiBE-NpRr4NzycWVAvzmc6WpM6mk7_1yk,2363
|
|
@@ -450,12 +470,13 @@ test_holado/Dockerfile_test_holado,sha256=zO6OUFnC1X9ZG7fPWWWfcWgZwnxif4WDE4ZDEm
|
|
|
450
470
|
test_holado/__init__.py,sha256=TIHAHrF05rvz6-VDKuDBSBjasD6PxTxXvcXjMEC3D6E,54
|
|
451
471
|
test_holado/__main__.py,sha256=PVdCX8V_RGRzbQQKVxf7eyt8a10XfUJ1pcaajGgIlus,1509
|
|
452
472
|
test_holado/build_docker_image_to_test_holado_in_docker.sh,sha256=B3hbi0yKnEC-t9S18o6ZR27AU1bqiuptwOqm6H7tv8s,142
|
|
453
|
-
test_holado/environment.py,sha256=
|
|
454
|
-
test_holado/
|
|
473
|
+
test_holado/environment.py,sha256=QgLXEPss9YbJLZywgIStDgLOOq0MHklzmRElTgZgzM8,2272
|
|
474
|
+
test_holado/initialize_holado.py,sha256=IPYH-GYNiHV5-7ZCCH6CFmPpmACsPrTV74TYz3MRjpA,3102
|
|
475
|
+
test_holado/logging.conf,sha256=L_8mMnRvVvUf5FKP0sqdgjbMmSeEIe6sDSFUX49DQ78,1263
|
|
455
476
|
test_holado/test_holado_session_context.py,sha256=qOB_i2k8mYjkR3-q2uv0B04xFc1K3p-K20ttYwe1Z18,1364
|
|
456
477
|
test_holado/features/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
457
|
-
test_holado/features/NonReg/api/REST.feature,sha256=
|
|
458
|
-
test_holado/features/NonReg/api/gRPC.feature,sha256=
|
|
478
|
+
test_holado/features/NonReg/api/REST.feature,sha256=yAhCpWk7HbHztkdwkfcU-TrfnJVoOzHvYMmk9pUy50A,689
|
|
479
|
+
test_holado/features/NonReg/api/gRPC.feature,sha256=IHPDsRHhKs5WgsrVXa_jiBjbvnVumCmsQ0O6RLkD1S4,4718
|
|
459
480
|
test_holado/features/NonReg/common/multiprocessing/simple.feature,sha256=bNDoWWTg1vOy0O_-0fmAlBPDXSxt7GBdDNy3XvtoEfU,1729
|
|
460
481
|
test_holado/features/NonReg/common/system/commands.feature,sha256=vx-ARlO21uPwJl7MNy7SD6EoLtAFRxPspEYVc8psSsU,1412
|
|
461
482
|
test_holado/features/NonReg/common/system/system.feature,sha256=LILoPYkkHuG9n-8vMNcgu1getgJpQ8WZRE3WDsJOpUU,700
|
|
@@ -524,7 +545,7 @@ test_holado/tools/django/api_grpc/api_grpc/api1/proto/__init__.py,sha256=47DEQpj
|
|
|
524
545
|
test_holado/tools/django/api_grpc/api_grpc/api1/proto/account.proto,sha256=tNN1BhZwfQA5DCZPPZl1kRKvr5YCQO_bpbYljwQMcYs,544
|
|
525
546
|
test_holado/tools/django/api_grpc/api_grpc/api1/proto/account_pb2.py,sha256=mah2kHJoZhxS_56rDUGKzCXlhSWLa0R8K-1f9nxFoIQ,2048
|
|
526
547
|
test_holado/tools/django/api_grpc/api_grpc/api1/proto/account_pb2_grpc.py,sha256=w52rsJLeP6SASsCSv3am5gUp2s1tLqFeZNpCdIhlHqE,8255
|
|
527
|
-
test_holado/tools/django/api_rest/db.sqlite3,sha256=
|
|
548
|
+
test_holado/tools/django/api_rest/db.sqlite3,sha256=Lr1skP2c5Iwp1xDvTTV7_SFEtDtwh_SEKvc7wD5kLcs,131072
|
|
528
549
|
test_holado/tools/django/api_rest/manage.py,sha256=ohpxT3Xl0XFkddXH-iVAqvDKw3rBbvL0b5m2LWj3JTo,664
|
|
529
550
|
test_holado/tools/django/api_rest/api_rest/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
530
551
|
test_holado/tools/django/api_rest/api_rest/asgi.py,sha256=vQAEj8OApTRp7uSciDMDl8_Y8TXPrB6GiRXnW-TZHP8,393
|
|
@@ -539,7 +560,7 @@ test_holado/tools/django/api_rest/api_rest/api1/serializers.py,sha256=o_YxFr-tgC
|
|
|
539
560
|
test_holado/tools/django/api_rest/api_rest/api1/tests.py,sha256=mrbGGRNg5jwbTJtWWa7zSKdDyeB4vmgZCRc2nk6VY-g,60
|
|
540
561
|
test_holado/tools/django/api_rest/api_rest/api1/views.py,sha256=kOt2xT6bxO47_z__5yYR9kcYIWWv4qYzpX0K8Tqonik,758
|
|
541
562
|
test_holado/tools/django/api_rest/api_rest/api1/migrations/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
542
|
-
holado-0.4.
|
|
543
|
-
holado-0.4.
|
|
544
|
-
holado-0.4.
|
|
545
|
-
holado-0.4.
|
|
563
|
+
holado-0.4.2.dist-info/METADATA,sha256=qqogOBAAZP8qKvkcKa_eApOuFPlZJ6y7gkTNmNsH95U,6065
|
|
564
|
+
holado-0.4.2.dist-info/WHEEL,sha256=qtCwoSJWgHk21S1Kb4ihdzI2rlJ1ZKaIurTj_ngOhyQ,87
|
|
565
|
+
holado-0.4.2.dist-info/licenses/LICENSE,sha256=IgGmNlcFHnbp7UWrLJqAFvs_HIgjJDTmjCNRircJLsk,1070
|
|
566
|
+
holado-0.4.2.dist-info/RECORD,,
|
|
@@ -30,6 +30,10 @@ class BlockingCommandService(Service):
|
|
|
30
30
|
self.__cmd_str = cmd
|
|
31
31
|
self.__command = Command(self.__cmd_str, **kwargs)
|
|
32
32
|
|
|
33
|
+
@property
|
|
34
|
+
def internal_command(self):
|
|
35
|
+
return self.__command
|
|
36
|
+
|
|
33
37
|
@property
|
|
34
38
|
def status(self):
|
|
35
39
|
if self.__command is not None:
|
|
@@ -50,7 +54,11 @@ class BlockingCommandService(Service):
|
|
|
50
54
|
logger.debug(f"Stopping service '{self.name}'")
|
|
51
55
|
status = self.__command.state
|
|
52
56
|
if status == CommandStates.Running:
|
|
53
|
-
self.__command.terminate()
|
|
57
|
+
# self.__command.terminate()
|
|
58
|
+
self.__command.stop()
|
|
54
59
|
self.__command.join()
|
|
55
60
|
else:
|
|
56
61
|
raise FunctionalException(f"Service '{self.name}' is not running (status: {status.name}")
|
|
62
|
+
|
|
63
|
+
def join(self, timeout=None):
|
|
64
|
+
self.__command.join(timeout)
|
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
# -*- coding: utf-8 -*-
|
|
2
|
+
|
|
3
|
+
#################################################
|
|
4
|
+
# HolAdo (Holistic Automation do)
|
|
5
|
+
#
|
|
6
|
+
# (C) Copyright 2021-2025 by Eric Klumpp
|
|
7
|
+
#
|
|
8
|
+
# Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the “Software”), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:
|
|
9
|
+
#
|
|
10
|
+
# The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.
|
|
11
|
+
|
|
12
|
+
# The Software is provided “as is”, without warranty of any kind, express or implied, including but not limited to the warranties of merchantability, fitness for a particular purpose and noninfringement. In no event shall the authors or copyright holders be liable for any claim, damages or other liability, whether in an action of contract, tort or otherwise, arising from, out of or in connection with the software or the use or other dealings in the Software.
|
|
13
|
+
#################################################
|
|
14
|
+
|
|
15
|
+
|
|
16
|
+
def dependencies():
|
|
17
|
+
"""
|
|
18
|
+
Return None or the list of names of modules it depend on
|
|
19
|
+
"""
|
|
20
|
+
return None
|
|
21
|
+
|
|
22
|
+
def register():
|
|
23
|
+
"""
|
|
24
|
+
Register the services of this module
|
|
25
|
+
"""
|
|
26
|
+
# from holado.common.context.session_context import SessionContext
|
|
27
|
+
|
|
28
|
+
# from holado_xxx.xxx import XXXManager
|
|
29
|
+
# SessionContext.instance().services.register_service_type("xxx_manager", XXXManager)
|
|
30
|
+
pass
|
|
31
|
+
|
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
|
|
2
|
+
#################################################
|
|
3
|
+
# HolAdo (Holistic Automation do)
|
|
4
|
+
#
|
|
5
|
+
# (C) Copyright 2021-2025 by Eric Klumpp
|
|
6
|
+
#
|
|
7
|
+
# Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the “Software”), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:
|
|
8
|
+
#
|
|
9
|
+
# The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.
|
|
10
|
+
|
|
11
|
+
# The Software is provided “as is”, without warranty of any kind, express or implied, including but not limited to the warranties of merchantability, fitness for a particular purpose and noninfringement. In no event shall the authors or copyright holders be liable for any claim, damages or other liability, whether in an action of contract, tort or otherwise, arising from, out of or in connection with the software or the use or other dealings in the Software.
|
|
12
|
+
#################################################
|
|
13
|
+
|
|
14
|
+
|
|
15
|
+
HOWTO create a REST server easier with HolAdo:
|
|
16
|
+
|
|
17
|
+
1. Create a working directory (WORK_DIR) where all server files will be stored
|
|
18
|
+
2. Copy in WORK_DIR the appropriate django project. For this case, it is holado_django/server/django_projects/rest_api
|
|
19
|
+
3. Update application with wanted REST APIs. For this case, update/add files in rest_api/rest_api/application: views.py, models.py,...
|
|
20
|
+
4. Make migrations if needed (cf django documentation)
|
|
21
|
+
5. Run server manually with a command like "python manage.py runserver", or use module holado_django/server/django_server.py
|
|
22
|
+
|
|
23
|
+
Example: A simple example is in holado_examples/projects/server_rest/server_rest_example
|
|
24
|
+
|
|
25
|
+
Note: These steps are simple and doesn't give help to developpers knowing Django and Django REST framework.
|
|
26
|
+
They should be a first step towards future more powerful tools.
|
|
27
|
+
|
|
Binary file
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
#!/usr/bin/env python
|
|
2
|
+
"""Django's command-line utility for administrative tasks."""
|
|
3
|
+
import os
|
|
4
|
+
import sys
|
|
5
|
+
|
|
6
|
+
|
|
7
|
+
def main():
|
|
8
|
+
"""Run administrative tasks."""
|
|
9
|
+
os.environ.setdefault('DJANGO_SETTINGS_MODULE', 'rest_api.settings')
|
|
10
|
+
try:
|
|
11
|
+
from django.core.management import execute_from_command_line
|
|
12
|
+
except ImportError as exc:
|
|
13
|
+
raise ImportError(
|
|
14
|
+
"Couldn't import Django. Are you sure it's installed and "
|
|
15
|
+
"available on your PYTHONPATH environment variable? Did you "
|
|
16
|
+
"forget to activate a virtual environment?"
|
|
17
|
+
) from exc
|
|
18
|
+
execute_from_command_line(sys.argv)
|
|
19
|
+
|
|
20
|
+
|
|
21
|
+
if __name__ == '__main__':
|
|
22
|
+
main()
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
"""
|
|
2
|
+
ASGI config for server_rest_example project.
|
|
3
|
+
|
|
4
|
+
It exposes the ASGI callable as a module-level variable named ``application``.
|
|
5
|
+
|
|
6
|
+
For more information on this file, see
|
|
7
|
+
https://docs.djangoproject.com/en/5.2/howto/deployment/asgi/
|
|
8
|
+
"""
|
|
9
|
+
|
|
10
|
+
import os
|
|
11
|
+
|
|
12
|
+
from django.core.asgi import get_asgi_application
|
|
13
|
+
|
|
14
|
+
os.environ.setdefault('DJANGO_SETTINGS_MODULE', 'rest_api.settings')
|
|
15
|
+
|
|
16
|
+
application = get_asgi_application()
|
|
@@ -0,0 +1,130 @@
|
|
|
1
|
+
"""
|
|
2
|
+
Django settings for server_rest_example project.
|
|
3
|
+
|
|
4
|
+
Generated by 'django-admin startproject' using Django 5.2.
|
|
5
|
+
|
|
6
|
+
For more information on this file, see
|
|
7
|
+
https://docs.djangoproject.com/en/5.2/topics/settings/
|
|
8
|
+
|
|
9
|
+
For the full list of settings and their values, see
|
|
10
|
+
https://docs.djangoproject.com/en/5.2/ref/settings/
|
|
11
|
+
"""
|
|
12
|
+
|
|
13
|
+
from pathlib import Path
|
|
14
|
+
|
|
15
|
+
# Build paths inside the project like this: BASE_DIR / 'subdir'.
|
|
16
|
+
BASE_DIR = Path(__file__).resolve().parent.parent
|
|
17
|
+
|
|
18
|
+
|
|
19
|
+
# Quick-start development settings - unsuitable for production
|
|
20
|
+
# See https://docs.djangoproject.com/en/5.2/howto/deployment/checklist/
|
|
21
|
+
|
|
22
|
+
# SECURITY WARNING: keep the secret key used in production secret!
|
|
23
|
+
SECRET_KEY = 'django-insecure-(4nx+&@_ylqw(sa25syu5gdnu1q0bhyy69%*)^al_=2*%c*=ar'
|
|
24
|
+
|
|
25
|
+
# SECURITY WARNING: don't run with debug turned on in production!
|
|
26
|
+
DEBUG = True
|
|
27
|
+
|
|
28
|
+
ALLOWED_HOSTS = []
|
|
29
|
+
|
|
30
|
+
|
|
31
|
+
# Application definition
|
|
32
|
+
|
|
33
|
+
INSTALLED_APPS = [
|
|
34
|
+
'django.contrib.admin',
|
|
35
|
+
'django.contrib.auth',
|
|
36
|
+
'django.contrib.contenttypes',
|
|
37
|
+
'django.contrib.sessions',
|
|
38
|
+
'django.contrib.messages',
|
|
39
|
+
'django.contrib.staticfiles',
|
|
40
|
+
'rest_framework',
|
|
41
|
+
]
|
|
42
|
+
|
|
43
|
+
MIDDLEWARE = [
|
|
44
|
+
'django.middleware.security.SecurityMiddleware',
|
|
45
|
+
'django.contrib.sessions.middleware.SessionMiddleware',
|
|
46
|
+
'django.middleware.common.CommonMiddleware',
|
|
47
|
+
'django.middleware.csrf.CsrfViewMiddleware',
|
|
48
|
+
'django.contrib.auth.middleware.AuthenticationMiddleware',
|
|
49
|
+
'django.contrib.messages.middleware.MessageMiddleware',
|
|
50
|
+
'django.middleware.clickjacking.XFrameOptionsMiddleware',
|
|
51
|
+
]
|
|
52
|
+
|
|
53
|
+
ROOT_URLCONF = 'rest_api.urls'
|
|
54
|
+
|
|
55
|
+
TEMPLATES = [
|
|
56
|
+
{
|
|
57
|
+
'BACKEND': 'django.template.backends.django.DjangoTemplates',
|
|
58
|
+
'DIRS': [],
|
|
59
|
+
'APP_DIRS': True,
|
|
60
|
+
'OPTIONS': {
|
|
61
|
+
'context_processors': [
|
|
62
|
+
'django.template.context_processors.request',
|
|
63
|
+
'django.contrib.auth.context_processors.auth',
|
|
64
|
+
'django.contrib.messages.context_processors.messages',
|
|
65
|
+
],
|
|
66
|
+
},
|
|
67
|
+
},
|
|
68
|
+
]
|
|
69
|
+
|
|
70
|
+
WSGI_APPLICATION = 'rest_api.wsgi.application'
|
|
71
|
+
|
|
72
|
+
|
|
73
|
+
# Database
|
|
74
|
+
# https://docs.djangoproject.com/en/5.2/ref/settings/#databases
|
|
75
|
+
|
|
76
|
+
DATABASES = {
|
|
77
|
+
'default': {
|
|
78
|
+
'ENGINE': 'django.db.backends.sqlite3',
|
|
79
|
+
'NAME': BASE_DIR / 'db.sqlite3',
|
|
80
|
+
}
|
|
81
|
+
}
|
|
82
|
+
|
|
83
|
+
|
|
84
|
+
# Password validation
|
|
85
|
+
# https://docs.djangoproject.com/en/5.2/ref/settings/#auth-password-validators
|
|
86
|
+
|
|
87
|
+
AUTH_PASSWORD_VALIDATORS = [
|
|
88
|
+
{
|
|
89
|
+
'NAME': 'django.contrib.auth.password_validation.UserAttributeSimilarityValidator',
|
|
90
|
+
},
|
|
91
|
+
{
|
|
92
|
+
'NAME': 'django.contrib.auth.password_validation.MinimumLengthValidator',
|
|
93
|
+
},
|
|
94
|
+
{
|
|
95
|
+
'NAME': 'django.contrib.auth.password_validation.CommonPasswordValidator',
|
|
96
|
+
},
|
|
97
|
+
{
|
|
98
|
+
'NAME': 'django.contrib.auth.password_validation.NumericPasswordValidator',
|
|
99
|
+
},
|
|
100
|
+
]
|
|
101
|
+
|
|
102
|
+
|
|
103
|
+
# Internationalization
|
|
104
|
+
# https://docs.djangoproject.com/en/5.2/topics/i18n/
|
|
105
|
+
|
|
106
|
+
LANGUAGE_CODE = 'en-us'
|
|
107
|
+
|
|
108
|
+
TIME_ZONE = 'UTC'
|
|
109
|
+
|
|
110
|
+
USE_I18N = True
|
|
111
|
+
|
|
112
|
+
USE_TZ = True
|
|
113
|
+
|
|
114
|
+
|
|
115
|
+
# Static files (CSS, JavaScript, Images)
|
|
116
|
+
# https://docs.djangoproject.com/en/5.2/howto/static-files/
|
|
117
|
+
|
|
118
|
+
STATIC_URL = 'static/'
|
|
119
|
+
|
|
120
|
+
# Default primary key field type
|
|
121
|
+
# https://docs.djangoproject.com/en/5.2/ref/settings/#default-auto-field
|
|
122
|
+
|
|
123
|
+
DEFAULT_AUTO_FIELD = 'django.db.models.BigAutoField'
|
|
124
|
+
|
|
125
|
+
|
|
126
|
+
REST_FRAMEWORK = {
|
|
127
|
+
'DEFAULT_PAGINATION_CLASS': 'rest_framework.pagination.PageNumberPagination',
|
|
128
|
+
'PAGE_SIZE': 10
|
|
129
|
+
}
|
|
130
|
+
|
|
@@ -0,0 +1,35 @@
|
|
|
1
|
+
"""
|
|
2
|
+
URL configuration for server_rest_example project.
|
|
3
|
+
|
|
4
|
+
The `urlpatterns` list routes URLs to views. For more information please see:
|
|
5
|
+
https://docs.djangoproject.com/en/5.2/topics/http/urls/
|
|
6
|
+
Examples:
|
|
7
|
+
Function views
|
|
8
|
+
1. Add an import: from my_app import views
|
|
9
|
+
2. Add a URL to urlpatterns: path('', views.home, name='home')
|
|
10
|
+
Class-based views
|
|
11
|
+
1. Add an import: from other_app.views import Home
|
|
12
|
+
2. Add a URL to urlpatterns: path('', Home.as_view(), name='home')
|
|
13
|
+
Including another URLconf
|
|
14
|
+
1. Import the include() function: from django.urls import include, path
|
|
15
|
+
2. Add a URL to urlpatterns: path('blog/', include('blog.urls'))
|
|
16
|
+
"""
|
|
17
|
+
from django.contrib import admin
|
|
18
|
+
from django.urls import path
|
|
19
|
+
from rest_framework import routers
|
|
20
|
+
from django.urls.conf import include
|
|
21
|
+
from rest_api.application.apps import django_application_inst
|
|
22
|
+
from holado_core.common.exceptions.technical_exception import TechnicalException
|
|
23
|
+
|
|
24
|
+
router = routers.DefaultRouter()
|
|
25
|
+
if django_application_inst is not None:
|
|
26
|
+
django_application_inst.register_urls(router)
|
|
27
|
+
print(f"router urls: {router.urls}")
|
|
28
|
+
else:
|
|
29
|
+
raise TechnicalException("Django application instance is not set")
|
|
30
|
+
|
|
31
|
+
urlpatterns = [
|
|
32
|
+
path('', include(router.urls)),
|
|
33
|
+
path('api-auth/', include('rest_framework.urls', namespace='rest_framework')),
|
|
34
|
+
path('admin/', admin.site.urls),
|
|
35
|
+
]
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
"""
|
|
2
|
+
WSGI config for server_rest_example project.
|
|
3
|
+
|
|
4
|
+
It exposes the WSGI callable as a module-level variable named ``application``.
|
|
5
|
+
|
|
6
|
+
For more information on this file, see
|
|
7
|
+
https://docs.djangoproject.com/en/5.2/howto/deployment/wsgi/
|
|
8
|
+
"""
|
|
9
|
+
|
|
10
|
+
import os
|
|
11
|
+
|
|
12
|
+
from django.core.wsgi import get_wsgi_application
|
|
13
|
+
|
|
14
|
+
os.environ.setdefault('DJANGO_SETTINGS_MODULE', 'rest_api.settings')
|
|
15
|
+
|
|
16
|
+
application = get_wsgi_application()
|