thestage 0.5.46__py3-none-any.whl → 0.5.47__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.
- thestage/.env +5 -0
- thestage/__init__.py +2 -1
- thestage/cli_command.py +56 -0
- thestage/cli_command_helper.py +51 -0
- thestage/config/config_storage.py +3 -0
- thestage/controllers/base_controller.py +19 -15
- thestage/controllers/config_controller.py +30 -38
- thestage/controllers/container_controller.py +43 -79
- thestage/controllers/instance_controller.py +23 -40
- thestage/controllers/project_controller.py +95 -184
- thestage/controllers/utils_controller.py +12 -8
- thestage/debug_tests.py +12 -0
- thestage/entities/container.py +0 -5
- thestage/entities/rented_instance.py +0 -5
- thestage/entities/self_hosted_instance.py +0 -2
- thestage/helpers/error_handler.py +14 -14
- thestage/helpers/exception_hook.py +14 -0
- thestage/helpers/logger/app_logger.py +3 -4
- thestage/main.py +25 -13
- thestage/services/abstract_service.py +0 -40
- thestage/services/app_config_service.py +7 -6
- thestage/services/clients/.DS_Store +0 -0
- thestage/services/clients/thestage_api/api_client.py +54 -68
- thestage/services/clients/thestage_api/core/api_client_core.py +92 -9
- thestage/services/clients/thestage_api/dtos/container_response.py +1 -1
- thestage/services/clients/thestage_api/dtos/inference_simulator_model_response.py +1 -1
- thestage/services/clients/thestage_api/dtos/inference_simulator_response.py +1 -1
- thestage/services/clients/thestage_api/dtos/instance_rented_response.py +1 -1
- thestage/services/clients/thestage_api/dtos/selfhosted_instance_response.py +1 -1
- thestage/services/clients/thestage_api/dtos/task_controller/task_status_localized_map_response.py +1 -1
- thestage/services/clients/thestage_api/dtos/validate_token_response.py +11 -0
- thestage/services/config_provider/config_provider.py +75 -47
- thestage/services/connect/connect_service.py +11 -22
- thestage/services/container/container_service.py +6 -23
- thestage/services/core_files/config_entity.py +7 -1
- thestage/services/filesystem_service.py +2 -2
- thestage/services/instance/instance_service.py +12 -26
- thestage/services/logging/logging_service.py +17 -45
- thestage/services/project/project_service.py +33 -72
- thestage/services/remote_server_service.py +3 -4
- thestage/services/service_factory.py +21 -27
- thestage/services/validation_service.py +14 -9
- {thestage-0.5.46.dist-info → thestage-0.5.47.dist-info}/METADATA +3 -4
- {thestage-0.5.46.dist-info → thestage-0.5.47.dist-info}/RECORD +47 -41
- {thestage-0.5.46.dist-info → thestage-0.5.47.dist-info}/WHEEL +1 -1
- thestage/exceptions/http_error_exception.py +0 -12
- thestage/services/clients/thestage_api/core/api_client_abstract.py +0 -91
- {thestage-0.5.46.dist-info → thestage-0.5.47.dist-info}/LICENSE.txt +0 -0
- {thestage-0.5.46.dist-info → thestage-0.5.47.dist-info}/entry_points.txt +0 -0
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
Metadata-Version: 2.
|
|
1
|
+
Metadata-Version: 2.1
|
|
2
2
|
Name: thestage
|
|
3
|
-
Version: 0.5.
|
|
3
|
+
Version: 0.5.47
|
|
4
4
|
Summary:
|
|
5
5
|
Author: TheStage AI team
|
|
6
6
|
Author-email: hello@thestage.ai
|
|
@@ -10,12 +10,11 @@ Classifier: Programming Language :: Python :: 3.9
|
|
|
10
10
|
Classifier: Programming Language :: Python :: 3.10
|
|
11
11
|
Classifier: Programming Language :: Python :: 3.11
|
|
12
12
|
Classifier: Programming Language :: Python :: 3.12
|
|
13
|
-
Classifier: Programming Language :: Python :: 3.13
|
|
14
13
|
Requires-Dist: aioconsole (>=0.8.0,<0.9.0)
|
|
15
14
|
Requires-Dist: boto3 (>=1.35.80,<2.0.0)
|
|
16
15
|
Requires-Dist: gitpython (>=3.1.40,<4.0.0)
|
|
17
16
|
Requires-Dist: httpx (>=0.27.2,<0.28.0)
|
|
18
|
-
Requires-Dist: paramiko (>=3.
|
|
17
|
+
Requires-Dist: paramiko (>=3.5.1,<4.0.0)
|
|
19
18
|
Requires-Dist: pydantic (>=2.4.2,<3.0.0)
|
|
20
19
|
Requires-Dist: python-dotenv (>=1.0.0,<2.0.0)
|
|
21
20
|
Requires-Dist: python-gettext-translations (>=1.1.0,<2.0.0)
|
|
@@ -1,18 +1,23 @@
|
|
|
1
|
-
thestage
|
|
1
|
+
thestage/.env,sha256=3nhls9S7988o3kow9IETQuaq8vXbyTHQDkHxMpFu5Iw,187
|
|
2
|
+
thestage/__init__.py,sha256=qLrayU7awNqaeKLMu2MU9cuWz-1PCv8PeSkIxjsEWmg,66
|
|
2
3
|
thestage/__main__.py,sha256=4ObdWrDRaIASaR06IxtFSsoMu58eyL0MnD64habvPj8,101
|
|
4
|
+
thestage/cli_command.py,sha256=P93LXDruJWecmF5xn-D2uhMOSD9iSJl-gP4oG9aD56k,2173
|
|
5
|
+
thestage/cli_command_helper.py,sha256=f5NZQ4MZJ7yyxPvkQW7ilIAxN_19Mx_zzSqedhZtd6g,1939
|
|
3
6
|
thestage/color_scheme/color_scheme.py,sha256=qaSSS_OzPsqI7yV1TC3Ne0PnsWDWo5xqU8j_7JYG-TI,210
|
|
4
7
|
thestage/config/__init__.py,sha256=RNobilYVK1WAM1utcQ8ZuATKc9Zh9M9BAjCLZTnR_TA,428
|
|
8
|
+
thestage/config/config_storage.py,sha256=6Zg1fuv8HSlYsZ-27paKDv8OBhUi2s7WGlTQswxg8WU,108
|
|
5
9
|
thestage/config/env_base.py,sha256=RNBQ17yk1ieu1kdUlM7Qe7mDCoxstgGUwwhe265o4dQ,367
|
|
6
10
|
thestage/controllers/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
7
|
-
thestage/controllers/base_controller.py,sha256=
|
|
8
|
-
thestage/controllers/config_controller.py,sha256=
|
|
9
|
-
thestage/controllers/container_controller.py,sha256=
|
|
10
|
-
thestage/controllers/instance_controller.py,sha256=
|
|
11
|
-
thestage/controllers/project_controller.py,sha256=
|
|
12
|
-
thestage/controllers/utils_controller.py,sha256=
|
|
11
|
+
thestage/controllers/base_controller.py,sha256=52uvBAL9Z-otP-oXGZoRZ7AjR0nAOrXzBang9PhyVyE,2458
|
|
12
|
+
thestage/controllers/config_controller.py,sha256=hj9SiPCC1o1loJx8txl5wMh_S52RD-OdpvOWJG1NM6E,5417
|
|
13
|
+
thestage/controllers/container_controller.py,sha256=Es3s4NOa0fYCqYSUv6unv3ryqRQ5t_f6yrybZhileZM,15312
|
|
14
|
+
thestage/controllers/instance_controller.py,sha256=uV0ZLqTsz7CfQA6T_ZhepPz3KfDFCW5wgiWoNvrH_OE,6680
|
|
15
|
+
thestage/controllers/project_controller.py,sha256=7CQmvo6QXcWxDZcFURMuq_z3c0WFVhEfQIWEkxkbGls,31057
|
|
16
|
+
thestage/controllers/utils_controller.py,sha256=ac-TLWC2wrmxJYNFOltoQKCTpFaKB6p937odona64OI,912
|
|
13
17
|
thestage/debug_main.dist.py,sha256=UPIJ58yf-6FtXZj-FLAwxi7HononseuCYm9xb5KlxTs,783
|
|
18
|
+
thestage/debug_tests.py,sha256=u4I3NMKUaCFQsrrw4LKnniwMOlv99hD5zM_xyBGo5QE,539
|
|
14
19
|
thestage/entities/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
15
|
-
thestage/entities/container.py,sha256=
|
|
20
|
+
thestage/entities/container.py,sha256=jP8ZUQPSMdAG5Z68FFKLYpBFI7Hf42Jz4_NXnRj5css,533
|
|
16
21
|
thestage/entities/enums/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
17
22
|
thestage/entities/enums/order_direction_type.py,sha256=zC9-FLhn8-6NVmSlgeKXKBnVJKH8RLtuUYApQIb1zcU,95
|
|
18
23
|
thestage/entities/enums/shell_type.py,sha256=-XcPiI3psjeIzd0VXWHdca5Ttgbu9M5oQPeZUZLJRMc,118
|
|
@@ -22,8 +27,8 @@ thestage/entities/file_item.py,sha256=hxUbdne6AYFHJfuQ8l0XQO86IuC8Pyx_OrPw_0lhN_
|
|
|
22
27
|
thestage/entities/project_inference_simulator.py,sha256=J7Kq3Stb9EElaa8LYLo5kzLLAzgG0ibg4u1iNo0ZUns,597
|
|
23
28
|
thestage/entities/project_inference_simulator_model.py,sha256=_xfjaaCSUfVKFQLlsyMEvD4oboKAzIOl6YoMyS59XyQ,546
|
|
24
29
|
thestage/entities/project_task.py,sha256=7uewPIC_HF32OviQHU7uyJ8KokCuK5OjB47r-ltdpyI,672
|
|
25
|
-
thestage/entities/rented_instance.py,sha256=
|
|
26
|
-
thestage/entities/self_hosted_instance.py,sha256=
|
|
30
|
+
thestage/entities/rented_instance.py,sha256=NjYKaO0oZ3a55OJHrMyWK9ueeXw8HtVgm9-0nobo_kg,632
|
|
31
|
+
thestage/entities/self_hosted_instance.py,sha256=oJeKpLyqBdFxWiaoxJq6XDyXjRwYsCs40uM1AF6YMng,629
|
|
27
32
|
thestage/exceptions/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
28
33
|
thestage/exceptions/auth_exception.py,sha256=HZeiF3aocqukmClUfIDCk5izb4tpG4KEbhyXtVl2z34,214
|
|
29
34
|
thestage/exceptions/base_exception.py,sha256=ekov63Q0OZLeLOu6bhHN9KLo8pPn0XLCMZwZrVULhDw,282
|
|
@@ -31,35 +36,35 @@ thestage/exceptions/business_logic_exception.py,sha256=vNiSq9hUjrB0gx1umFcq4Eft9
|
|
|
31
36
|
thestage/exceptions/config_exception.py,sha256=c2V8ccEoPWOV5fd_rSgaj9HB4rQfj6DOdnALEq_U8-Q,218
|
|
32
37
|
thestage/exceptions/file_system_exception.py,sha256=OiBCtjzV1ToXfn5HtmXv9Ihp6uDcKNSyKzQxut-xhQQ,226
|
|
33
38
|
thestage/exceptions/git_access_exception.py,sha256=ZyB5qrz6fok1jOEKtt3PXP9vq3vOmKOK2OZcFztH9gM,465
|
|
34
|
-
thestage/exceptions/http_error_exception.py,sha256=24R8KYC5nU8T1zDE9xtThM9SAA3PGSgv4zPk4Gn5eWI,405
|
|
35
39
|
thestage/exceptions/remote_server_exception.py,sha256=Z1R5Wjw3w7VdqURhjidGkNhJL9lsA76txkAZPA5Uv70,595
|
|
36
40
|
thestage/git/ProgressPrinter.py,sha256=z99BPq3KYycClL-7fmsERIIuZ03papdIYOhR8A7b9AA,573
|
|
37
41
|
thestage/helpers/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
38
|
-
thestage/helpers/error_handler.py,sha256=
|
|
42
|
+
thestage/helpers/error_handler.py,sha256=_KArMtEmlwvZmPcbbO-fGYSuMKMmOTErZONf1jkFpu8,5355
|
|
43
|
+
thestage/helpers/exception_hook.py,sha256=jekDs7smzI1UjXkuMut_uM725GL3c6Gr_zmyEYdDjV8,334
|
|
39
44
|
thestage/helpers/logger/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
40
|
-
thestage/helpers/logger/app_logger.py,sha256=
|
|
45
|
+
thestage/helpers/logger/app_logger.py,sha256=4dgZ_8k28R887rmIHmCTn2QVg0stqTk8hcXa5CF4VJc,1607
|
|
41
46
|
thestage/helpers/ssh_util.py,sha256=JuDwddHxEGcA24Y8a-jLv339cG-jq4hEaBAl5TSVVFw,1262
|
|
42
47
|
thestage/i18n/en_GB/messages.po,sha256=BuVIhd5TRQkgFkAbTGvbSRuO88lSJGpnk9TT2J9BC8E,32375
|
|
43
48
|
thestage/i18n/translation.py,sha256=c62OicQ4phSMuqDe7hqGebIsk0W2-8ZJUfgfdtjjqEc,284
|
|
44
|
-
thestage/main.py,sha256=
|
|
49
|
+
thestage/main.py,sha256=P59_DqDeb6metD6RBCmpp1crEh9VhsKTYPt4SUdPfS4,1789
|
|
45
50
|
thestage/services/.env,sha256=K2VpzFAVjD75XawAHZdR0HWmypryA_mXNY4WHNgR-wQ,184
|
|
46
51
|
thestage/services/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
47
52
|
thestage/services/abstract_mapper.py,sha256=_q7YLkPNRsNW5wOCqvZIu1KfpLkc7uVaAQKrMZtsGuY,218
|
|
48
|
-
thestage/services/abstract_service.py,sha256=
|
|
49
|
-
thestage/services/app_config_service.py,sha256=
|
|
53
|
+
thestage/services/abstract_service.py,sha256=fsGXb0plZ9SvGBWAY4y599BH196YoFP3BJ7LS_pgTcc,2707
|
|
54
|
+
thestage/services/app_config_service.py,sha256=bbiXxcLoh_XC3mgsAo9ciksblPvUEcnG2oCIm1jMyo4,1679
|
|
55
|
+
thestage/services/clients/.DS_Store,sha256=EYALnKLNXhZ-2jJTMck8Fo1bIxlFCvaXGUUUf-lgHxM,6148
|
|
50
56
|
thestage/services/clients/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
51
57
|
thestage/services/clients/git/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
52
58
|
thestage/services/clients/git/git_client.py,sha256=y1ZHgFu5l6tQ3l7SCJVLP81VDGTkCWofhOsVruZwJHo,12716
|
|
53
59
|
thestage/services/clients/thestage_api/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
54
|
-
thestage/services/clients/thestage_api/api_client.py,sha256
|
|
55
|
-
thestage/services/clients/thestage_api/core/
|
|
56
|
-
thestage/services/clients/thestage_api/core/api_client_core.py,sha256=WwtzdTAxog-l2UU8Up40BxepgM7OTXn-XHgzlHorXT0,908
|
|
60
|
+
thestage/services/clients/thestage_api/api_client.py,sha256=gPjJ-qlkvZutIh0aCFMRDpOZUImb89mdjPi_m25LAJA,30368
|
|
61
|
+
thestage/services/clients/thestage_api/core/api_client_core.py,sha256=lEffuh30f6oV2lp90UuET90OUxnrMh2PHjquF6_sT6E,3453
|
|
57
62
|
thestage/services/clients/thestage_api/core/http_client_exception.py,sha256=JH-874Gu9T1b1_FpPBLqdyt9U0PyhpwRCe_oDc6c_jI,385
|
|
58
63
|
thestage/services/clients/thestage_api/dtos/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
59
64
|
thestage/services/clients/thestage_api/dtos/base_response.py,sha256=R6jjhvv0U0XD8j5N5T36q-6liiEAUy7xINFA1H7CMB8,410
|
|
60
65
|
thestage/services/clients/thestage_api/dtos/cloud_provider_region.py,sha256=EJNhQywINW0dtjXKHEDb-etkWQ7keXNUSDhH-h9cabs,1011
|
|
61
66
|
thestage/services/clients/thestage_api/dtos/container_param_request.py,sha256=8Mp9-ZqkvoVw_lyCjo-7syMA4zCKXhs367PIl5DhWN8,436
|
|
62
|
-
thestage/services/clients/thestage_api/dtos/container_response.py,sha256=
|
|
67
|
+
thestage/services/clients/thestage_api/dtos/container_response.py,sha256=15WqoxXw6VkombfRbWvR_gLTPyOfE2qidaDBj1oy--w,3763
|
|
63
68
|
thestage/services/clients/thestage_api/dtos/docker_container_assigned_device.py,sha256=u_OE30OpGIeqF4Wnil44JCLIN5rQfpLReTIXfJEbtyk,361
|
|
64
69
|
thestage/services/clients/thestage_api/dtos/docker_container_controller/docker_container_list_request.py,sha256=AMNmxoWGt4yAS7juirOCurhlNqEkKAV2C974tLZ212A,500
|
|
65
70
|
thestage/services/clients/thestage_api/dtos/docker_container_controller/docker_container_list_response.py,sha256=DfbXk6ikZK78NxlaC5nGujVeSrafTRu7H8QslarmfqE,663
|
|
@@ -95,11 +100,11 @@ thestage/services/clients/thestage_api/dtos/inference_controller/inference_simul
|
|
|
95
100
|
thestage/services/clients/thestage_api/dtos/inference_controller/inference_simulator_list_for_project_response.py,sha256=YVMbjwz18wWdn9OIzQcc50Vc8e9r2zQc4csIUDDGPyQ,554
|
|
96
101
|
thestage/services/clients/thestage_api/dtos/inference_controller/inference_simulator_model_list_for_project_request.py,sha256=ljK-NhYCGojuHHJjOW3WcT6hSSf1lsBHEUyZe3UT-lE,486
|
|
97
102
|
thestage/services/clients/thestage_api/dtos/inference_controller/inference_simulator_model_list_for_project_response.py,sha256=d6Aikhrbu0CDrtqUi5XWhYzFK4PrcD3YdJpt9wOUuMI,673
|
|
98
|
-
thestage/services/clients/thestage_api/dtos/inference_simulator_model_response.py,sha256=
|
|
99
|
-
thestage/services/clients/thestage_api/dtos/inference_simulator_response.py,sha256=
|
|
103
|
+
thestage/services/clients/thestage_api/dtos/inference_simulator_model_response.py,sha256=zC0wMnp_73oNse-ZMF5dICrqwXtJ5KdpKVkb7ejx61s,421
|
|
104
|
+
thestage/services/clients/thestage_api/dtos/inference_simulator_response.py,sha256=KUs4cZF7I7rC_UceCG4MfBaNffxkf-_HNDuKfvHyKQI,405
|
|
100
105
|
thestage/services/clients/thestage_api/dtos/installed_service.py,sha256=YHpFFozYe_fz_MP9Tdr-Nn6oR9FWfnXA9NTaxeGlyPI,662
|
|
101
106
|
thestage/services/clients/thestage_api/dtos/instance_detected_gpus.py,sha256=G32A2kz78sJeLcWkIHcbkC75YxUezXjhp98_2RLCo1g,636
|
|
102
|
-
thestage/services/clients/thestage_api/dtos/instance_rented_response.py,sha256=
|
|
107
|
+
thestage/services/clients/thestage_api/dtos/instance_rented_response.py,sha256=ZRmSupfT9fckcWlSRKoa0B9Xwq72X7IY_1vUc1yTXM0,4478
|
|
103
108
|
thestage/services/clients/thestage_api/dtos/logging_controller/docker_container_log_stream_request.py,sha256=1roOpNE6BX8E9zyPdoMBp0bpL70xRQJepH9Q0EZ8H7c,223
|
|
104
109
|
thestage/services/clients/thestage_api/dtos/logging_controller/log_polling_request.py,sha256=mu3j0DH3qLrySf43EIET8vDn-miiEdYvFR8wX7mwh-4,526
|
|
105
110
|
thestage/services/clients/thestage_api/dtos/logging_controller/log_polling_response.py,sha256=To3AbryCZ4ihOlukrwucQQNUaRnNIvvH5VZw38AcjrA,548
|
|
@@ -118,7 +123,7 @@ thestage/services/clients/thestage_api/dtos/project_controller/project_run_task_
|
|
|
118
123
|
thestage/services/clients/thestage_api/dtos/project_controller/project_start_inference_simulator_request.py,sha256=TMLXtRAy1Z66xt-XmLS-88tDwuWBA3srz6w-uAlM71U,675
|
|
119
124
|
thestage/services/clients/thestage_api/dtos/project_controller/project_start_inference_simulator_response.py,sha256=Q7XlbZ4vgk9QQL2z11BeUkKDn-5p8j06eNI0GmpZNjk,430
|
|
120
125
|
thestage/services/clients/thestage_api/dtos/project_response.py,sha256=PQ0L14_8akc5ADZeL_Y15Z2Hlvkt54d0YKfPROJZQHk,1691
|
|
121
|
-
thestage/services/clients/thestage_api/dtos/selfhosted_instance_response.py,sha256=
|
|
126
|
+
thestage/services/clients/thestage_api/dtos/selfhosted_instance_response.py,sha256=_zjZAmJ5XI5Jf3Hpys9SBuM_wSsBaUm9KIyFUxECPJ0,3047
|
|
122
127
|
thestage/services/clients/thestage_api/dtos/sftp_path_helper.py,sha256=UeCEcE_qR_TcOGFyOLef7cz3veh1_o6MnLbAJyZk2yc,362
|
|
123
128
|
thestage/services/clients/thestage_api/dtos/ssh_key_controller/add_ssh_key_to_user_request.py,sha256=BmO99BXrbUCb2ZIYS2oc7xkwWb5CV5WCaqt1xO4yIro,234
|
|
124
129
|
thestage/services/clients/thestage_api/dtos/ssh_key_controller/add_ssh_key_to_user_response.py,sha256=V8wH70noiX2wIFPr8MoBClVl3uUnKpJgaELp59dfK9E,391
|
|
@@ -128,21 +133,22 @@ thestage/services/clients/thestage_api/dtos/ssh_key_controller/is_user_has_publi
|
|
|
128
133
|
thestage/services/clients/thestage_api/dtos/ssh_key_controller/is_user_has_public_ssh_key_response.py,sha256=wwZ-W-LUibTVNXkERQjn6da_02jOJMGHYburaWkpXVw,424
|
|
129
134
|
thestage/services/clients/thestage_api/dtos/task_controller/task_list_for_project_request.py,sha256=hJt5T2mHPaS9U793NlvgY6kv_GFUxk34QGeRymvQN7Q,392
|
|
130
135
|
thestage/services/clients/thestage_api/dtos/task_controller/task_list_for_project_response.py,sha256=r2R2efDZmaAyfiNs_kuftpgaP-j6VWpKnA1qkHDQfII,466
|
|
131
|
-
thestage/services/clients/thestage_api/dtos/task_controller/task_status_localized_map_response.py,sha256=
|
|
136
|
+
thestage/services/clients/thestage_api/dtos/task_controller/task_status_localized_map_response.py,sha256=yop410FwNvQFXYHKh60ne4DSO3m19zF1nCEuUVSaZ8w,283
|
|
132
137
|
thestage/services/clients/thestage_api/dtos/task_controller/task_view_response.py,sha256=30P19Fipas4wzHguvzmxsAoDkKcGNbcKQ_SjJOQVsq8,462
|
|
133
138
|
thestage/services/clients/thestage_api/dtos/user_controller/user_profile.py,sha256=cDH5azyVBXi3V7kIOEuzsF1aKONQnxcI7YsDwXjRmuE,268
|
|
139
|
+
thestage/services/clients/thestage_api/dtos/validate_token_response.py,sha256=nmKbqRPkwtzhv37QheA_MO4CpEPmGM0VUC2gYckcrl8,418
|
|
134
140
|
thestage/services/config_provider/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
135
|
-
thestage/services/config_provider/config_provider.py,sha256=
|
|
136
|
-
thestage/services/connect/connect_service.py,sha256=
|
|
141
|
+
thestage/services/config_provider/config_provider.py,sha256=rxMydXyAdR45ARwEK4020LmunexucPp4HszCTeKe9v8,10257
|
|
142
|
+
thestage/services/connect/connect_service.py,sha256=D7c6ypCFQfgkEa9sITbZhnOGXQtGQFLgi-fZYdbRYqY,9448
|
|
137
143
|
thestage/services/connect/dto/remote_server_config.py,sha256=yuO0tTAgUxCiQ-h1nVvWUMlCUtR-WB_eOH6KYspV7zQ,272
|
|
138
144
|
thestage/services/container/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
139
|
-
thestage/services/container/container_service.py,sha256=
|
|
145
|
+
thestage/services/container/container_service.py,sha256=ndsjWGupoXlCLAheFij6IcqLtaMickgS5rBMqM7qYkc,14148
|
|
140
146
|
thestage/services/container/mapper/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
141
147
|
thestage/services/container/mapper/container_mapper.py,sha256=ymIjBLGZnpodh0W2KwNUqRxT0VgM1hsCViNza1nhWHk,1088
|
|
142
|
-
thestage/services/core_files/config_entity.py,sha256=
|
|
143
|
-
thestage/services/filesystem_service.py,sha256=
|
|
148
|
+
thestage/services/core_files/config_entity.py,sha256=_55m8h2_KXIxl8Y71Yyk3wTj-q1mo918YU1yltzVqgQ,1075
|
|
149
|
+
thestage/services/filesystem_service.py,sha256=Ee62DJ7rlkpBkyz40so7Fwd-39vN03uL6uYapcsiq58,4892
|
|
144
150
|
thestage/services/instance/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
145
|
-
thestage/services/instance/instance_service.py,sha256=
|
|
151
|
+
thestage/services/instance/instance_service.py,sha256=NqMT9lKXJlcvflJr7GBLD78zehvfHRYCI9onzAO5gVM,12718
|
|
146
152
|
thestage/services/instance/mapper/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
147
153
|
thestage/services/instance/mapper/instance_mapper.py,sha256=OA0-Z6ODfAK1yBjf7nF-JDKERr8lZUm5vYKk_TFw-v8,1132
|
|
148
154
|
thestage/services/instance/mapper/selfhosted_mapper.py,sha256=KpkvsDV0OWzHhN53md4mgo3xc8siM5idDwL_pSRTouE,1286
|
|
@@ -151,7 +157,7 @@ thestage/services/logging/dto/log_message.py,sha256=k2clfz2fQnQ-ycFI8g8WYJ_XOjK0
|
|
|
151
157
|
thestage/services/logging/dto/log_type.py,sha256=a6JWnq0ZjJ-2BQrG-fKYYy3UeJS2U2ZzE5P_EXglBfE,95
|
|
152
158
|
thestage/services/logging/exception/log_polling_exception.py,sha256=rKQ7AtNCGKkk5OINIyyjvLT92PU5i_yJUH-Msr9hXQw,226
|
|
153
159
|
thestage/services/logging/logging_constants.py,sha256=4Gk2tglHW_-jnjB8uVIh-ds4fAVBqNW8igfQt8k7Quc,137
|
|
154
|
-
thestage/services/logging/logging_service.py,sha256=
|
|
160
|
+
thestage/services/logging/logging_service.py,sha256=7xhzxlSHwaepJtBsPN63-oMF1Ii335REHnMd4J_UFQw,17153
|
|
155
161
|
thestage/services/project/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
156
162
|
thestage/services/project/dto/inference_simulator_dto.py,sha256=5U4uGp7VC1Yr-T0fqZiSNqZUIybs4J9sV25vjBbAUxI,1312
|
|
157
163
|
thestage/services/project/dto/inference_simulator_model_dto.py,sha256=j4dT-7cduzLd59QnmnfQt_aFsiUucpyJFGb-9rNx5K8,1172
|
|
@@ -160,13 +166,13 @@ thestage/services/project/mapper/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRk
|
|
|
160
166
|
thestage/services/project/mapper/project_inference_simulator_mapper.py,sha256=UdOu9IIF5rlNPoWSaaeSKU3ODe8E5uSMgm2V5ywMWKE,812
|
|
161
167
|
thestage/services/project/mapper/project_inference_simulator_model_mapper.py,sha256=PWY0iWbXhvD-G0X0_aQZAFY2bqc0lvRJcQAyC8Y-88Q,869
|
|
162
168
|
thestage/services/project/mapper/project_task_mapper.py,sha256=SHIEXjYwt4vm2B1X2QiI4sCPbBarum0bTOnmTWPOlto,813
|
|
163
|
-
thestage/services/project/project_service.py,sha256=
|
|
164
|
-
thestage/services/remote_server_service.py,sha256=
|
|
165
|
-
thestage/services/service_factory.py,sha256=
|
|
169
|
+
thestage/services/project/project_service.py,sha256=AskyiT3_yFnOWW5tXm3_wGM5zcamKWswGu1JIVTqasw,57875
|
|
170
|
+
thestage/services/remote_server_service.py,sha256=dYLuwQQeuFC8Z9ozmZgapPZ0xChjBrTYS5frCAJmG3w,23264
|
|
171
|
+
thestage/services/service_factory.py,sha256=WosSbicSvY9dHOkS2OqGCtHkmKdJE1f_K7uEnB3Auaw,4291
|
|
166
172
|
thestage/services/task/dto/task_dto.py,sha256=PJwrUsLLAoO2uA9xvzb27b9iYAoNiBcsHSxKERh2VFo,2335
|
|
167
|
-
thestage/services/validation_service.py,sha256=
|
|
168
|
-
thestage-0.5.
|
|
169
|
-
thestage-0.5.
|
|
170
|
-
thestage-0.5.
|
|
171
|
-
thestage-0.5.
|
|
172
|
-
thestage-0.5.
|
|
173
|
+
thestage/services/validation_service.py,sha256=iopaDKuC_V_4Z_Zly5BFaLL74wG66z9URE86_I-9Hi4,2243
|
|
174
|
+
thestage-0.5.47.dist-info/LICENSE.txt,sha256=U9QrxfdD7Ie7r8z1FleuvOGQvgCF1m0Mjd78cFvWaHE,572
|
|
175
|
+
thestage-0.5.47.dist-info/METADATA,sha256=STjdz-e1fxmTuMKQ8n__Gj7KfqiCaqE1KemyLisaf5U,5507
|
|
176
|
+
thestage-0.5.47.dist-info/WHEEL,sha256=sP946D7jFCHeNz5Iq4fL4Lu-PrWrFsgfLXbbkciIZwg,88
|
|
177
|
+
thestage-0.5.47.dist-info/entry_points.txt,sha256=57pMhs8zaCM-jgeTffC0WVqCsh35Uq_dUDmzXR80CI4,47
|
|
178
|
+
thestage-0.5.47.dist-info/RECORD,,
|
|
@@ -1,12 +0,0 @@
|
|
|
1
|
-
# from thestage.exceptions.base_exception import BaseAbstractException
|
|
2
|
-
#
|
|
3
|
-
#
|
|
4
|
-
# class HttpClientException(BaseAbstractException):
|
|
5
|
-
# _status_code: int = 0
|
|
6
|
-
#
|
|
7
|
-
# def __init__(self, message: str, status_code: int, ):
|
|
8
|
-
# super(HttpClientException, self).__init__(message=message)
|
|
9
|
-
# self._status_code = status_code
|
|
10
|
-
#
|
|
11
|
-
# def get_status_code(self) -> int:
|
|
12
|
-
# return self._status_code
|
|
@@ -1,91 +0,0 @@
|
|
|
1
|
-
import json
|
|
2
|
-
from abc import ABC
|
|
3
|
-
from typing import Optional
|
|
4
|
-
|
|
5
|
-
import requests
|
|
6
|
-
|
|
7
|
-
from thestage.config import THESTAGE_API_URL
|
|
8
|
-
from thestage.exceptions.auth_exception import AuthException
|
|
9
|
-
from thestage.services.clients.thestage_api.core.http_client_exception import HttpClientException
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
class TheStageApiClientAbstract(ABC):
|
|
13
|
-
def __init__(self, timeout: int, url: Optional[str] = None):
|
|
14
|
-
self.__timeout = timeout
|
|
15
|
-
self.__api_url = url
|
|
16
|
-
|
|
17
|
-
def _get_host(self, ) -> str:
|
|
18
|
-
return self.__api_url or THESTAGE_API_URL
|
|
19
|
-
|
|
20
|
-
def _request(
|
|
21
|
-
self,
|
|
22
|
-
method: str,
|
|
23
|
-
url: str,
|
|
24
|
-
data: dict = None,
|
|
25
|
-
query_params: dict = None,
|
|
26
|
-
headers: Optional[dict] = None,
|
|
27
|
-
token: Optional[str] = None,
|
|
28
|
-
):
|
|
29
|
-
if not data:
|
|
30
|
-
data = {}
|
|
31
|
-
|
|
32
|
-
host = self._get_host()
|
|
33
|
-
url = f'{host}{url}'
|
|
34
|
-
|
|
35
|
-
request_headers = {
|
|
36
|
-
'Content-Type': 'application/json',
|
|
37
|
-
}
|
|
38
|
-
|
|
39
|
-
if token:
|
|
40
|
-
request_headers['Authorization'] = f"Bearer {token}"
|
|
41
|
-
|
|
42
|
-
if headers:
|
|
43
|
-
request_headers.update(headers)
|
|
44
|
-
response = requests.request(
|
|
45
|
-
method=method,
|
|
46
|
-
url=url,
|
|
47
|
-
json=data,
|
|
48
|
-
params=query_params,
|
|
49
|
-
headers=request_headers,
|
|
50
|
-
timeout=self.__timeout,
|
|
51
|
-
|
|
52
|
-
)
|
|
53
|
-
return self._parse_api_response(response)
|
|
54
|
-
|
|
55
|
-
@staticmethod
|
|
56
|
-
def _parse_api_response(raw_response):
|
|
57
|
-
content_type = raw_response.headers.get('content-type')
|
|
58
|
-
message_error = None
|
|
59
|
-
if content_type == 'application/json':
|
|
60
|
-
try:
|
|
61
|
-
result = raw_response.json()
|
|
62
|
-
message_error = result.get('message', None)
|
|
63
|
-
except json.JSONDecodeError:
|
|
64
|
-
raise HttpClientException(
|
|
65
|
-
message=f"Failed to parse server response",
|
|
66
|
-
status_code=raw_response.status_code,
|
|
67
|
-
)
|
|
68
|
-
else:
|
|
69
|
-
result = raw_response.content.text()
|
|
70
|
-
|
|
71
|
-
if raw_response.status_code == 401:
|
|
72
|
-
raise AuthException(
|
|
73
|
-
message=f"Unauthorized",
|
|
74
|
-
)
|
|
75
|
-
elif raw_response.status_code == 403:
|
|
76
|
-
raise HttpClientException(
|
|
77
|
-
message=f"{message_error if message_error else 'Forbidden'} ({raw_response.status_code})",
|
|
78
|
-
status_code=raw_response.status_code,
|
|
79
|
-
)
|
|
80
|
-
elif raw_response.status_code >= 400:
|
|
81
|
-
raise HttpClientException(
|
|
82
|
-
message=f"{message_error if message_error else 'Request error'} ({raw_response.status_code})",
|
|
83
|
-
status_code=raw_response.status_code,
|
|
84
|
-
)
|
|
85
|
-
elif raw_response.status_code < 200 or raw_response.status_code > 300:
|
|
86
|
-
raise HttpClientException(
|
|
87
|
-
message=f"{message_error if message_error else 'Request error'} ({raw_response.status_code})",
|
|
88
|
-
status_code=raw_response.status_code,
|
|
89
|
-
)
|
|
90
|
-
|
|
91
|
-
return result
|
|
File without changes
|
|
File without changes
|