shwary-python 2.0.3__tar.gz → 2.0.5__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.
- {shwary_python-2.0.3 → shwary_python-2.0.5}/PKG-INFO +11 -13
- {shwary_python-2.0.3 → shwary_python-2.0.5}/README.md +10 -12
- {shwary_python-2.0.3 → shwary_python-2.0.5}/pyproject.toml +1 -1
- shwary_python-2.0.5/src/shwary/__version__.py +1 -0
- shwary_python-2.0.3/src/shwary/__version__.py +0 -1
- {shwary_python-2.0.3 → shwary_python-2.0.5}/.gitignore +0 -0
- {shwary_python-2.0.3 → shwary_python-2.0.5}/LICENSE +0 -0
- {shwary_python-2.0.3 → shwary_python-2.0.5}/src/shwary/__init__.py +0 -0
- {shwary_python-2.0.3 → shwary_python-2.0.5}/src/shwary/clients/__init__.py +0 -0
- {shwary_python-2.0.3 → shwary_python-2.0.5}/src/shwary/clients/async_client.py +0 -0
- {shwary_python-2.0.3 → shwary_python-2.0.5}/src/shwary/clients/base.py +0 -0
- {shwary_python-2.0.3 → shwary_python-2.0.5}/src/shwary/clients/sync.py +0 -0
- {shwary_python-2.0.3 → shwary_python-2.0.5}/src/shwary/core.py +0 -0
- {shwary_python-2.0.3 → shwary_python-2.0.5}/src/shwary/exceptions.py +0 -0
- {shwary_python-2.0.3 → shwary_python-2.0.5}/src/shwary/logging_config.py +0 -0
- {shwary_python-2.0.3 → shwary_python-2.0.5}/src/shwary/py.typed +0 -0
- {shwary_python-2.0.3 → shwary_python-2.0.5}/src/shwary/schemas.py +0 -0
- {shwary_python-2.0.3 → shwary_python-2.0.5}/src/shwary/tests/__init__.py +0 -0
- {shwary_python-2.0.3 → shwary_python-2.0.5}/src/shwary/tests/test_advanced.py +0 -0
- {shwary_python-2.0.3 → shwary_python-2.0.5}/src/shwary/tests/test_client.py +0 -0
- {shwary_python-2.0.3 → shwary_python-2.0.5}/src/shwary/tests/test_client_async.py +0 -0
- {shwary_python-2.0.3 → shwary_python-2.0.5}/src/shwary/tests/test_schemas.py +0 -0
- {shwary_python-2.0.3 → shwary_python-2.0.5}/src/shwary/tests/test_validators.py +0 -0
- {shwary_python-2.0.3 → shwary_python-2.0.5}/src/shwary/validators.py +0 -0
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.4
|
|
2
2
|
Name: shwary-python
|
|
3
|
-
Version: 2.0.
|
|
3
|
+
Version: 2.0.5
|
|
4
4
|
Summary: SDK Python moderne (Async/Sync) pour l'API de paiement Shwary.
|
|
5
5
|
Author-email: Josué Luis Panzu <josuepanzu8@gmail.com>
|
|
6
6
|
License: MIT
|
|
@@ -26,8 +26,6 @@ Description-Content-Type: text/markdown
|
|
|
26
26
|
|
|
27
27
|
**Shwary Python** est une bibliothèque cliente moderne, asynchrone et performante pour l'intégration de l'API [Shwary](https://shwary.com). Elle permet d'initier des paiements Mobile Money en **RDC**, au **Kenya** et en **Ouganda** avec une validation stricte des données avant l'envoi.
|
|
28
28
|
|
|
29
|
-
## Quoi de neuf dans la v2.0.2
|
|
30
|
-
|
|
31
29
|
- **Retry automatique** : Les erreurs réseau transitoires (timeout, connexion) sont automatiquement retentées avec backoff exponentiel
|
|
32
30
|
- **Types stricts** : TypedDict pour les réponses (`PaymentResponse`, `TransactionResponse`, `WebhookPayload`)
|
|
33
31
|
- **Logging structuré** : Les logs s'écrivent dans la racine du projet utilisateur (`logs/shwary.log`) avec rotation automatique
|
|
@@ -256,8 +254,8 @@ async def initiate_payment(phone: str, amount: float, country: str = "DRC"):
|
|
|
256
254
|
|
|
257
255
|
return {
|
|
258
256
|
"success": True,
|
|
259
|
-
"transaction_id": payment
|
|
260
|
-
"status": payment
|
|
257
|
+
"transaction_id": payment.id,
|
|
258
|
+
"status": payment.status
|
|
261
259
|
}
|
|
262
260
|
|
|
263
261
|
except ValidationError as e:
|
|
@@ -303,9 +301,9 @@ async def get_transaction_status(transaction_id: str):
|
|
|
303
301
|
tx = await client.get_transaction(transaction_id)
|
|
304
302
|
|
|
305
303
|
return {
|
|
306
|
-
"id": tx
|
|
307
|
-
"status": tx
|
|
308
|
-
"amount": tx
|
|
304
|
+
"id": tx.id,
|
|
305
|
+
"status": tx.status,
|
|
306
|
+
"amount": tx.amount
|
|
309
307
|
}
|
|
310
308
|
|
|
311
309
|
except ShwaryAPIError as e:
|
|
@@ -362,8 +360,8 @@ def initiate_payment():
|
|
|
362
360
|
|
|
363
361
|
return jsonify({
|
|
364
362
|
"success": True,
|
|
365
|
-
"transaction_id": payment
|
|
366
|
-
"status": payment
|
|
363
|
+
"transaction_id": payment.id,
|
|
364
|
+
"status": payment.status
|
|
367
365
|
}), 200
|
|
368
366
|
|
|
369
367
|
except ValidationError as e:
|
|
@@ -415,9 +413,9 @@ def get_transaction_status(transaction_id):
|
|
|
415
413
|
tx = shwary_client.get_transaction(transaction_id)
|
|
416
414
|
|
|
417
415
|
return jsonify({
|
|
418
|
-
"id": tx
|
|
419
|
-
"status": tx
|
|
420
|
-
"amount": tx
|
|
416
|
+
"id": tx.id,
|
|
417
|
+
"status": tx.status,
|
|
418
|
+
"amount": tx.amount
|
|
421
419
|
}), 200
|
|
422
420
|
|
|
423
421
|
except ShwaryAPIError as e:
|
|
@@ -6,8 +6,6 @@
|
|
|
6
6
|
|
|
7
7
|
**Shwary Python** est une bibliothèque cliente moderne, asynchrone et performante pour l'intégration de l'API [Shwary](https://shwary.com). Elle permet d'initier des paiements Mobile Money en **RDC**, au **Kenya** et en **Ouganda** avec une validation stricte des données avant l'envoi.
|
|
8
8
|
|
|
9
|
-
## Quoi de neuf dans la v2.0.2
|
|
10
|
-
|
|
11
9
|
- **Retry automatique** : Les erreurs réseau transitoires (timeout, connexion) sont automatiquement retentées avec backoff exponentiel
|
|
12
10
|
- **Types stricts** : TypedDict pour les réponses (`PaymentResponse`, `TransactionResponse`, `WebhookPayload`)
|
|
13
11
|
- **Logging structuré** : Les logs s'écrivent dans la racine du projet utilisateur (`logs/shwary.log`) avec rotation automatique
|
|
@@ -236,8 +234,8 @@ async def initiate_payment(phone: str, amount: float, country: str = "DRC"):
|
|
|
236
234
|
|
|
237
235
|
return {
|
|
238
236
|
"success": True,
|
|
239
|
-
"transaction_id": payment
|
|
240
|
-
"status": payment
|
|
237
|
+
"transaction_id": payment.id,
|
|
238
|
+
"status": payment.status
|
|
241
239
|
}
|
|
242
240
|
|
|
243
241
|
except ValidationError as e:
|
|
@@ -283,9 +281,9 @@ async def get_transaction_status(transaction_id: str):
|
|
|
283
281
|
tx = await client.get_transaction(transaction_id)
|
|
284
282
|
|
|
285
283
|
return {
|
|
286
|
-
"id": tx
|
|
287
|
-
"status": tx
|
|
288
|
-
"amount": tx
|
|
284
|
+
"id": tx.id,
|
|
285
|
+
"status": tx.status,
|
|
286
|
+
"amount": tx.amount
|
|
289
287
|
}
|
|
290
288
|
|
|
291
289
|
except ShwaryAPIError as e:
|
|
@@ -342,8 +340,8 @@ def initiate_payment():
|
|
|
342
340
|
|
|
343
341
|
return jsonify({
|
|
344
342
|
"success": True,
|
|
345
|
-
"transaction_id": payment
|
|
346
|
-
"status": payment
|
|
343
|
+
"transaction_id": payment.id,
|
|
344
|
+
"status": payment.status
|
|
347
345
|
}), 200
|
|
348
346
|
|
|
349
347
|
except ValidationError as e:
|
|
@@ -395,9 +393,9 @@ def get_transaction_status(transaction_id):
|
|
|
395
393
|
tx = shwary_client.get_transaction(transaction_id)
|
|
396
394
|
|
|
397
395
|
return jsonify({
|
|
398
|
-
"id": tx
|
|
399
|
-
"status": tx
|
|
400
|
-
"amount": tx
|
|
396
|
+
"id": tx.id,
|
|
397
|
+
"status": tx.status,
|
|
398
|
+
"amount": tx.amount
|
|
401
399
|
}), 200
|
|
402
400
|
|
|
403
401
|
except ShwaryAPIError as e:
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
__version__ = "2.0.5"
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
__version__ = "2.0.0"
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|