bml-connect-python 1.2.0__tar.gz → 1.2.1__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.
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.1
2
2
  Name: bml-connect-python
3
- Version: 1.2.0
3
+ Version: 1.2.1
4
4
  Summary: Python SDK for Bank of Maldives Connect API with synchronous and asynchronous support
5
5
  Home-page: https://github.com/quillfires/bml-connect-python
6
6
  License: MIT
@@ -1,6 +1,6 @@
1
1
  [tool.poetry]
2
2
  name = "bml-connect-python"
3
- version = "1.2.0"
3
+ version = "1.2.1"
4
4
  description = "Python SDK for Bank of Maldives Connect API with synchronous and asynchronous support"
5
5
  authors = ["Fayaz (Quill) <fayaz.quill@gmail.com>"]
6
6
  maintainers = ["Fayaz (Quill) <fayaz.quill@gmail.com>"]
@@ -5,27 +5,29 @@ BML Connect Python SDK
5
5
  Python SDK for Bank of Maldives Connect API with synchronous and asynchronous support.
6
6
 
7
7
  Features:
8
- - Create, retrieve, and list transactions
8
+ - Create, retrieve, cancel, and list transactions
9
9
  - Verify webhook signatures
10
10
  - Supports both production and sandbox environments
11
- - Full sync/async compatibility
11
+ - Full sync/async compatibility with context manager support
12
12
 
13
13
  Basic Usage:
14
14
  from bml_connect import BMLConnect, Environment
15
15
 
16
- # Sync client
17
- client = BMLConnect('your-api-key', 'your-app-id', Environment.SANDBOX)
18
- transaction = client.transactions.create_transaction({...})
16
+ # Sync client (context manager)
17
+ with BMLConnect('your-api-key', 'your-app-id', Environment.SANDBOX) as client:
18
+ transaction = client.transactions.create_transaction({...})
19
19
 
20
- # Async client
21
- async_client = BMLConnect('your-api-key', 'your-app-id', Environment.SANDBOX, async_mode=True)
22
- transaction = await async_client.transactions.create_transaction({...})
20
+ # Async client (context manager)
21
+ async with BMLConnect(
22
+ 'your-api-key', 'your-app-id', Environment.SANDBOX, async_mode=True
23
+ ) as client:
24
+ transaction = await client.transactions.create_transaction({...})
23
25
 
24
26
  For detailed documentation and examples, visit:
25
27
  https://github.com/quillfires/bml-connect-python
26
28
  """
27
29
 
28
- __version__ = "1.1.0"
30
+ __version__ = "1.2.1"
29
31
  __author__ = "Ali Fayaz"
30
32
  __email__ = "fayaz.quill@gmail.com"
31
33
 
@@ -208,7 +208,9 @@ class SignatureUtils:
208
208
  try:
209
209
  method = SignMethod(method)
210
210
  except ValueError:
211
- logger.warning("Invalid sign method '%s', defaulting to SHA1", original_value)
211
+ logger.warning(
212
+ "Invalid sign method '%s', defaulting to SHA1", original_value
213
+ )
212
214
  method = SignMethod.SHA1
213
215
 
214
216
  amount = data.get("amount")
@@ -558,9 +560,7 @@ class BMLConnect:
558
560
 
559
561
  def __enter__(self) -> "BMLConnect":
560
562
  if isinstance(self.client, AsyncClient):
561
- raise TypeError(
562
- "Use 'async with' for async_mode=True clients"
563
- )
563
+ raise TypeError("Use 'async with' for async_mode=True clients")
564
564
  return self
565
565
 
566
566
  def __exit__(self, exc_type: Any, exc_val: Any, exc_tb: Any) -> None:
@@ -640,4 +640,4 @@ __all__ = [
640
640
  "ServerError",
641
641
  "RateLimitError",
642
642
  "SignatureUtils",
643
- ]
643
+ ]