internal 1.0.130__tar.gz → 1.1.2__tar.gz

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 internal might be problematic. Click here for more details.

Files changed (39) hide show
  1. {internal-1.0.130 → internal-1.1.2}/PKG-INFO +2 -1
  2. {internal-1.0.130 → internal-1.1.2}/pyproject.toml +2 -1
  3. {internal-1.0.130 → internal-1.1.2}/src/internal/http/requests.py +2 -2
  4. {internal-1.0.130 → internal-1.1.2}/src/internal/middleware/log_request.py +2 -4
  5. {internal-1.0.130 → internal-1.1.2}/README.md +0 -0
  6. {internal-1.0.130 → internal-1.1.2}/src/internal/__init__.py +0 -0
  7. {internal-1.0.130 → internal-1.1.2}/src/internal/base_config.py +0 -0
  8. {internal-1.0.130 → internal-1.1.2}/src/internal/base_factory.py +0 -0
  9. {internal-1.0.130 → internal-1.1.2}/src/internal/cache_redis.py +0 -0
  10. {internal-1.0.130 → internal-1.1.2}/src/internal/common_enum/__init__.py +0 -0
  11. {internal-1.0.130 → internal-1.1.2}/src/internal/common_enum/contact_type.py +0 -0
  12. {internal-1.0.130 → internal-1.1.2}/src/internal/common_enum/description_type.py +0 -0
  13. {internal-1.0.130 → internal-1.1.2}/src/internal/common_enum/device_code.py +0 -0
  14. {internal-1.0.130 → internal-1.1.2}/src/internal/common_enum/event_code.py +0 -0
  15. {internal-1.0.130 → internal-1.1.2}/src/internal/common_enum/lpr_direction.py +0 -0
  16. {internal-1.0.130 → internal-1.1.2}/src/internal/common_enum/notify_type.py +0 -0
  17. {internal-1.0.130 → internal-1.1.2}/src/internal/common_enum/operator_type.py +0 -0
  18. {internal-1.0.130 → internal-1.1.2}/src/internal/common_enum/order_type.py +0 -0
  19. {internal-1.0.130 → internal-1.1.2}/src/internal/common_enum/websocket_channel.py +0 -0
  20. {internal-1.0.130 → internal-1.1.2}/src/internal/const.py +0 -0
  21. {internal-1.0.130 → internal-1.1.2}/src/internal/database.py +0 -0
  22. {internal-1.0.130 → internal-1.1.2}/src/internal/exception/__init__.py +0 -0
  23. {internal-1.0.130 → internal-1.1.2}/src/internal/exception/app_exception.py +0 -0
  24. {internal-1.0.130 → internal-1.1.2}/src/internal/exception/base_exception.py +0 -0
  25. {internal-1.0.130 → internal-1.1.2}/src/internal/exception/internal_exception.py +0 -0
  26. {internal-1.0.130 → internal-1.1.2}/src/internal/ext/__init__.py +0 -0
  27. {internal-1.0.130 → internal-1.1.2}/src/internal/ext/amazon/__init__.py +0 -0
  28. {internal-1.0.130 → internal-1.1.2}/src/internal/ext/amazon/aws/__init__.py +0 -0
  29. {internal-1.0.130 → internal-1.1.2}/src/internal/ext/amazon/aws/const.py +0 -0
  30. {internal-1.0.130 → internal-1.1.2}/src/internal/http/__init__.py +0 -0
  31. {internal-1.0.130 → internal-1.1.2}/src/internal/http/responses.py +0 -0
  32. {internal-1.0.130 → internal-1.1.2}/src/internal/interface/__init__.py +0 -0
  33. {internal-1.0.130 → internal-1.1.2}/src/internal/interface/base_interface.py +0 -0
  34. {internal-1.0.130 → internal-1.1.2}/src/internal/middleware/__init__.py +0 -0
  35. {internal-1.0.130 → internal-1.1.2}/src/internal/model/__init__.py +0 -0
  36. {internal-1.0.130 → internal-1.1.2}/src/internal/model/base_model.py +0 -0
  37. {internal-1.0.130 → internal-1.1.2}/src/internal/model/operate.py +0 -0
  38. {internal-1.0.130 → internal-1.1.2}/src/internal/utils.py +0 -0
  39. {internal-1.0.130 → internal-1.1.2}/src/internal/validator_utils.py +0 -0
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.3
2
2
  Name: internal
