mangopay4-python-sdk 4.0.0__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.
@@ -0,0 +1,182 @@
1
+ Metadata-Version: 2.4
2
+ Name: mangopay4-python-sdk
3
+ Version: 4.0.0
4
+ Summary: A client library written in python to work with mangopay v2 api
5
+ License-Expression: MIT
6
+ License-File: LICENSE
7
+ Keywords: mangopay,api,development,emoney,sdk
8
+ Author: Mangopay (www.mangopay.com)
9
+ Author-email: support@mangopay.com
10
+ Requires-Python: >=3.10,<3.15
11
+ Classifier: Intended Audience :: Developers
12
+ Classifier: Topic :: Software Development :: Build Tools
13
+ Classifier: Programming Language :: Python :: 3.10
14
+ Classifier: Programming Language :: Python :: 3.11
15
+ Classifier: Programming Language :: Python :: 3.12
16
+ Classifier: Programming Language :: Python :: 3.13
17
+ Classifier: Programming Language :: Python :: 3.14
18
+ Provides-Extra: dev
19
+ Provides-Extra: test
20
+ Requires-Dist: blinker (>=1.9.0,<2)
21
+ Requires-Dist: coverage (==7.14.0) ; extra == "dev"
22
+ Requires-Dist: coverage (==7.14.0) ; extra == "test"
23
+ Requires-Dist: exam (==0.10.6) ; extra == "dev"
24
+ Requires-Dist: exam (==0.10.6) ; extra == "test"
25
+ Requires-Dist: httplib2 (==0.31.2) ; extra == "dev"
26
+ Requires-Dist: httplib2 (==0.31.2) ; extra == "test"
27
+ Requires-Dist: ndg-httpsclient (==0.5.1) ; extra == "dev"
28
+ Requires-Dist: ndg-httpsclient (==0.5.1) ; extra == "test"
29
+ Requires-Dist: pyasn1 (==0.6.3) ; extra == "dev"
30
+ Requires-Dist: pyasn1 (==0.6.3) ; extra == "test"
31
+ Requires-Dist: pynose (==1.5.5) ; extra == "dev"
32
+ Requires-Dist: pynose (==1.5.5) ; extra == "test"
33
+ Requires-Dist: pyopenssl (==26.1.0) ; extra == "dev"
34
+ Requires-Dist: pyopenssl (==26.1.0) ; extra == "test"
35
+ Requires-Dist: pytz (>=2026.2)
36
+ Requires-Dist: requests (>=2.34.2,<3)
37
+ Requires-Dist: responses (==0.26.0) ; extra == "dev"
38
+ Requires-Dist: responses (==0.26.0) ; extra == "test"
39
+ Requires-Dist: simplejson (>=3.20.2,<4)
40
+ Requires-Dist: six (>=1.17.0,<2)
41
+ Description-Content-Type: text/markdown
42
+
43
+ Mangopay Python SDK
44
+ =================================================
45
+
46
+ MangopaySDK is a Python client library to work with
47
+ [Mangopay REST API](http://docs.mangopay.com/api-references/).
48
+
49
+
50
+ Installation
51
+ ------------
52
+
53
+ mangopaysdk requires Python >=3.10,<3.15 and the following runtime dependencies:
54
+
55
+ * [requests](https://pypi.python.org/pypi/requests)
56
+ * [simplejson](https://pypi.python.org/pypi/simplejson)
57
+ * [blinker](https://pypi.python.org/pypi/blinker)
58
+ * [six](https://pypi.python.org/pypi/six)
59
+ * [pytz](https://pypi.python.org/pypi/pytz)
60
+
61
+ To install the package:
62
+
63
+ ```
64
+ pip install mangopay4-python-sdk
65
+ ```
66
+
67
+ By installing this package with [pip](https://pypi.python.org/pypi/pip), all dependencies will be installed for you.
68
+
69
+ ### Development install
70
+
71
+ The project is managed with [Poetry](https://python-poetry.org/). To set up a local development environment:
72
+
73
+ ```
74
+ poetry install --extras dev
75
+ ```
76
+
77
+ This installs the runtime dependencies as well as the `dev` extras (test runner, coverage, mocking, TLS helpers) defined in `pyproject.toml`. The resolved versions are pinned in `poetry.lock`.
78
+
79
+ To run the test suite (same command used in CI):
80
+
81
+ ```
82
+ poetry run coverage run -m unittest discover
83
+ poetry run coverage xml
84
+ ```
85
+
86
+
87
+ Documentation
88
+ -------------
89
+
90
+ For documentation and examples of usage for the Mangopay API please refer to: [API references](https://docs.mangopay.com/api-references/)
91
+
92
+ See the `docs/` directory to find examples.
93
+
94
+ mTLS certificates
95
+ -----------------
96
+
97
+ ### Set the base URL for mTLS
98
+
99
+ Using mTLS authentication requires your integration to call a base URL with a different hostname from the standard API:
100
+
101
+ * Sandbox: `https://api-mtls.sandbox.mangopay.com`
102
+ * Production: `https://api-mtls.mangopay.com`
103
+
104
+ If using mTLS, your integration should use the `api-mtls` URLs for all API calls, including OAuth token generation.
105
+
106
+ **Caution:** Ensure you set the mTLS base URL, as shown in the configuration examples below. If you don’t, the mTLS certificate will not be transferred to Mangopay. When mTLS is enforced, your integration will result in an error.
107
+
108
+ ### Configure the SDK’s mTLS properties
109
+
110
+ The Python SDK allows you to load the `.pem` and `.key` file paths in the global configuration or in the per-request handler.
111
+
112
+ | Property (global / per-request) | Type | Description |
113
+ | ------------------------------- | ------ | ------------------------------------ |
114
+ | `mtls_cert` / `cert` | string | Path to the certificate `.pem` file. |
115
+ | `mtls_private_key` / `key` | string | Path to the private `.key` file. |
116
+
117
+ **Caution:** The per-request properties `cert` and `key` take precedence if set and the global ones are ignored (`mangopay.mtls_cert` and `mangopay.mtls_private_key`).
118
+
119
+ The certificate files must be accessible at runtime; the SDK does not validate their content at initialization time.
120
+
121
+ When both are provided, the SDK sets `session.cert = (cert, key)` on the underlying `requests.Session`. If a combined certificate is provided (bundling the key), the SDK sets `session.cert = cert`.
122
+
123
+ #### Global configuration
124
+
125
+ The global properties allow you to set the certificate and key before making any API calls. The certificate is used for all requests made through the default handler.
126
+
127
+ ```python theme={null}
128
+ import mangopay
129
+
130
+ mangopay.client_id = 'your-mangopay-client-id'
131
+ mangopay.apikey = 'your-mangopay-api-key'
132
+ mangopay.api_sandbox_url = 'https://api-mtls.sandbox.mangopay.com/v2.01/'
133
+ sandbox = True
134
+ # mangopay.api_url = 'https://api-mtls.mangopay.com/v2.01/'
135
+ mangopay.mtls_cert = '/path/to/certificate.pem'
136
+ mangopay.mtls_private_key = '/path/to/private.key'
137
+ ```
138
+
139
+ #### Per-request handler
140
+
141
+ **Caution:** The per-request values take precedence over the global values.
142
+
143
+ Each `APIRequest` instance maintains its own `requests.Session`, so mTLS certificates are scoped to that instance and do not leak between handlers.
144
+
145
+ ```python theme={null}
146
+ from mangopay.api import APIRequest
147
+
148
+ handler = APIRequest(
149
+ client_id='your-mangopay-client-id',
150
+ apikey='your-mangopay-api-key',
151
+ api_sandbox_url = 'https://api-mtls.sandbox.mangopay.com/v2.01/' # mTlS base URL
152
+ sandbox = True
153
+ # mangopay.api_url = 'https://api-mtls.mangopay.com/v2.01/'
154
+ cert='/path/to/certificate.pem',
155
+ key='/path/to/private.key'
156
+ )
157
+ ```
158
+
159
+ Then pass the handler when making API calls:
160
+
161
+ ```python theme={null}
162
+ from mangopay.resources import NaturalUser, Wallet
163
+
164
+ user = NaturalUser.get(user_id, handler=handler)
165
+ wallet = Wallet.get(wallet_id, handler=handler)
166
+ ```
167
+
168
+ License
169
+ -------------------------------------------------
170
+ MangopaySDK is distributed under MIT license, see LICENSE file.
171
+
172
+
173
+ Inspiration
174
+ -----------
175
+
176
+ The data model of python-mangopay is highly inspired by [peewee](https://github.com/coleifer/peewee).
177
+
178
+ Credits
179
+ -----------
180
+
181
+ The inital basis of this SDK was generously coded and donated by [Ulule](https://www.ulule.com/)
182
+
@@ -0,0 +1,18 @@
1
+ mangopay/__init__.py,sha256=9Zbmsz1nXQaEQU-NNuq8_b86_okgvoJ6GIlGOLJEGks,1016
2
+ mangopay/api.py,sha256=bjVZ64M7CUj88qDyaUYLuk9_OTz9ydeaMGT7m2R8QSQ,14459
3
+ mangopay/auth.py,sha256=YHzA8UUbZZYFc2YlIuj-afV6uBuoSYz2JYlkYxn0q14,3827
4
+ mangopay/base.py,sha256=3gvs9kZda79zYjIMOofk1hnEhXbMAgmrPoa7AMTaIR0,8963
5
+ mangopay/compat.py,sha256=pKFO3MnpDnKI6FA8PpbTa-y7FOUaNNj1usTqTe8mbBg,560
6
+ mangopay/constants.py,sha256=5yuNP48WqQtXOvzSFqvuI7HP6105adIBc17kv_Snt18,23791
7
+ mangopay/exceptions.py,sha256=dSPvbPEUTIqviHPQVFOROMly4VXjXKxaMCTkNUUo7eg,731
8
+ mangopay/fields.py,sha256=WMf_z7-qzYKPFNm1IR_WT3L0MeRHzjt5avvVR0ILPIs,57147
9
+ mangopay/page.py,sha256=aQp2cjAhzf9snPcbrCbSc1-ZseTYVvWimbXoWSQF9eM,452
10
+ mangopay/query.py,sha256=bV_wzWmA2Ds8V0NUodV5Y5nNu2TL28DavsO4YVu-Nek,9963
11
+ mangopay/ratelimit.py,sha256=ovGyjgLZqNL75cnwjOjTV-16kq2oj1DTt4d8q-EIV8g,111
12
+ mangopay/resources.py,sha256=nzb-f11vLiE_oqq2f1pm51sJJ8FNn62rnQ5stpzfss0,172074
13
+ mangopay/signals.py,sha256=U_mE5qtcdLYK7YGX63OWHwmfKHcteOXit4JDNlBqjAU,290
14
+ mangopay/utils.py,sha256=lRT1vJYcE_Lhn49zyWAEsx1TP6tJd-8MTFPVC80DyFE,65634
15
+ mangopay4_python_sdk-4.0.0.dist-info/METADATA,sha256=cY_KhIaFwrR4sYVKBRu24BSzQvfDG8m7jMpXtRsyT1Q,6785
16
+ mangopay4_python_sdk-4.0.0.dist-info/WHEEL,sha256=EGEvSphFYqXKs23-kQBeyNoJP1nrT8ZJKQoi5p5DYL8,88
17
+ mangopay4_python_sdk-4.0.0.dist-info/licenses/LICENSE,sha256=XryWGZ5m5ppTDvRcXjXDJ9kENEJrJDbvR1K36q1GvEk,1076
18
+ mangopay4_python_sdk-4.0.0.dist-info/RECORD,,
@@ -0,0 +1,4 @@
1
+ Wheel-Version: 1.0
2
+ Generator: poetry-core 2.4.0
3
+ Root-Is-Purelib: true
4
+ Tag: py3-none-any
@@ -0,0 +1,22 @@
1
+ The MIT License (MIT)
2
+
3
+ Copyright (c) 2016 MANGOPAY
4
+
5
+ Permission is hereby granted, free of charge, to any person obtaining a copy
6
+ of this software and associated documentation files (the "Software"), to deal
7
+ in the Software without restriction, including without limitation the rights
8
+ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9
+ copies of the Software, and to permit persons to whom the Software is
10
+ furnished to do so, subject to the following conditions:
11
+
12
+ The above copyright notice and this permission notice shall be included in all
13
+ copies or substantial portions of the Software.
14
+
15
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17
+ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18
+ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19
+ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20
+ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21
+ SOFTWARE.
22
+