qbitflow 1.0.0__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.
Files changed (51) hide show
  1. qbitflow-1.0.0/.gitignore +18 -0
  2. qbitflow-1.0.0/CHANGELOG.md +44 -0
  3. qbitflow-1.0.0/COMPLIANCE.md +7 -0
  4. qbitflow-1.0.0/LICENSE +242 -0
  5. qbitflow-1.0.0/MANIFEST.in +16 -0
  6. qbitflow-1.0.0/PKG-INFO +683 -0
  7. qbitflow-1.0.0/README.md +642 -0
  8. qbitflow-1.0.0/SECURITY.md +7 -0
  9. qbitflow-1.0.0/TRADEMARKS.md +46 -0
  10. qbitflow-1.0.0/pyproject.toml +140 -0
  11. qbitflow-1.0.0/qbitflow/__init__.py +37 -0
  12. qbitflow-1.0.0/qbitflow/client.py +118 -0
  13. qbitflow-1.0.0/qbitflow/config.py +55 -0
  14. qbitflow-1.0.0/qbitflow/dto/__init__.py +32 -0
  15. qbitflow-1.0.0/qbitflow/dto/api_key.py +91 -0
  16. qbitflow-1.0.0/qbitflow/dto/base_model.py +44 -0
  17. qbitflow-1.0.0/qbitflow/dto/customer.py +106 -0
  18. qbitflow-1.0.0/qbitflow/dto/product.py +108 -0
  19. qbitflow-1.0.0/qbitflow/dto/transaction/__init__.py +50 -0
  20. qbitflow-1.0.0/qbitflow/dto/transaction/currency.py +44 -0
  21. qbitflow-1.0.0/qbitflow/dto/transaction/payment.py +81 -0
  22. qbitflow-1.0.0/qbitflow/dto/transaction/session.py +240 -0
  23. qbitflow-1.0.0/qbitflow/dto/transaction/status.py +122 -0
  24. qbitflow-1.0.0/qbitflow/dto/transaction/subscription.py +159 -0
  25. qbitflow-1.0.0/qbitflow/dto/user.py +123 -0
  26. qbitflow-1.0.0/qbitflow/exceptions/__init__.py +29 -0
  27. qbitflow-1.0.0/qbitflow/exceptions/exceptions.py +160 -0
  28. qbitflow-1.0.0/qbitflow/py.typed +0 -0
  29. qbitflow-1.0.0/qbitflow/requests/__init__.py +23 -0
  30. qbitflow-1.0.0/qbitflow/requests/api_key.py +49 -0
  31. qbitflow-1.0.0/qbitflow/requests/base_request.py +257 -0
  32. qbitflow-1.0.0/qbitflow/requests/customer.py +199 -0
  33. qbitflow-1.0.0/qbitflow/requests/product.py +63 -0
  34. qbitflow-1.0.0/qbitflow/requests/transaction/__init__.py +19 -0
  35. qbitflow-1.0.0/qbitflow/requests/transaction/payg.py +156 -0
  36. qbitflow-1.0.0/qbitflow/requests/transaction/payment.py +182 -0
  37. qbitflow-1.0.0/qbitflow/requests/transaction/session.py +28 -0
  38. qbitflow-1.0.0/qbitflow/requests/transaction/status.py +41 -0
  39. qbitflow-1.0.0/qbitflow/requests/transaction/subscription.py +133 -0
  40. qbitflow-1.0.0/qbitflow/requests/user.py +56 -0
  41. qbitflow-1.0.0/qbitflow/utils/__init__.py +11 -0
  42. qbitflow-1.0.0/qbitflow/utils/cursor_data.py +93 -0
  43. qbitflow-1.0.0/qbitflow/utils/duration.py +74 -0
  44. qbitflow-1.0.0/qbitflow/utils/helpers.py +137 -0
  45. qbitflow-1.0.0/qbitflow.egg-info/PKG-INFO +683 -0
  46. qbitflow-1.0.0/qbitflow.egg-info/SOURCES.txt +49 -0
  47. qbitflow-1.0.0/qbitflow.egg-info/dependency_links.txt +1 -0
  48. qbitflow-1.0.0/qbitflow.egg-info/requires.txt +16 -0
  49. qbitflow-1.0.0/qbitflow.egg-info/top_level.txt +1 -0
  50. qbitflow-1.0.0/requirements.txt +6 -0
  51. qbitflow-1.0.0/setup.cfg +4 -0