3
- Version: 1.0.130
3
+ Version: 1.1.2
4
4
  Summary:
5
5
  Author: Ray
6
6
  Author-email: ray@cruisys.com
@@ -16,6 +16,7 @@ Requires-Dist: dictdiffer (>=0.9.0,<0.10.0)
16
16
  Requires-Dist: fastapi (>=0.115.6,<0.116.0)
17
17
  Requires-Dist: httpx (>=0.28.1,<0.29.0)
18
18
  Requires-Dist: pydantic-settings (>=2.7.1,<3.0.0)
19
+ Requires-Dist: pytest (>=8.4.1,<9.0.0)
19
20
  Requires-Dist: redis (>=5.2.1,<6.0.0)
20
21
  Requires-Dist: uvicorn (>=0.34.0,<0.35.0)
21
22
  Requires-Dist: watchtower (>=3.3.1,<4.0.0)
@@ -1,6 +1,6 @@
1
1
  [project]
2
2
  name = "internal"
3
- version = "1.0.130"
3
+ version = "1.1.2"
4
4
  description = ""
5
5
  authors = [{ name = "Ray", email = "ray@cruisys.com" }]
6
6
  readme = "README.md"
@@ -20,6 +20,7 @@ dictdiffer = "^0.9.0"
20
20
  redis = "^5.2.1"
21
21
  uvicorn = "^0.34.0"
22
22
  asgi-correlation-id = "^4.3.4"
23
+ pytest = "^8.4.1"
23
24
 
24
25
  [build-system]
25
26
  requires = ["poetry-core"]
@@ -44,10 +44,10 @@ async def async_request(app: FastAPI, method, url, current_user: dict = None,
44
44
  if "json" in kwargs:
45
45
  kwargs["json"] = jsonable_encoder(kwargs["json"])
46
46
 
47
- app.state.logger.info(f"async_request() request, url: {url}, method: {method}, kwargs: {kwargs}")
47
+ app.state.logger.info(f"async_request() request, url: {method} {url} \nkwargs: {kwargs}")
48
48
  response = await client.request(method, url, **kwargs)
49
49
  app.state.logger.info(
50
- f"async_request() response, url: {url}, method: {method}, kwargs: {kwargs}, response: {response}, response.text: {response.text}")
50
+ f"async_request() response, url: {method} {url} \nkwargs: {kwargs} \n\nresponse.status_code: {response.status_code} \nresponse.text: {response.text}")
51
51
  return response
52
52
  except httpx.TimeoutException as exc:
53
53
  app.state.logger.warn(
@@ -28,14 +28,12 @@ class LogRequestMiddleware(BaseHTTPMiddleware):
28
28
  params = {k: v[0] if len(v) == 1 else v for k, v in temp.items()}
29
29
 
30
30
  body = await request.body()
31
- self.logger.info(
32
- f"[Request id: {request_id}] Method: {method}, URL: {url} - Headers: {headers} - Params: {params} - Body: {body} start processing...")
31
+ self.logger.info(f"[Request id: {request_id}] \nURL: {method} {url} \nParams: {params} \nBody: {body} \nHeaders: {headers} \nstart processing...")
33
32
 
34
33
  # 记录请求处理时间
35
34
  start_time = time.time()
36
35
  response = await call_next(request)
37
36
  process_time = time.time() - start_time
38
37
 
39
- self.logger.info(
40
- f"[Request id: {request_id}] Method: {method}, URL: {url} - Headers: {headers} - Params: {params} - Body: {body}, Completed in {process_time:.4f} seconds")
38
+ self.logger.info(f"[Request id: {request_id}] \nURL: {method} {url} \nParams: {params} \nBody: {body} \nCompleted in {process_time:.4f} seconds")
41
39
  return response
File without changes