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.
- {bml_connect_python-1.2.0 → bml_connect_python-1.2.1}/PKG-INFO +1 -1
- {bml_connect_python-1.2.0 → bml_connect_python-1.2.1}/pyproject.toml +1 -1
- {bml_connect_python-1.2.0 → bml_connect_python-1.2.1}/src/bml_connect/__init__.py +11 -9
- {bml_connect_python-1.2.0 → bml_connect_python-1.2.1}/src/bml_connect/client.py +5 -5
- {bml_connect_python-1.2.0 → bml_connect_python-1.2.1}/LICENSE +0 -0
- {bml_connect_python-1.2.0 → bml_connect_python-1.2.1}/README.md +0 -0
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
[tool.poetry]
|
|
2
2
|
name = "bml-connect-python"
|
|
3
|
-
version = "1.2.
|
|
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
|
-
|
|
18
|
-
|
|
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
|
-
|
|
22
|
-
|
|
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
|
|
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(
|
|
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
|
+
]
|
|
File without changes
|
|
File without changes
|