@@ -0,0 +1,18 @@
1
+ .venv
2
+ **/.pytest_cache
3
+ **/__pycache__
4
+ htmlcov/
5
+ .coverage
6
+ SDK_IMPROVEMENTS.*
7
+ .DS_Store
8
+
9
+ PUBLISHING.md
10
+
11
+ # IDE
12
+ .vscode/
13
+ .idea/
14
+ *.swp
15
+ *.swo
16
+
17
+ dist/
18
+ qbitflow.egg-info/
@@ -0,0 +1,44 @@
1
+ # Changelog
2
+
3
+ All notable changes to the QBitFlow Python SDK will be documented in this file.
4
+
5
+ The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),
6
+ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
7
+
8
+ ## [1.0.0] - 2025-10-23
9
+
10
+ ### Added
11
+
12
+ - Initial release of QBitFlow Python SDK
13
+ - One-time cryptocurrency payment processing
14
+ - Recurring subscription management
15
+ - Pay-as-you-go subscription support
16
+ - Customer management (create, read, update, delete)
17
+ - Product management (create, read, update, delete)
18
+ - Transaction status tracking
19
+ - Webhook support for payment notifications
20
+ - Redirect URL handling (success/cancel)
21
+ - Comprehensive error handling with custom exceptions
22
+ - Full type hints for better IDE support
23
+ - Detailed docstrings with examples
24
+ - Input validation throughout
25
+ - Pagination support for list operations
26
+ - Configurable timeout and retry settings
27
+ - Integration tests
28
+ - Complete documentation and examples
29
+
30
+ ### Security
31
+
32
+ - Secure API key-based authentication
33
+ - Input validation to prevent malformed requests
34
+ - HTTPS-only API communication
35
+
36
+ ## [Unreleased]
37
+
38
+ ### Planned
39
+
40
+ - WebSocket support for real-time status updates
41
+ - Bulk operations for customers and products
42
+ - Advanced filtering and search
43
+ - Rate limiting information in responses
44
+ - Additional payment method support
@@ -0,0 +1,7 @@
1
+ # Compliance Posture
2
+
3
+ - **Cryptography**: SDK interfaces exclusively with QBitFlow services for regulated cryptographic operations. No custom crypto primitives are implemented in the SDK.
4
+ - **Regulatory**: Designed to aid compliance with AML/CFT, sanctions screening, and transaction monitoring through server-side services.
5
+ - **Data**: PII handling guidance provided in docs; SDK minimizes on-device sensitive data retention.
6
+ - **Logging**: Configurable privacy-preserving logs; redaction defaults enabled.
7
+ - **Conformance**: A public test suite validates protocol and security requirements to qualify for “Compatible with QBitFlow” status.
qbitflow-1.0.0/LICENSE ADDED
@@ -0,0 +1,242 @@
1
+ # Mozilla Public License Version 2.0
2
+
3
+ ---
4
+
5
+ This License is the Mozilla Public License Version 2.0 (“MPL 2.0”).
6
+ The Covered Software is the QBitFlow SDK(s) as published by QBitFlow, Inc.
7
+
8
+ ## Mozilla Public License Version 2.0
9
+
10
+ ---
11
+
12
+ ### Definitions
13
+
14
+ 1. “Contributor” means each individual or legal entity that creates, contributes to the creation of, or owns Covered Software.
15
+ 2. “Contributor Version” means the combination of the Contributions of others (if any) used by a Contributor and that particular Contributor’s Contribution.
16
+ 3. “Contribution” means Covered Software of a particular Contributor.
17
+ 4. “Covered Software” means Source Code Form to which the initial Contributor has attached the notice in Exhibit A, the Executable Form of such Source Code Form, and Modifications of such Source Code Form, in each case including portions thereof.
18
+ 5. “Incompatible With Secondary Licenses” means
19
+ 1. that the initial Contributor has attached the notice described in
20
+ Exhibit B to the Covered Software; or
21
+ 2. that the Covered Software was made available under the terms of
22
+ version 1.1 or earlier of the License, but not also under the terms of
23
+ a Secondary License.
24
+ 6. “Executable Form” means any form of the work other than Source Code Form.
25
+ 7. “Larger Work” means a work that combines Covered Software with other material, in a separate file or files, that is not Covered Software.
26
+ 8. “License” means this document.
27
+ 9. “Licensable” means having the right to grant, to the maximum extent possible, whether at the time of the initial grant or subsequently, any and all of the rights conveyed by this License.
28
+ 10. “Modifications” means any of the following:
29
+ 1. any file in Source Code Form that results from an addition to, deletion from, or modification of the contents of Covered Software; or
30
+ 2. any new file in Source Code Form that contains any Covered Software.
31
+ 11. “Patent Claims” of a Contributor
32
+ means any patent claim(s), including without limitation, method, process,
33
+ and apparatus claims, in any patent Licensable by such Contributor that
34
+ would be infringed, but for the grant of the License, by the making,
35
+ using, selling, offering for sale, having made, import, or transfer of
36
+ either its Contributions or its Contributor Version.
37
+ 12. “Secondary License”
38
+ means the GNU General Public License, Version 2.0, the GNU Lesser General
39
+ Public License, Version 2.1, the GNU Affero General Public License, Version
40
+ 3.0, or any later versions of those licenses.
41
+
42
+ ---
43
+
44
+ ### License Grants and Conditions
45
+
46
+ 1. Grants
47
+
48
+ Each Contributor hereby grants You a world-wide, royalty-free, non-exclusive license:
49
+ 1. under intellectual property rights (other than patent or trademark)
50
+ Licensable by such Contributor to use, reproduce, make available, modify,
51
+ display, perform, distribute, and otherwise exploit its Contributions, and
52
+ 2. under Patent Claims of such Contributor to make, use, sell, offer for sale,
53
+ have made, import, and otherwise transfer either its Contributions or its
54
+ Contributor Version.
55
+
56
+ 2. Effective Date
57
+
58
+ The licenses granted in Section 2.1 with respect to any Contribution become
59
+ effective for each Contribution on the date the Contributor first distributes
60
+ such Contribution.
61
+
62
+ 3. Limitations on Grant Scope
63
+
64
+ The licenses granted in this Section 2 are the only rights granted under this
65
+ License. No additional rights or licenses will be implied from the distribution
66
+ or licensing of Covered Software under this License. Notwithstanding Section
67
+ 2.1(b) above, no patent license is granted by a Contributor:
68
+ 1. for any code that a Contributor has removed from Covered Software; or
69
+ 2. for infringements caused by: (i) Your and any other third party’s
70
+ modifications of Covered Software, or (ii) the combination of its
71
+ Contributions with other software (except as part of its Contributor
72
+ Version); or
73
+ 3. under Patent Claims infringed by Covered Software in the absence of its
74
+ Contributions.
75
+
76
+ This License does not grant any rights in the trademarks, service marks, or
77
+ logos of any Contributor (except as may be necessary to comply with the notice
78
+ requirements in Section 3.4).
79
+
80
+ 4. Subsequent Licenses
81
+
82
+ No Contributor makes additional grants as a result of Your choice to distribute the Covered Software under a subsequent version of this License (see Section 10.2) or under the terms of a Secondary License (if permitted under the terms of Section 3.3).
83
+
84
+ 5. Representation
85
+
86
+ Each Contributor represents that the Contributor believes its Contributions are its original creation(s) or it has sufficient rights to grant the rights to its Contributions conveyed by this License.
87
+
88
+ 6. Fair Use
89
+
90
+ This License is not intended to limit any rights You have under applicable copyright doctrines of fair use, fair dealing, or other equivalents.
91
+
92
+ 7. Conditions
93
+
94
+ Sections 3.1, 3.2, 3.3, and 3.4 are conditions of the licenses granted in Section 2.1.
95
+
96
+ ---
97
+
98
+ ### Responsibilities
99
+
100
+ 1. Distribution of Source Form
101
+
102
+ All distribution of Covered Software in Source Code Form, including any
103
+ Modifications that You create or to which You contribute, must be under the
104
+ terms of this License. You must inform recipients that the Source Code Form of
105
+ the Covered Software is governed by the terms of this License, and how they can
106
+ obtain a copy of this License. You may not attempt to alter or restrict the
107
+ recipients’ rights in the Source Code Form.
108
+
109
+ 2. Distribution of Executable Form
110
+
111
+ If You distribute Covered Software in Executable Form then:
112
+ 1. such Covered Software must also be made available in Source Code Form, as
113
+ described in Section 3.1, and You must inform recipients of the Executable
114
+ Form how they can obtain a copy of such Source Code Form by reasonable
115
+ means in a timely manner, at a charge no more than the cost of distribution
116
+ to the recipient; and
117
+ 2. You may distribute such Executable Form under the terms of this License, or
118
+ sublicense it under different terms, provided that the license for the
119
+ Executable Form does not attempt to limit or alter the recipients’ rights
120
+ in the Source Code Form under this License.
121
+
122
+ 3. Distribution of a Larger Work
123
+
124
+ You may create and distribute a Larger Work under terms of Your choice,
125
+ provided that You also comply with the requirements of this License for the
126
+ Covered Software. If the Larger Work is a combination of Covered Software with
127
+ a work governed by one or more Secondary Licenses, and the Covered Software is
128
+ not Incompatible With Secondary Licenses, this License permits You to
129
+ additionally distribute such Covered Software under the terms of such Secondary
130
+ License(s), so that the recipient of the Larger Work may, at their option,
131
+ further distribute the Covered Software under the terms of either this License
132
+ or such Secondary License(s).
133
+
134
+ 4. Notices
135
+
136
+ You may not remove or alter the substance of any license notices (including
137
+ copyright, patent, or trademark notices) contained within the Source Code Form
138
+ of the Covered Software, except that You may alter any license notices to the
139
+ extent required to remedy known factual inaccuracies.
140
+
141
+ 5. Application of Additional Terms
142
+
143
+ You may choose to offer, and to charge a fee for, warranty, support, indemnity
144
+ or liability obligations to one or more recipients of Covered Software.
145
+ However, You may do so only on Your own behalf, and not on behalf of any
146
+ Contributor. You must make it absolutely clear that any such warranty,
147
+ support, indemnity, or liability obligation is offered by You alone, and You
148
+ hereby agree to indemnify every Contributor for any liability incurred by such
149
+ Contributor as a result of warranty, support, indemnity or liability terms You
150
+ offer. You may include additional disclaimers of warranty and limitations of
151
+ liability specific to any jurisdiction.
152
+
153
+ ---
154
+
155
+ ### Inability to Comply Due to Statute or Regulation
156
+
157
+ If it is impossible for You to comply with any of the terms of this License with respect to some or all of the Covered Software due to statute, judicial order, or regulation then You must:
158
+
159
+ 1. comply with the terms of this License to the maximum extent possible; and
160
+ 2. describe the limitations and the code they affect. Such description must be placed in a text file included with all distributions of the Covered Software under this License. Except to the extent prohibited by statute or regulation, such description must be sufficiently detailed for a recipient of ordinary skill to be able to understand it.
161
+
162
+ ---
163
+
164
+ ### Termination
165
+
166
+ 1. The rights granted under this License will terminate automatically if You fail to comply with any of its terms. However, if You become compliant, then the rights granted under this License from a particular Contributor are reinstated
167
+ 1. provisionally, unless and until such Contributor explicitly and finally terminates Your grants, and
168
+ 2. on an ongoing basis, if such Contributor fails to notify You of the non-compliance by some reasonable means prior to 60 days after You have come back into compliance. Moreover, Your grants from a particular Contributor are reinstated on an ongoing basis if such Contributor notifies You of the non-compliance by some reasonable means, this is the first time You have received notice of non-compliance with this License from such Contributor, and You become compliant prior to 30 days after Your receipt of the notice.
169
+ 2. If You initiate litigation against any entity by asserting a patent infringement claim (excluding declaratory judgment actions, counter-claims, and cross-claims) alleging that a Contributor Version directly or indirectly infringes any patent, then the rights granted to You by any and all Contributors for the Covered Software under Section 2.1 of this License shall terminate.
170
+
171
+ 3. In the event of termination under Sections 5.1 or 5.2 above, all end user license agreements (excluding distributors and resellers) which have been validly granted by You or Your distributors under this License prior to termination shall survive termination.
172
+
173
+ ---
174
+
175
+ ### Disclaimer of Warranty
176
+
177
+ Covered Software is provided under this License on an “as is” basis, without warranty of any kind, either expressed, implied, or statutory,
178
+ including, without limitation, warranties that the Covered Software is free of defects, merchantable, fit for a particular purpose or
179
+ non-infringing. The entire risk as to the quality and performance of the Covered Software is with You. Should any Covered Software prove
180
+ defective in any respect, You (not any Contributor) assume the cost of any necessary servicing, repair, or correction. This disclaimer of
181
+ warranty constitutes an essential part of this License. No use of any Covered Software is authorized under this License except under this
182
+ disclaimer.
183
+
184
+ ---
185
+
186
+ ### Limitation of Liability
187
+
188
+ Under no circumstances and under no legal theory, whether tort (including negligence), contract, or otherwise, shall any Contributor, or anyone
189
+ who distributes Covered Software as permitted above, be liable to You for any direct, indirect, special, incidental, or consequential damages
190
+ of any character including, without limitation, damages for lost profits, loss of goodwill, work stoppage, computer failure or malfunction, or
191
+ any and all other commercial damages or losses, even if such party shall have been informed of the possibility of such damages. This
192
+ limitation of liability shall not apply to liability for death or personal injury resulting from such party’s negligence to the extent
193
+ applicable law prohibits such limitation. Some jurisdictions do not allow the exclusion or limitation of incidental or consequential damages,
194
+ so this exclusion and limitation may not apply to You.
195
+
196
+ ---
197
+
198
+ ### Litigation
199
+
200
+ Any litigation relating to this License may be brought only in the courts of a jurisdiction where the defendant maintains its principal place of
201
+ business and such litigation shall be governed by laws of that jurisdiction, without reference to its conflict-of-law provisions. Nothing in
202
+ this Section shall prevent a party’s ability to bring cross-claims or counter-claims.
203
+
204
+ ---
205
+
206
+ ### Miscellaneous
207
+
208
+ This License represents the complete agreement concerning the subject matter hereof. If any provision of this License is held to be unenforceable,
209
+ such provision shall be reformed only to the extent necessary to make it enforceable. Any law or regulation which provides that the language
210
+ of a contract shall be construed against the drafter shall not be used to construe this License against a Contributor.
211
+
212
+ ---
213
+
214
+ ### Versions of the License
215
+
216
+ 1. New Versions
217
+
218
+ QBitFlow is the license steward. Except as provided in Section 10.3, no one other than the license steward has the right to modify or publish new versions of this License. Each version will be given a distinguishing version number.
219
+
220
+ 2. Effect of New Versions
221
+
222
+ You may distribute the Covered Software under the terms of the version of the License under which You originally received the Covered Software, or under the terms of any subsequent version published by the license steward.
223
+
224
+ 3. Modified Versions
225
+
226
+ If you create software not governed by this License, and you want to create a new license for such software, you may create and use a modified version of this License if you rename the license and remove any references to the name of the license steward (except to note that such modified license differs from this License).
227
+
228
+ 4. Distributing Source Code Form that is Incompatible With Secondary Licenses
229
+
230
+ If You choose to distribute Source Code Form that is Incompatible With Secondary Licenses under the terms of this version of the License, the notice described in Exhibit B of this License must be attached.
231
+
232
+ ---
233
+
234
+ ### Exhibit A - Source Code Form License Notice
235
+
236
+ This Source Code Form is subject to the terms of the Mozilla Public License, v. 2.0. If a copy of the MPL was not distributed with this file, You can obtain one at https://mozilla.org/MPL/2.0/.
237
+
238
+ ### Exhibit B - Notice of Incompatibility with Secondary Licenses
239
+
240
+ This Source Code Form is Incompatible With Secondary Licenses, as defined by the Mozilla Public License, v. 2.0.
241
+
242
+ © QBitFlow, Inc. and contributors, 20XX–present.
@@ -0,0 +1,16 @@
1
+ include README.md
2
+ include LICENSE
3
+ include CHANGELOG.md
4
+ include COMPLIANCE.md
5
+ include SECURITY.md
6
+ include TRADEMARKS.md
7
+
8
+ include pyproject.toml
9
+
10
+ recursive-include qbitflow *.py
11
+ recursive-include qbitflow py.typed
12
+
13
+ recursive-exclude tests *
14
+ recursive-exclude examples *
15
+ recursive-exclude * __pycache__
16
+ recursive-exclude * *.py[co]