bml-connect-python 2.0.24__tar.gz → 2.1.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: 2.0.24
3
+ Version: 2.1.1
4
4
  Summary: Python SDK for Bank of Maldives Connect API v2 with sync and async support, covering all four payment integration methods
5
5
  Home-page: https://github.com/quillfires/bml-connect-python
6
6
  License: MIT
@@ -27,9 +27,11 @@ Project-URL: Documentation, https://github.com/quillfires/bml-connect-python/wik
27
27
  Project-URL: Repository, https://github.com/quillfires/bml-connect-python
28
28
  Description-Content-Type: text/markdown
29
29
 
30
+ <div align="center">
31
+
30
32
  # BML Connect Python SDK
31
33
 
32
- [![PyPI version](https://badge.fury.io/py/bml-connect-python.svg)](https://badge.fury.io/py/bml-connect-python)
34
+ [![PyPI](https://img.shields.io/pypi/v/bml-connect-python?label=Latest%20release&color=green)](https://pypi.org/project/bml-connect-python/)
33
35
  [![Python Support](https://img.shields.io/pypi/pyversions/bml-connect-python.svg)](https://pypi.org/project/bml-connect-python/)
34
36
  [![License: MIT](https://img.shields.io/badge/License-MIT-yellow.svg)](https://opensource.org/licenses/MIT)
35
37
 
@@ -40,12 +42,18 @@ Compatible with all Python frameworks including Django, Flask, FastAPI, and Sani
40
42
 
41
43
  > **v2.0.0** - full coverage of the BML Connect v2 API across all four integration methods: Redirect, Direct, Card-On-File Tokenization, and PCI Merchant Tokenization.
42
44
 
45
+ </div>
46
+
43
47
  ---
44
48
 
45
49
  ## Table of Contents
46
50
 
47
51
  - [Features](#features)
48
52
  - [Installation](#installation)
53
+ - [Quick Start](#quick-start)
54
+ - [Get your credentials](#get-your-credentials)
55
+ - [Basic setup](#basic-setup)
56
+ - [Use environment variables](#use-environment-variables)
49
57
  - [Integration Methods](#integration-methods)
50
58
  - [Redirect Method](#redirect-method)
51
59
  - [Direct Method](#direct-method)
@@ -91,6 +99,77 @@ pip install bml-connect-python
91
99
 
92
100
  ---
93
101
 
102
+ ## Quick Start
103
+
104
+ ### Get your credentials
105
+
106
+ You need two credentials from the BML merchant portal:
107
+
108
+ - **API key** - private key starting with `sk_`. Sent as the `Authorization` header on every request. Keep this secret.
109
+ - **App ID** - your application identifier.
110
+ - **Public key** - starts with `pk_`. Only needed for PCI card tokenization. Safe to expose to clients.
111
+
112
+ ---
113
+
114
+ ### Basic setup
115
+
116
+ ```python
117
+ from bml_connect import BMLConnect, Environment
118
+
119
+ client = BMLConnect(
120
+ api_key="sk_your_api_key",
121
+ app_id="your_app_id",
122
+ environment=Environment.SANDBOX,
123
+ )
124
+ ```
125
+
126
+ ---
127
+
128
+ ### Use environment variables
129
+
130
+ Never hardcode credentials. Use environment variables:
131
+
132
+ ```python
133
+ import os
134
+ from bml_connect import BMLConnect, Environment
135
+
136
+ client = BMLConnect(
137
+ api_key=os.environ["BML_API_KEY"],
138
+ app_id=os.environ["BML_APP_ID"],
139
+ environment=os.environ.get("BML_ENV", "production"),
140
+ )
141
+ ```
142
+
143
+ `.env` file (local development only, never commit this):
144
+
145
+ ```
146
+ BML_API_KEY=sk_your_api_key
147
+ BML_APP_ID=your_app_id
148
+ BML_ENV=sandbox
149
+ ```
150
+
151
+ Load with `python-dotenv`:
152
+
153
+ ```python
154
+ from dotenv import load_dotenv
155
+ load_dotenv()
156
+ ```
157
+
158
+ ---
159
+
160
+ #### With public key (PCI tokenization)
161
+
162
+ ```python
163
+ client = BMLConnect(
164
+ api_key=os.environ["BML_API_KEY"],
165
+ app_id=os.environ["BML_APP_ID"],
166
+ environment=Environment.PRODUCTION,
167
+ public_key=os.environ["BML_PUBLIC_KEY"],
168
+ )
169
+ ```
170
+
171
+ ---
172
+
94
173
  ## Integration Methods
95
174
 
96
175
  All four methods use the same `POST /public/v2/transactions` endpoint. The payload and the response fields you care about differ by method.
@@ -1,6 +1,8 @@
1
+ <div align="center">
2
+
1
3
  # BML Connect Python SDK
2
4
 
3
- [![PyPI version](https://badge.fury.io/py/bml-connect-python.svg)](https://badge.fury.io/py/bml-connect-python)
5
+ [![PyPI](https://img.shields.io/pypi/v/bml-connect-python?label=Latest%20release&color=green)](https://pypi.org/project/bml-connect-python/)
4
6
  [![Python Support](https://img.shields.io/pypi/pyversions/bml-connect-python.svg)](https://pypi.org/project/bml-connect-python/)
5
7
  [![License: MIT](https://img.shields.io/badge/License-MIT-yellow.svg)](https://opensource.org/licenses/MIT)
6
8
 
@@ -11,12 +13,18 @@ Compatible with all Python frameworks including Django, Flask, FastAPI, and Sani
11
13
 
12
14
  > **v2.0.0** - full coverage of the BML Connect v2 API across all four integration methods: Redirect, Direct, Card-On-File Tokenization, and PCI Merchant Tokenization.
13
15
 
16
+ </div>
17
+
14
18
  ---
15
19
 
16
20
  ## Table of Contents
17
21
 
18
22
  - [Features](#features)
19
23
  - [Installation](#installation)
24
+ - [Quick Start](#quick-start)
25
+ - [Get your credentials](#get-your-credentials)
26
+ - [Basic setup](#basic-setup)
27
+ - [Use environment variables](#use-environment-variables)
20
28
  - [Integration Methods](#integration-methods)
21
29
  - [Redirect Method](#redirect-method)
22
30
  - [Direct Method](#direct-method)
@@ -62,6 +70,77 @@ pip install bml-connect-python
62
70
 
63
71
  ---
64
72
 
73
+ ## Quick Start
74
+
75
+ ### Get your credentials
76
+
77
+ You need two credentials from the BML merchant portal:
78
+
79
+ - **API key** - private key starting with `sk_`. Sent as the `Authorization` header on every request. Keep this secret.
80
+ - **App ID** - your application identifier.
81
+ - **Public key** - starts with `pk_`. Only needed for PCI card tokenization. Safe to expose to clients.
82
+
83
+ ---
84
+
85
+ ### Basic setup
86
+
87
+ ```python
88
+ from bml_connect import BMLConnect, Environment
89
+
90
+ client = BMLConnect(
91
+ api_key="sk_your_api_key",
92
+ app_id="your_app_id",
93
+ environment=Environment.SANDBOX,
94
+ )
95
+ ```
96
+
97
+ ---
98
+
99
+ ### Use environment variables
100
+
101
+ Never hardcode credentials. Use environment variables:
102
+
103
+ ```python
104
+ import os
105
+ from bml_connect import BMLConnect, Environment
106
+
107
+ client = BMLConnect(
108
+ api_key=os.environ["BML_API_KEY"],
109
+ app_id=os.environ["BML_APP_ID"],
110
+ environment=os.environ.get("BML_ENV", "production"),
111
+ )
112
+ ```
113
+
114
+ `.env` file (local development only, never commit this):
115
+
116
+ ```
117
+ BML_API_KEY=sk_your_api_key
118
+ BML_APP_ID=your_app_id
119
+ BML_ENV=sandbox
120
+ ```
121
+
122
+ Load with `python-dotenv`:
123
+
124
+ ```python
125
+ from dotenv import load_dotenv
126
+ load_dotenv()
127
+ ```
128
+
129
+ ---
130
+
131
+ #### With public key (PCI tokenization)
132
+
133
+ ```python
134
+ client = BMLConnect(
135
+ api_key=os.environ["BML_API_KEY"],
136
+ app_id=os.environ["BML_APP_ID"],
137
+ environment=Environment.PRODUCTION,
138
+ public_key=os.environ["BML_PUBLIC_KEY"],
139
+ )
140
+ ```
141
+
142
+ ---
143
+
65
144
  ## Integration Methods
66
145
 
67
146
  All four methods use the same `POST /public/v2/transactions` endpoint. The payload and the response fields you care about differ by method.
@@ -1,6 +1,6 @@
1
1
  [tool.poetry]
2
2
  name = "bml-connect-python"
3
- version = "2.0.24"
3
+ version = "2.1.1"
4
4
  description = "Python SDK for Bank of Maldives Connect API v2 with sync and async support, covering all four payment integration methods"
5
5
  authors = ["Fayaz (Quill) <fayaz.quill@gmail.com>"]
6
6
  maintainers = ["Fayaz (Quill) <fayaz.quill@gmail.com>"]