maleo-foundation 0.0.3__py3-none-any.whl → 0.0.4__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.
@@ -3,21 +3,21 @@ from contextlib import asynccontextmanager
3
3
  from typing import AsyncGenerator, Optional
4
4
 
5
5
  class HTTPClientManager:
6
- _client:Optional[httpx.AsyncClient] = None
6
+ client:Optional[httpx.AsyncClient] = None
7
7
 
8
8
  @classmethod
9
9
  def initialize(cls) -> None:
10
10
  """Initialize the HTTP client if not already initialized."""
11
- if cls._client is None:
12
- cls._client = httpx.AsyncClient()
11
+ if cls.client is None:
12
+ cls.client = httpx.AsyncClient()
13
13
 
14
14
  @classmethod
15
15
  async def _client_handler(cls) -> AsyncGenerator[httpx.AsyncClient, None]:
16
16
  """Reusable generator for client handling."""
17
- if cls._client is None:
17
+ if cls.client is None:
18
18
  raise RuntimeError("Client has not been initialized. Call initialize first.")
19
19
 
20
- yield cls._client
20
+ yield cls.client
21
21
 
22
22
  @classmethod
23
23
  async def inject(cls) -> AsyncGenerator[httpx.AsyncClient, None]:
@@ -36,6 +36,6 @@ class HTTPClientManager:
36
36
  @classmethod
37
37
  async def dispose(cls) -> None:
38
38
  """Dispose of the HTTP client and release any resources."""
39
- if cls._client is not None:
40
- await cls._client.aclose()
41
- cls._client = None
39
+ if cls.client is not None:
40
+ await cls.client.aclose()
41
+ cls.client = None
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: maleo_foundation
3
- Version: 0.0.3
3
+ Version: 0.0.4
4
4
  Summary: Foundation package for Maleo
5
5
  Author-email: Agra Bima Yuda <agra@nexmedis.com>
6
6
  License: MIT
@@ -3,7 +3,7 @@ maleo_foundation/constants.py,sha256=l6WQp0nu2y4Ucs8bFcEdzVUJfR1dRM_nveuHGMhe3rY
3
3
  maleo_foundation/controller.py,sha256=91OK1W4MnO85m0GUOQv1F8m50nlTZpZJ2HJcScH7OGA,2980
4
4
  maleo_foundation/clients/__init__.py,sha256=W8vydJYeDEi6gdmOZSBFSSDsfZJtb8C05CHErZgsZ30,188
5
5
  maleo_foundation/clients/general/__init__.py,sha256=l9eQrBeLW4aXtGU5aK3i6fD-msVR4526W7D9V8WCXIg,91
6
- maleo_foundation/clients/general/http.py,sha256=cE-sYlC1fXURwxE1d8pgNoUU9GKKSlPbwqF4EbslX8Q,1361
6
+ maleo_foundation/clients/general/http.py,sha256=Awvs470hgdhZSZW_uoIFJGcJ5hcfDEIX0A2yUaP9UCA,1353
7
7
  maleo_foundation/clients/google/__init__.py,sha256=1uv6nF9QbATsSAcMimQOT7Y-eBljjDunBojNX6oAtS8,90
8
8
  maleo_foundation/clients/google/cloud/__init__.py,sha256=WGMPxEKKdkz3XGY5dZn9E-nYhD1kv1MgRHbmVnky4zk,245
9
9
  maleo_foundation/clients/google/cloud/logging.py,sha256=l8EL8rZAf1uatMil_ARmRL0z4K4iX2HqUUpdctNGXMw,1584
@@ -44,7 +44,7 @@ maleo_foundation/utils/exceptions.py,sha256=mcvBwHm6uWpVQkPtO1T2j-GaTYEiyPOeGxiD
44
44
  maleo_foundation/utils/logger.py,sha256=ICrFi0MxuAjDy8KTRL7pex1miwzZqZX-HHArgN3niJM,2453
45
45
  maleo_foundation/utils/formatter/__init__.py,sha256=iKf5YCbEdg1qKnFHyKqqcQbqAqEeRUf8mhI3v3dQoj8,78
46
46
  maleo_foundation/utils/formatter/case.py,sha256=TmvvlfzGdC_omMTB5vAa40TZBxQ3hnr-SYeo0M52Rlg,1352
47
- maleo_foundation-0.0.3.dist-info/METADATA,sha256=lWTnBmXUOk40L3zgDxdlzSxd95bihx8hOdXKePMrHdA,3159
48
- maleo_foundation-0.0.3.dist-info/WHEEL,sha256=CmyFI0kx5cdEMTLiONQRbGQwjIoR1aIYB7eCAQ4KPJ0,91
49
- maleo_foundation-0.0.3.dist-info/top_level.txt,sha256=_iBos3F_bhEOdjOnzeiEYSrCucasc810xXtLBXI8cQc,17
50
- maleo_foundation-0.0.3.dist-info/RECORD,,
47
+ maleo_foundation-0.0.4.dist-info/METADATA,sha256=USiuKz6SD8xifpC1_nsEDXd9zVMGO10Kw0EyflzNnoI,3159
48
+ maleo_foundation-0.0.4.dist-info/WHEEL,sha256=CmyFI0kx5cdEMTLiONQRbGQwjIoR1aIYB7eCAQ4KPJ0,91
49
+ maleo_foundation-0.0.4.dist-info/top_level.txt,sha256=_iBos3F_bhEOdjOnzeiEYSrCucasc810xXtLBXI8cQc,17
50
+ maleo_foundation-0.0.4.dist-info/RECORD,,