ul-api-utils 7.9.2__py3-none-any.whl → 7.9.3__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 ul-api-utils might be problematic. Click here for more details.

ul_api_utils/conf.py CHANGED
@@ -6,7 +6,7 @@ from typing import Optional
6
6
 
7
7
  from ul_py_tool.utils.colors import NC, FG_BLUE
8
8
 
9
- from ul_api_utils.const import APPLICATION_ENV__LOCAL
9
+ from ul_api_utils.const import APPLICATION_ENV__LOCAL, API_PATH__SWAGGER, API_PATH__SWAGGER_SPEC
10
10
  from ul_api_utils.utils.decode_base64 import decode_base64_to_string
11
11
  from ul_api_utils.utils.flags import Flagged
12
12
 
@@ -58,6 +58,9 @@ APPLICATION_SENTRY_ENABLED_FLASK = os.environ.get('APPLICATION_SENTRY_FLASK', '1
58
58
 
59
59
  APPLICATION_F = Flagged(os.environ.get('APPLICATION_F', ''))
60
60
 
61
+ APPLICATION_SWAGGER_SPECIFICATION_PATH = os.environ.get('APPLICATION_SWAGGER_SPECIFICATION_PATH', API_PATH__SWAGGER_SPEC)
62
+ APPLICATION_SWAGGER_PATH = os.environ.get('APPLICATION_SWAGGER_PATH', API_PATH__SWAGGER)
63
+
61
64
  logging.basicConfig(
62
65
  handlers=[logging.StreamHandler(sys.stdout)],
63
66
  level=_LOG_MAP[APPLICATION_LOG_LEVEL],
@@ -13,8 +13,7 @@ from ul_api_utils.api_resource.api_resource_config import ApiResourceConfig
13
13
  from ul_api_utils.api_resource.api_resource_fn_typing import ApiResourceFnTyping
14
14
  from ul_api_utils.api_resource.api_resource_type import ApiResourceType
15
15
  from ul_api_utils.api_resource.api_response import EmptyJsonApiResponse, ApiResponse
16
- from ul_api_utils.conf import APPLICATION_TMP, APPLICATION_DIR, APPLICATION_F
17
- from ul_api_utils.const import API_PATH__SWAGGER_SPEC, API_PATH__SWAGGER
16
+ from ul_api_utils.conf import APPLICATION_TMP, APPLICATION_DIR, APPLICATION_F, APPLICATION_SWAGGER_PATH, APPLICATION_SWAGGER_SPECIFICATION_PATH
18
17
  from ul_api_utils.debug.debugger import Debugger, AJAX_INTERSEPTOR
19
18
  from ul_api_utils.utils.api_method import ApiMethod
20
19
  from ul_api_utils.utils.api_path_version import ApiPathVersion
@@ -45,8 +44,8 @@ def load_swagger(sdk: 'ApiSdk', resources: List[ApiSdkResource], api_route_path_
45
44
 
46
45
  bp = get_swaggerui_blueprint(
47
46
  blueprint_name='swagger_ui',
48
- base_url=ApiPathVersion.NO_VERSION.compile_path(API_PATH__SWAGGER, api_route_path_prefix),
49
- api_url=ApiPathVersion.NO_VERSION.compile_path(API_PATH__SWAGGER_SPEC, api_route_path_prefix),
47
+ base_url=ApiPathVersion.NO_VERSION.compile_path(APPLICATION_SWAGGER_PATH, api_route_path_prefix),
48
+ api_url=ApiPathVersion.NO_VERSION.compile_path(APPLICATION_SWAGGER_SPECIFICATION_PATH, api_route_path_prefix),
50
49
  )
51
50
 
52
51
  @bp.after_request
@@ -61,7 +60,7 @@ def load_swagger(sdk: 'ApiSdk', resources: List[ApiSdkResource], api_route_path_
61
60
 
62
61
  flask_app.register_blueprint(bp)
63
62
 
64
- @sdk.rest_api('GET', API_PATH__SWAGGER_SPEC, v=ApiPathVersion.NO_VERSION, access=GLOBAL_PERMISSION__PUBLIC, config=ApiResourceConfig(swagger_disabled=True))
63
+ @sdk.rest_api('GET', APPLICATION_SWAGGER_SPECIFICATION_PATH, v=ApiPathVersion.NO_VERSION, access=GLOBAL_PERMISSION__PUBLIC, config=ApiResourceConfig(swagger_disabled=True))
65
64
  def swagger_specification(api_resource: ApiResource) -> EmptyJsonApiResponse:
66
65
  try:
67
66
  if not os.path.exists(swagger_open_api_cache_file):
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.1
2
2
  Name: ul-api-utils
3
- Version: 7.9.2
3
+ Version: 7.9.3
4
4
  Summary: Python api utils
5
5
  Author: Unic-lab
6
6
  Author-email:
@@ -10,7 +10,7 @@ example/routes/api_some.py,sha256=Gkyb3r1AT7Fg8cAhJk7StTS5aGb-vylvyEuXx7g3Yc4,13
10
10
  example/workers/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
11
11
  example/workers/worker.py,sha256=flMYq50OhLtNSaA2qyDJSMeXSNXIqhdBIsaxcmO5-xQ,681
12
12
  ul_api_utils/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
13
- ul_api_utils/conf.py,sha256=JfT8g2MlxDR2iTkvlW13o7-2NZJORsG1MYx86OjOzPQ,3232
13
+ ul_api_utils/conf.py,sha256=zLWsA0TTmekzxYrs5PbeqEkeylaNC_gIui3CGM9aZew,3487
14
14
  ul_api_utils/const.py,sha256=pzY-zRznCJjZ0mFlte6XEsQQCU7EydN2WweEsVHSE7k,2563
15
15
  ul_api_utils/errors.py,sha256=kmmgNXJtgVczOskVG8Ye1WSHbqSSAWC2OzUjPUGCkGo,8137
16
16
  ul_api_utils/main.py,sha256=-0S7qYgyNnom9xUhqowi0ErrYz82m3Z4K_uVxarXhN8,922
@@ -73,7 +73,7 @@ ul_api_utils/resources/not_implemented.py,sha256=OQE5LGA4KqZDwP5Wtub3Aw-icwzbqCS
73
73
  ul_api_utils/resources/permissions.py,sha256=8c8cEPkm69zxgXbDiwUkW6Mi_496-MZXbPOxHITetKs,1436
74
74
  ul_api_utils/resources/rate_limitter.py,sha256=QMpaLu1LoFbvtIEhxF8HbAZIAW4oGKTClt7XEUsqx98,3358
75
75
  ul_api_utils/resources/sockets.py,sha256=gftL6QR762GetSrm8Yjh9kfoMAwH64ijqOBexXBz0BY,76
76
- ul_api_utils/resources/swagger.py,sha256=DspMiFFfOUjJvFOCDi65FggqmQ4TAn48aoezZ9b6_E4,5359
76
+ ul_api_utils/resources/swagger.py,sha256=fK8S9X4YCSqe_weCzV_BcMPoL_NR073BsGUzn2ImbHI,5391
77
77
  ul_api_utils/resources/health_check/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
78
78
  ul_api_utils/resources/health_check/const.py,sha256=QzVZP_ZKmVKleUACiOGjzP-v54FD7tEN6NEF4Jb50Ow,78
79
79
  ul_api_utils/resources/health_check/health_check.py,sha256=bb_ONn3akNXxNFELIUcW6foqwiKqeinmr-Wl0fQ7Q4c,18449
@@ -135,9 +135,9 @@ ul_api_utils/validators/validate_empty_object.py,sha256=3Ck_iwyJE_M5e7l6s1i88aqb
135
135
  ul_api_utils/validators/validate_uuid.py,sha256=EfvlRirv2EW0Z6w3s8E8rUa9GaI8qXZkBWhnPs8NFrA,257
136
136
  ul_api_utils/validators/__tests__/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
137
137
  ul_api_utils/validators/__tests__/test_custom_fields.py,sha256=QLZ7DFta01Z7DOK9Z5Iq4uf_CmvDkVReis-GAl_QN48,1447
138
- ul_api_utils-7.9.2.dist-info/LICENSE,sha256=6Qo8OdcqI8aGrswJKJYhST-bYqxVQBQ3ujKdTSdq-80,1062
139
- ul_api_utils-7.9.2.dist-info/METADATA,sha256=oji6CL7GPw_ZZuFVFr0bwXB7KmZLvoZQ9jk8M8yeL4U,14671
140
- ul_api_utils-7.9.2.dist-info/WHEEL,sha256=G16H4A3IeoQmnOrYV4ueZGKSjhipXx8zc8nu9FGlvMA,92
141
- ul_api_utils-7.9.2.dist-info/entry_points.txt,sha256=8tL3ySHWTyJMuV1hx1fHfN8zumDVOCOm63w3StphkXg,53
142
- ul_api_utils-7.9.2.dist-info/top_level.txt,sha256=1XsW8iOSFaH4LOzDcnNyxHpHrbKU3fSn-aIAxe04jmw,21
143
- ul_api_utils-7.9.2.dist-info/RECORD,,
138
+ ul_api_utils-7.9.3.dist-info/LICENSE,sha256=6Qo8OdcqI8aGrswJKJYhST-bYqxVQBQ3ujKdTSdq-80,1062
139
+ ul_api_utils-7.9.3.dist-info/METADATA,sha256=katZ4TvSVlTmR-CEMjIrM8zKKiJDNdWGxTH8ob3n2Zs,14671
140
+ ul_api_utils-7.9.3.dist-info/WHEEL,sha256=G16H4A3IeoQmnOrYV4ueZGKSjhipXx8zc8nu9FGlvMA,92
141
+ ul_api_utils-7.9.3.dist-info/entry_points.txt,sha256=8tL3ySHWTyJMuV1hx1fHfN8zumDVOCOm63w3StphkXg,53
142
+ ul_api_utils-7.9.3.dist-info/top_level.txt,sha256=1XsW8iOSFaH4LOzDcnNyxHpHrbKU3fSn-aIAxe04jmw,21
143
+ ul_api_utils-7.9.3.dist-info/RECORD,,