BasisTheoryClient 0.0.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.
Files changed (283) hide show
  1. basistheoryclient-0.0.1/LICENSE +201 -0
  2. basistheoryclient-0.0.1/PKG-INFO +213 -0
  3. basistheoryclient-0.0.1/README.md +184 -0
  4. basistheoryclient-0.0.1/pyproject.toml +85 -0
  5. basistheoryclient-0.0.1/src/basis_theory/__init__.py +350 -0
  6. basistheoryclient-0.0.1/src/basis_theory/account_updater/__init__.py +7 -0
  7. basistheoryclient-0.0.1/src/basis_theory/account_updater/client.py +44 -0
  8. basistheoryclient-0.0.1/src/basis_theory/account_updater/jobs/__init__.py +4 -0
  9. basistheoryclient-0.0.1/src/basis_theory/account_updater/jobs/client.py +259 -0
  10. basistheoryclient-0.0.1/src/basis_theory/account_updater/jobs/raw_client.py +450 -0
  11. basistheoryclient-0.0.1/src/basis_theory/account_updater/raw_client.py +13 -0
  12. basistheoryclient-0.0.1/src/basis_theory/account_updater/real_time/__init__.py +4 -0
  13. basistheoryclient-0.0.1/src/basis_theory/account_updater/real_time/client.py +161 -0
  14. basistheoryclient-0.0.1/src/basis_theory/account_updater/real_time/raw_client.py +246 -0
  15. basistheoryclient-0.0.1/src/basis_theory/apple_pay/__init__.py +7 -0
  16. basistheoryclient-0.0.1/src/basis_theory/apple_pay/client.py +267 -0
  17. basistheoryclient-0.0.1/src/basis_theory/apple_pay/domain/__init__.py +4 -0
  18. basistheoryclient-0.0.1/src/basis_theory/apple_pay/domain/client.py +309 -0
  19. basistheoryclient-0.0.1/src/basis_theory/apple_pay/domain/raw_client.py +631 -0
  20. basistheoryclient-0.0.1/src/basis_theory/apple_pay/raw_client.py +499 -0
  21. basistheoryclient-0.0.1/src/basis_theory/apple_pay/session/__init__.py +4 -0
  22. basistheoryclient-0.0.1/src/basis_theory/apple_pay/session/client.py +130 -0
  23. basistheoryclient-0.0.1/src/basis_theory/apple_pay/session/raw_client.py +225 -0
  24. basistheoryclient-0.0.1/src/basis_theory/application_keys/__init__.py +4 -0
  25. basistheoryclient-0.0.1/src/basis_theory/application_keys/client.py +354 -0
  26. basistheoryclient-0.0.1/src/basis_theory/application_keys/raw_client.py +615 -0
  27. basistheoryclient-0.0.1/src/basis_theory/application_templates/__init__.py +4 -0
  28. basistheoryclient-0.0.1/src/basis_theory/application_templates/client.py +166 -0
  29. basistheoryclient-0.0.1/src/basis_theory/application_templates/raw_client.py +253 -0
  30. basistheoryclient-0.0.1/src/basis_theory/applications/__init__.py +4 -0
  31. basistheoryclient-0.0.1/src/basis_theory/applications/client.py +582 -0
  32. basistheoryclient-0.0.1/src/basis_theory/applications/raw_client.py +1030 -0
  33. basistheoryclient-0.0.1/src/basis_theory/client.py +230 -0
  34. basistheoryclient-0.0.1/src/basis_theory/connection/__init__.py +7 -0
  35. basistheoryclient-0.0.1/src/basis_theory/connection/apple_pay/__init__.py +7 -0
  36. basistheoryclient-0.0.1/src/basis_theory/connection/apple_pay/client.py +128 -0
  37. basistheoryclient-0.0.1/src/basis_theory/connection/apple_pay/domain/__init__.py +4 -0
  38. basistheoryclient-0.0.1/src/basis_theory/connection/apple_pay/domain/client.py +309 -0
  39. basistheoryclient-0.0.1/src/basis_theory/connection/apple_pay/domain/raw_client.py +631 -0
  40. basistheoryclient-0.0.1/src/basis_theory/connection/apple_pay/raw_client.py +216 -0
  41. basistheoryclient-0.0.1/src/basis_theory/connection/apple_pay/session/__init__.py +4 -0
  42. basistheoryclient-0.0.1/src/basis_theory/connection/apple_pay/session/client.py +130 -0
  43. basistheoryclient-0.0.1/src/basis_theory/connection/apple_pay/session/raw_client.py +225 -0
  44. basistheoryclient-0.0.1/src/basis_theory/connection/client.py +39 -0
  45. basistheoryclient-0.0.1/src/basis_theory/connection/raw_client.py +13 -0
  46. basistheoryclient-0.0.1/src/basis_theory/core/__init__.py +55 -0
  47. basistheoryclient-0.0.1/src/basis_theory/core/api_error.py +23 -0
  48. basistheoryclient-0.0.1/src/basis_theory/core/client_wrapper.py +89 -0
  49. basistheoryclient-0.0.1/src/basis_theory/core/datetime_utils.py +28 -0
  50. basistheoryclient-0.0.1/src/basis_theory/core/file.py +67 -0
  51. basistheoryclient-0.0.1/src/basis_theory/core/force_multipart.py +16 -0
  52. basistheoryclient-0.0.1/src/basis_theory/core/http_client.py +543 -0
  53. basistheoryclient-0.0.1/src/basis_theory/core/http_response.py +55 -0
  54. basistheoryclient-0.0.1/src/basis_theory/core/jsonable_encoder.py +100 -0
  55. basistheoryclient-0.0.1/src/basis_theory/core/pagination.py +82 -0
  56. basistheoryclient-0.0.1/src/basis_theory/core/pydantic_utilities.py +255 -0
  57. basistheoryclient-0.0.1/src/basis_theory/core/query_encoder.py +58 -0
  58. basistheoryclient-0.0.1/src/basis_theory/core/remove_none_from_dict.py +11 -0
  59. basistheoryclient-0.0.1/src/basis_theory/core/request_options.py +35 -0
  60. basistheoryclient-0.0.1/src/basis_theory/core/serialization.py +276 -0
  61. basistheoryclient-0.0.1/src/basis_theory/documents/__init__.py +7 -0
  62. basistheoryclient-0.0.1/src/basis_theory/documents/client.py +258 -0
  63. basistheoryclient-0.0.1/src/basis_theory/documents/data/__init__.py +4 -0
  64. basistheoryclient-0.0.1/src/basis_theory/documents/data/client.py +78 -0
  65. basistheoryclient-0.0.1/src/basis_theory/documents/data/raw_client.py +173 -0
  66. basistheoryclient-0.0.1/src/basis_theory/documents/raw_client.py +442 -0
  67. basistheoryclient-0.0.1/src/basis_theory/enrichments/__init__.py +4 -0
  68. basistheoryclient-0.0.1/src/basis_theory/enrichments/client.py +135 -0
  69. basistheoryclient-0.0.1/src/basis_theory/enrichments/raw_client.py +203 -0
  70. basistheoryclient-0.0.1/src/basis_theory/environment.py +7 -0
  71. basistheoryclient-0.0.1/src/basis_theory/errors/__init__.py +23 -0
  72. basistheoryclient-0.0.1/src/basis_theory/errors/bad_request_error.py +11 -0
  73. basistheoryclient-0.0.1/src/basis_theory/errors/conflict_error.py +11 -0
  74. basistheoryclient-0.0.1/src/basis_theory/errors/forbidden_error.py +11 -0
  75. basistheoryclient-0.0.1/src/basis_theory/errors/internal_server_error.py +11 -0
  76. basistheoryclient-0.0.1/src/basis_theory/errors/not_found_error.py +10 -0
  77. basistheoryclient-0.0.1/src/basis_theory/errors/service_unavailable_error.py +11 -0
  78. basistheoryclient-0.0.1/src/basis_theory/errors/unauthorized_error.py +11 -0
  79. basistheoryclient-0.0.1/src/basis_theory/errors/unprocessable_entity_error.py +11 -0
  80. basistheoryclient-0.0.1/src/basis_theory/googlepay/__init__.py +4 -0
  81. basistheoryclient-0.0.1/src/basis_theory/googlepay/client.py +120 -0
  82. basistheoryclient-0.0.1/src/basis_theory/googlepay/raw_client.py +239 -0
  83. basistheoryclient-0.0.1/src/basis_theory/keys/__init__.py +4 -0
  84. basistheoryclient-0.0.1/src/basis_theory/keys/client.py +313 -0
  85. basistheoryclient-0.0.1/src/basis_theory/keys/raw_client.py +673 -0
  86. basistheoryclient-0.0.1/src/basis_theory/logs/__init__.py +4 -0
  87. basistheoryclient-0.0.1/src/basis_theory/logs/client.py +240 -0
  88. basistheoryclient-0.0.1/src/basis_theory/logs/raw_client.py +376 -0
  89. basistheoryclient-0.0.1/src/basis_theory/network_tokens/__init__.py +4 -0
  90. basistheoryclient-0.0.1/src/basis_theory/network_tokens/client.py +478 -0
  91. basistheoryclient-0.0.1/src/basis_theory/network_tokens/raw_client.py +1113 -0
  92. basistheoryclient-0.0.1/src/basis_theory/permissions/__init__.py +4 -0
  93. basistheoryclient-0.0.1/src/basis_theory/permissions/client.py +106 -0
  94. basistheoryclient-0.0.1/src/basis_theory/permissions/raw_client.py +170 -0
  95. basistheoryclient-0.0.1/src/basis_theory/proxies/__init__.py +4 -0
  96. basistheoryclient-0.0.1/src/basis_theory/proxies/client.py +751 -0
  97. basistheoryclient-0.0.1/src/basis_theory/proxies/raw_client.py +1255 -0
  98. basistheoryclient-0.0.1/src/basis_theory/py.typed +0 -0
  99. basistheoryclient-0.0.1/src/basis_theory/reactors/__init__.py +7 -0
  100. basistheoryclient-0.0.1/src/basis_theory/reactors/client.py +823 -0
  101. basistheoryclient-0.0.1/src/basis_theory/reactors/raw_client.py +1553 -0
  102. basistheoryclient-0.0.1/src/basis_theory/reactors/results/__init__.py +4 -0
  103. basistheoryclient-0.0.1/src/basis_theory/reactors/results/client.py +115 -0
  104. basistheoryclient-0.0.1/src/basis_theory/reactors/results/raw_client.py +194 -0
  105. basistheoryclient-0.0.1/src/basis_theory/roles/__init__.py +4 -0
  106. basistheoryclient-0.0.1/src/basis_theory/roles/client.py +98 -0
  107. basistheoryclient-0.0.1/src/basis_theory/roles/raw_client.py +134 -0
  108. basistheoryclient-0.0.1/src/basis_theory/sessions/__init__.py +4 -0
  109. basistheoryclient-0.0.1/src/basis_theory/sessions/client.py +222 -0
  110. basistheoryclient-0.0.1/src/basis_theory/sessions/raw_client.py +399 -0
  111. basistheoryclient-0.0.1/src/basis_theory/tenants/__init__.py +7 -0
  112. basistheoryclient-0.0.1/src/basis_theory/tenants/client.py +59 -0
  113. basistheoryclient-0.0.1/src/basis_theory/tenants/connections/__init__.py +4 -0
  114. basistheoryclient-0.0.1/src/basis_theory/tenants/connections/client.py +198 -0
  115. basistheoryclient-0.0.1/src/basis_theory/tenants/connections/raw_client.py +344 -0
  116. basistheoryclient-0.0.1/src/basis_theory/tenants/invitations/__init__.py +4 -0
  117. basistheoryclient-0.0.1/src/basis_theory/tenants/invitations/client.py +458 -0
  118. basistheoryclient-0.0.1/src/basis_theory/tenants/invitations/raw_client.py +805 -0
  119. basistheoryclient-0.0.1/src/basis_theory/tenants/members/__init__.py +4 -0
  120. basistheoryclient-0.0.1/src/basis_theory/tenants/members/client.py +296 -0
  121. basistheoryclient-0.0.1/src/basis_theory/tenants/members/raw_client.py +497 -0
  122. basistheoryclient-0.0.1/src/basis_theory/tenants/owner/__init__.py +4 -0
  123. basistheoryclient-0.0.1/src/basis_theory/tenants/owner/client.py +98 -0
  124. basistheoryclient-0.0.1/src/basis_theory/tenants/owner/raw_client.py +157 -0
  125. basistheoryclient-0.0.1/src/basis_theory/tenants/raw_client.py +13 -0
  126. basistheoryclient-0.0.1/src/basis_theory/tenants/self_/__init__.py +4 -0
  127. basistheoryclient-0.0.1/src/basis_theory/tenants/self_/client.py +308 -0
  128. basistheoryclient-0.0.1/src/basis_theory/tenants/self_/raw_client.py +605 -0
  129. basistheoryclient-0.0.1/src/basis_theory/threeds/__init__.py +7 -0
  130. basistheoryclient-0.0.1/src/basis_theory/threeds/client.py +39 -0
  131. basistheoryclient-0.0.1/src/basis_theory/threeds/raw_client.py +13 -0
  132. basistheoryclient-0.0.1/src/basis_theory/threeds/sessions/__init__.py +4 -0
  133. basistheoryclient-0.0.1/src/basis_theory/threeds/sessions/client.py +521 -0
  134. basistheoryclient-0.0.1/src/basis_theory/threeds/sessions/raw_client.py +808 -0
  135. basistheoryclient-0.0.1/src/basis_theory/token_intents/__init__.py +4 -0
  136. basistheoryclient-0.0.1/src/basis_theory/token_intents/client.py +258 -0
  137. basistheoryclient-0.0.1/src/basis_theory/token_intents/raw_client.py +454 -0
  138. basistheoryclient-0.0.1/src/basis_theory/tokens/__init__.py +4 -0
  139. basistheoryclient-0.0.1/src/basis_theory/tokens/client.py +1015 -0
  140. basistheoryclient-0.0.1/src/basis_theory/tokens/raw_client.py +1861 -0
  141. basistheoryclient-0.0.1/src/basis_theory/types/__init__.py +277 -0
  142. basistheoryclient-0.0.1/src/basis_theory/types/access_rule.py +25 -0
  143. basistheoryclient-0.0.1/src/basis_theory/types/account_updater_job.py +55 -0
  144. basistheoryclient-0.0.1/src/basis_theory/types/account_updater_job_list.py +22 -0
  145. basistheoryclient-0.0.1/src/basis_theory/types/account_updater_job_list_pagination.py +20 -0
  146. basistheoryclient-0.0.1/src/basis_theory/types/account_updater_job_status.py +5 -0
  147. basistheoryclient-0.0.1/src/basis_theory/types/account_updater_real_time_response.py +24 -0
  148. basistheoryclient-0.0.1/src/basis_theory/types/additional_card_details.py +23 -0
  149. basistheoryclient-0.0.1/src/basis_theory/types/address.py +25 -0
  150. basistheoryclient-0.0.1/src/basis_theory/types/apple_pay_create_response.py +20 -0
  151. basistheoryclient-0.0.1/src/basis_theory/types/apple_pay_create_token_response.py +28 -0
  152. basistheoryclient-0.0.1/src/basis_theory/types/apple_pay_domain_deregistration_request.py +19 -0
  153. basistheoryclient-0.0.1/src/basis_theory/types/apple_pay_domain_registration_list_request.py +19 -0
  154. basistheoryclient-0.0.1/src/basis_theory/types/apple_pay_domain_registration_request.py +19 -0
  155. basistheoryclient-0.0.1/src/basis_theory/types/apple_pay_domain_registration_response.py +20 -0
  156. basistheoryclient-0.0.1/src/basis_theory/types/apple_pay_method_token.py +25 -0
  157. basistheoryclient-0.0.1/src/basis_theory/types/apple_pay_session_request.py +21 -0
  158. basistheoryclient-0.0.1/src/basis_theory/types/apple_pay_token.py +33 -0
  159. basistheoryclient-0.0.1/src/basis_theory/types/apple_pay_tokenize_response.py +20 -0
  160. basistheoryclient-0.0.1/src/basis_theory/types/application.py +33 -0
  161. basistheoryclient-0.0.1/src/basis_theory/types/application_key.py +24 -0
  162. basistheoryclient-0.0.1/src/basis_theory/types/application_paginated_list.py +22 -0
  163. basistheoryclient-0.0.1/src/basis_theory/types/application_template.py +27 -0
  164. basistheoryclient-0.0.1/src/basis_theory/types/assurance_details.py +20 -0
  165. basistheoryclient-0.0.1/src/basis_theory/types/async_react_response.py +23 -0
  166. basistheoryclient-0.0.1/src/basis_theory/types/authenticate_three_ds_session_request.py +35 -0
  167. basistheoryclient-0.0.1/src/basis_theory/types/authentication.py +22 -0
  168. basistheoryclient-0.0.1/src/basis_theory/types/authentication_response.py +21 -0
  169. basistheoryclient-0.0.1/src/basis_theory/types/bank_details.py +20 -0
  170. basistheoryclient-0.0.1/src/basis_theory/types/bank_verification_response.py +19 -0
  171. basistheoryclient-0.0.1/src/basis_theory/types/bin_details.py +41 -0
  172. basistheoryclient-0.0.1/src/basis_theory/types/bin_details_bank.py +22 -0
  173. basistheoryclient-0.0.1/src/basis_theory/types/bin_details_country.py +21 -0
  174. basistheoryclient-0.0.1/src/basis_theory/types/bin_details_product.py +20 -0
  175. basistheoryclient-0.0.1/src/basis_theory/types/card.py +22 -0
  176. basistheoryclient-0.0.1/src/basis_theory/types/card_details.py +32 -0
  177. basistheoryclient-0.0.1/src/basis_theory/types/card_issuer.py +20 -0
  178. basistheoryclient-0.0.1/src/basis_theory/types/card_issuer_country.py +21 -0
  179. basistheoryclient-0.0.1/src/basis_theory/types/cardholder_info.py +21 -0
  180. basistheoryclient-0.0.1/src/basis_theory/types/client_encryption_key_metadata_response.py +23 -0
  181. basistheoryclient-0.0.1/src/basis_theory/types/client_encryption_key_response.py +24 -0
  182. basistheoryclient-0.0.1/src/basis_theory/types/condition.py +21 -0
  183. basistheoryclient-0.0.1/src/basis_theory/types/create_account_updater_job_request.py +22 -0
  184. basistheoryclient-0.0.1/src/basis_theory/types/create_document_request.py +19 -0
  185. basistheoryclient-0.0.1/src/basis_theory/types/create_reactor_formula_request.py +28 -0
  186. basistheoryclient-0.0.1/src/basis_theory/types/create_session_response.py +22 -0
  187. basistheoryclient-0.0.1/src/basis_theory/types/create_tenant_connection_response.py +19 -0
  188. basistheoryclient-0.0.1/src/basis_theory/types/create_three_ds_session_response.py +29 -0
  189. basistheoryclient-0.0.1/src/basis_theory/types/create_token_intent_response.py +36 -0
  190. basistheoryclient-0.0.1/src/basis_theory/types/cursor_pagination.py +20 -0
  191. basistheoryclient-0.0.1/src/basis_theory/types/document.py +25 -0
  192. basistheoryclient-0.0.1/src/basis_theory/types/domain_registration_response.py +20 -0
  193. basistheoryclient-0.0.1/src/basis_theory/types/event_types.py +5 -0
  194. basistheoryclient-0.0.1/src/basis_theory/types/get_applications.py +23 -0
  195. basistheoryclient-0.0.1/src/basis_theory/types/get_logs.py +26 -0
  196. basistheoryclient-0.0.1/src/basis_theory/types/get_permissions.py +19 -0
  197. basistheoryclient-0.0.1/src/basis_theory/types/get_proxies.py +23 -0
  198. basistheoryclient-0.0.1/src/basis_theory/types/get_reactor_formulas.py +22 -0
  199. basistheoryclient-0.0.1/src/basis_theory/types/get_reactors.py +23 -0
  200. basistheoryclient-0.0.1/src/basis_theory/types/get_tenant_invitations.py +23 -0
  201. basistheoryclient-0.0.1/src/basis_theory/types/get_tenant_members.py +22 -0
  202. basistheoryclient-0.0.1/src/basis_theory/types/get_tokens.py +23 -0
  203. basistheoryclient-0.0.1/src/basis_theory/types/get_tokens_v2.py +24 -0
  204. basistheoryclient-0.0.1/src/basis_theory/types/google_pay_tokenize_response.py +20 -0
  205. basistheoryclient-0.0.1/src/basis_theory/types/google_payment_method_token.py +27 -0
  206. basistheoryclient-0.0.1/src/basis_theory/types/header.py +26 -0
  207. basistheoryclient-0.0.1/src/basis_theory/types/intermediate_signing_key.py +22 -0
  208. basistheoryclient-0.0.1/src/basis_theory/types/log.py +28 -0
  209. basistheoryclient-0.0.1/src/basis_theory/types/log_entity_type.py +20 -0
  210. basistheoryclient-0.0.1/src/basis_theory/types/log_paginated_list.py +22 -0
  211. basistheoryclient-0.0.1/src/basis_theory/types/network_token.py +38 -0
  212. basistheoryclient-0.0.1/src/basis_theory/types/network_token_cryptogram.py +20 -0
  213. basistheoryclient-0.0.1/src/basis_theory/types/network_token_extras.py +19 -0
  214. basistheoryclient-0.0.1/src/basis_theory/types/pagination.py +24 -0
  215. basistheoryclient-0.0.1/src/basis_theory/types/payment_data.py +23 -0
  216. basistheoryclient-0.0.1/src/basis_theory/types/permission.py +21 -0
  217. basistheoryclient-0.0.1/src/basis_theory/types/privacy.py +21 -0
  218. basistheoryclient-0.0.1/src/basis_theory/types/problem_details.py +23 -0
  219. basistheoryclient-0.0.1/src/basis_theory/types/proxy.py +39 -0
  220. basistheoryclient-0.0.1/src/basis_theory/types/proxy_paginated_list.py +22 -0
  221. basistheoryclient-0.0.1/src/basis_theory/types/proxy_transform.py +23 -0
  222. basistheoryclient-0.0.1/src/basis_theory/types/public_key.py +3 -0
  223. basistheoryclient-0.0.1/src/basis_theory/types/react_response.py +22 -0
  224. basistheoryclient-0.0.1/src/basis_theory/types/reactor.py +32 -0
  225. basistheoryclient-0.0.1/src/basis_theory/types/reactor_formula.py +34 -0
  226. basistheoryclient-0.0.1/src/basis_theory/types/reactor_formula_configuration.py +21 -0
  227. basistheoryclient-0.0.1/src/basis_theory/types/reactor_formula_paginated_list.py +22 -0
  228. basistheoryclient-0.0.1/src/basis_theory/types/reactor_formula_request_parameter.py +22 -0
  229. basistheoryclient-0.0.1/src/basis_theory/types/reactor_paginated_list.py +22 -0
  230. basistheoryclient-0.0.1/src/basis_theory/types/role.py +19 -0
  231. basistheoryclient-0.0.1/src/basis_theory/types/string_string_key_value_pair.py +20 -0
  232. basistheoryclient-0.0.1/src/basis_theory/types/submerchant_authentication_response.py +21 -0
  233. basistheoryclient-0.0.1/src/basis_theory/types/tenant.py +28 -0
  234. basistheoryclient-0.0.1/src/basis_theory/types/tenant_connection_options.py +19 -0
  235. basistheoryclient-0.0.1/src/basis_theory/types/tenant_invitation_response.py +30 -0
  236. basistheoryclient-0.0.1/src/basis_theory/types/tenant_invitation_response_paginated_list.py +22 -0
  237. basistheoryclient-0.0.1/src/basis_theory/types/tenant_invitation_status.py +5 -0
  238. basistheoryclient-0.0.1/src/basis_theory/types/tenant_member_response.py +28 -0
  239. basistheoryclient-0.0.1/src/basis_theory/types/tenant_member_response_paginated_list.py +22 -0
  240. basistheoryclient-0.0.1/src/basis_theory/types/tenant_usage_report.py +19 -0
  241. basistheoryclient-0.0.1/src/basis_theory/types/three_ds_acs_rendering_type.py +22 -0
  242. basistheoryclient-0.0.1/src/basis_theory/types/three_ds_address.py +25 -0
  243. basistheoryclient-0.0.1/src/basis_theory/types/three_ds_authentication.py +53 -0
  244. basistheoryclient-0.0.1/src/basis_theory/types/three_ds_callback_urls.py +20 -0
  245. basistheoryclient-0.0.1/src/basis_theory/types/three_ds_cardholder_account_info.py +33 -0
  246. basistheoryclient-0.0.1/src/basis_theory/types/three_ds_cardholder_authentication_info.py +21 -0
  247. basistheoryclient-0.0.1/src/basis_theory/types/three_ds_cardholder_info.py +36 -0
  248. basistheoryclient-0.0.1/src/basis_theory/types/three_ds_cardholder_phone_number.py +20 -0
  249. basistheoryclient-0.0.1/src/basis_theory/types/three_ds_device_info.py +36 -0
  250. basistheoryclient-0.0.1/src/basis_theory/types/three_ds_merchant_info.py +26 -0
  251. basistheoryclient-0.0.1/src/basis_theory/types/three_ds_merchant_risk_info.py +27 -0
  252. basistheoryclient-0.0.1/src/basis_theory/types/three_ds_message_extension.py +22 -0
  253. basistheoryclient-0.0.1/src/basis_theory/types/three_ds_method.py +20 -0
  254. basistheoryclient-0.0.1/src/basis_theory/types/three_ds_mobile_sdk_render_options.py +20 -0
  255. basistheoryclient-0.0.1/src/basis_theory/types/three_ds_prior_authentication_info.py +22 -0
  256. basistheoryclient-0.0.1/src/basis_theory/types/three_ds_purchase_info.py +26 -0
  257. basistheoryclient-0.0.1/src/basis_theory/types/three_ds_requestor_info.py +25 -0
  258. basistheoryclient-0.0.1/src/basis_theory/types/three_ds_session.py +42 -0
  259. basistheoryclient-0.0.1/src/basis_theory/types/three_ds_version.py +25 -0
  260. basistheoryclient-0.0.1/src/basis_theory/types/token.py +49 -0
  261. basistheoryclient-0.0.1/src/basis_theory/types/token_cursor_paginated_list.py +22 -0
  262. basistheoryclient-0.0.1/src/basis_theory/types/token_enrichments.py +22 -0
  263. basistheoryclient-0.0.1/src/basis_theory/types/token_enrichments_card_details.py +20 -0
  264. basistheoryclient-0.0.1/src/basis_theory/types/token_extras.py +24 -0
  265. basistheoryclient-0.0.1/src/basis_theory/types/token_intent.py +36 -0
  266. basistheoryclient-0.0.1/src/basis_theory/types/token_intent_extras.py +21 -0
  267. basistheoryclient-0.0.1/src/basis_theory/types/token_paginated_list.py +22 -0
  268. basistheoryclient-0.0.1/src/basis_theory/types/token_service_provider_details.py +34 -0
  269. basistheoryclient-0.0.1/src/basis_theory/types/update_privacy.py +20 -0
  270. basistheoryclient-0.0.1/src/basis_theory/types/update_reactor_formula_request.py +27 -0
  271. basistheoryclient-0.0.1/src/basis_theory/types/user.py +25 -0
  272. basistheoryclient-0.0.1/src/basis_theory/types/validation_problem_details.py +24 -0
  273. basistheoryclient-0.0.1/src/basis_theory/types/webhook.py +35 -0
  274. basistheoryclient-0.0.1/src/basis_theory/types/webhook_list.py +22 -0
  275. basistheoryclient-0.0.1/src/basis_theory/types/webhook_list_pagination.py +20 -0
  276. basistheoryclient-0.0.1/src/basis_theory/types/webhook_status.py +5 -0
  277. basistheoryclient-0.0.1/src/basis_theory/version.py +3 -0
  278. basistheoryclient-0.0.1/src/basis_theory/webhooks/__init__.py +7 -0
  279. basistheoryclient-0.0.1/src/basis_theory/webhooks/client.py +543 -0
  280. basistheoryclient-0.0.1/src/basis_theory/webhooks/events/__init__.py +4 -0
  281. basistheoryclient-0.0.1/src/basis_theory/webhooks/events/client.py +102 -0
  282. basistheoryclient-0.0.1/src/basis_theory/webhooks/events/raw_client.py +136 -0
  283. basistheoryclient-0.0.1/src/basis_theory/webhooks/raw_client.py +943 -0
@@ -0,0 +1,201 @@
1
+ Apache License
2
+ Version 2.0, January 2004
3
+ http://www.apache.org/licenses/
4
+
5
+ TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION
6
+
7
+ 1. Definitions.
8
+
9
+ "License" shall mean the terms and conditions for use, reproduction,
10
+ and distribution as defined by Sections 1 through 9 of this document.
11
+
12
+ "Licensor" shall mean the copyright owner or entity authorized by
13
+ the copyright owner that is granting the License.
14
+
15
+ "Legal Entity" shall mean the union of the acting entity and all
16
+ other entities that control, are controlled by, or are under common
17
+ control with that entity. For the purposes of this definition,
18
+ "control" means (i) the power, direct or indirect, to cause the
19
+ direction or management of such entity, whether by contract or
20
+ otherwise, or (ii) ownership of fifty percent (50%) or more of the
21
+ outstanding shares, or (iii) beneficial ownership of such entity.
22
+
23
+ "You" (or "Your") shall mean an individual or Legal Entity
24
+ exercising permissions granted by this License.
25
+
26
+ "Source" form shall mean the preferred form for making modifications,
27
+ including but not limited to software source code, documentation
28
+ source, and configuration files.
29
+
30
+ "Object" form shall mean any form resulting from mechanical
31
+ transformation or translation of a Source form, including but
32
+ not limited to compiled object code, generated documentation,
33
+ and conversions to other media types.
34
+
35
+ "Work" shall mean the work of authorship, whether in Source or
36
+ Object form, made available under the License, as indicated by a
37
+ copyright notice that is included in or attached to the work
38
+ (an example is provided in the Appendix below).
39
+
40
+ "Derivative Works" shall mean any work, whether in Source or Object
41
+ form, that is based on (or derived from) the Work and for which the
42
+ editorial revisions, annotations, elaborations, or other modifications
43
+ represent, as a whole, an original work of authorship. For the purposes
44
+ of this License, Derivative Works shall not include works that remain
45
+ separable from, or merely link (or bind by name) to the interfaces of,
46
+ the Work and Derivative Works thereof.
47
+
48
+ "Contribution" shall mean any work of authorship, including
49
+ the original version of the Work and any modifications or additions
50
+ to that Work or Derivative Works thereof, that is intentionally
51
+ submitted to Licensor for inclusion in the Work by the copyright owner
52
+ or by an individual or Legal Entity authorized to submit on behalf of
53
+ the copyright owner. For the purposes of this definition, "submitted"
54
+ means any form of electronic, verbal, or written communication sent
55
+ to the Licensor or its representatives, including but not limited to
56
+ communication on electronic mailing lists, source code control systems,
57
+ and issue tracking systems that are managed by, or on behalf of, the
58
+ Licensor for the purpose of discussing and improving the Work, but
59
+ excluding communication that is conspicuously marked or otherwise
60
+ designated in writing by the copyright owner as "Not a Contribution."
61
+
62
+ "Contributor" shall mean Licensor and any individual or Legal Entity
63
+ on behalf of whom a Contribution has been received by Licensor and
64
+ subsequently incorporated within the Work.
65
+
66
+ 2. Grant of Copyright License. Subject to the terms and conditions of
67
+ this License, each Contributor hereby grants to You a perpetual,
68
+ worldwide, non-exclusive, no-charge, royalty-free, irrevocable
69
+ copyright license to reproduce, prepare Derivative Works of,
70
+ publicly display, publicly perform, sublicense, and distribute the
71
+ Work and such Derivative Works in Source or Object form.
72
+
73
+ 3. Grant of Patent License. Subject to the terms and conditions of
74
+ this License, each Contributor hereby grants to You a perpetual,
75
+ worldwide, non-exclusive, no-charge, royalty-free, irrevocable
76
+ (except as stated in this section) patent license to make, have made,
77
+ use, offer to sell, sell, import, and otherwise transfer the Work,
78
+ where such license applies only to those patent claims licensable
79
+ by such Contributor that are necessarily infringed by their
80
+ Contribution(s) alone or by combination of their Contribution(s)
81
+ with the Work to which such Contribution(s) was submitted. If You
82
+ institute patent litigation against any entity (including a
83
+ cross-claim or counterclaim in a lawsuit) alleging that the Work
84
+ or a Contribution incorporated within the Work constitutes direct
85
+ or contributory patent infringement, then any patent licenses
86
+ granted to You under this License for that Work shall terminate
87
+ as of the date such litigation is filed.
88
+
89
+ 4. Redistribution. You may reproduce and distribute copies of the
90
+ Work or Derivative Works thereof in any medium, with or without
91
+ modifications, and in Source or Object form, provided that You
92
+ meet the following conditions:
93
+
94
+ (a) You must give any other recipients of the Work or
95
+ Derivative Works a copy of this License; and
96
+
97
+ (b) You must cause any modified files to carry prominent notices
98
+ stating that You changed the files; and
99
+
100
+ (c) You must retain, in the Source form of any Derivative Works
101
+ that You distribute, all copyright, patent, trademark, and
102
+ attribution notices from the Source form of the Work,
103
+ excluding those notices that do not pertain to any part of
104
+ the Derivative Works; and
105
+
106
+ (d) If the Work includes a "NOTICE" text file as part of its
107
+ distribution, then any Derivative Works that You distribute must
108
+ include a readable copy of the attribution notices contained
109
+ within such NOTICE file, excluding those notices that do not
110
+ pertain to any part of the Derivative Works, in at least one
111
+ of the following places: within a NOTICE text file distributed
112
+ as part of the Derivative Works; within the Source form or
113
+ documentation, if provided along with the Derivative Works; or,
114
+ within a display generated by the Derivative Works, if and
115
+ wherever such third-party notices normally appear. The contents
116
+ of the NOTICE file are for informational purposes only and
117
+ do not modify the License. You may add Your own attribution
118
+ notices within Derivative Works that You distribute, alongside
119
+ or as an addendum to the NOTICE text from the Work, provided
120
+ that such additional attribution notices cannot be construed
121
+ as modifying the License.
122
+
123
+ You may add Your own copyright statement to Your modifications and
124
+ may provide additional or different license terms and conditions
125
+ for use, reproduction, or distribution of Your modifications, or
126
+ for any such Derivative Works as a whole, provided Your use,
127
+ reproduction, and distribution of the Work otherwise complies with
128
+ the conditions stated in this License.
129
+
130
+ 5. Submission of Contributions. Unless You explicitly state otherwise,
131
+ any Contribution intentionally submitted for inclusion in the Work
132
+ by You to the Licensor shall be under the terms and conditions of
133
+ this License, without any additional terms or conditions.
134
+ Notwithstanding the above, nothing herein shall supersede or modify
135
+ the terms of any separate license agreement you may have executed
136
+ with Licensor regarding such Contributions.
137
+
138
+ 6. Trademarks. This License does not grant permission to use the trade
139
+ names, trademarks, service marks, or product names of the Licensor,
140
+ except as required for reasonable and customary use in describing the
141
+ origin of the Work and reproducing the content of the NOTICE file.
142
+
143
+ 7. Disclaimer of Warranty. Unless required by applicable law or
144
+ agreed to in writing, Licensor provides the Work (and each
145
+ Contributor provides its Contributions) on an "AS IS" BASIS,
146
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
147
+ implied, including, without limitation, any warranties or conditions
148
+ of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A
149
+ PARTICULAR PURPOSE. You are solely responsible for determining the
150
+ appropriateness of using or redistributing the Work and assume any
151
+ risks associated with Your exercise of permissions under this License.
152
+
153
+ 8. Limitation of Liability. In no event and under no legal theory,
154
+ whether in tort (including negligence), contract, or otherwise,
155
+ unless required by applicable law (such as deliberate and grossly
156
+ negligent acts) or agreed to in writing, shall any Contributor be
157
+ liable to You for damages, including any direct, indirect, special,
158
+ incidental, or consequential damages of any character arising as a
159
+ result of this License or out of the use or inability to use the
160
+ Work (including but not limited to damages for loss of goodwill,
161
+ work stoppage, computer failure or malfunction, or any and all
162
+ other commercial damages or losses), even if such Contributor
163
+ has been advised of the possibility of such damages.
164
+
165
+ 9. Accepting Warranty or Additional Liability. While redistributing
166
+ the Work or Derivative Works thereof, You may choose to offer,
167
+ and charge a fee for, acceptance of support, warranty, indemnity,
168
+ or other liability obligations and/or rights consistent with this
169
+ License. However, in accepting such obligations, You may act only
170
+ on Your own behalf and on Your sole responsibility, not on behalf
171
+ of any other Contributor, and only if You agree to indemnify,
172
+ defend, and hold each Contributor harmless for any liability
173
+ incurred by, or claims asserted against, such Contributor by reason
174
+ of your accepting any such warranty or additional liability.
175
+
176
+ END OF TERMS AND CONDITIONS
177
+
178
+ APPENDIX: How to apply the Apache License to your work.
179
+
180
+ To apply the Apache License to your work, attach the following
181
+ boilerplate notice, with the fields enclosed by brackets "[]"
182
+ replaced with your own identifying information. (Don't include
183
+ the brackets!) The text should be enclosed in the appropriate
184
+ comment syntax for the file format. We also recommend that a
185
+ file or class name and description of purpose be included on the
186
+ same "printed page" as the copyright notice for easier
187
+ identification within third-party archives.
188
+
189
+ Copyright (c) 2025 Basis-theory.
190
+
191
+ Licensed under the Apache License, Version 2.0 (the "License");
192
+ you may not use this file except in compliance with the License.
193
+ You may obtain a copy of the License at
194
+
195
+ http://www.apache.org/licenses/LICENSE-2.0
196
+
197
+ Unless required by applicable law or agreed to in writing, software
198
+ distributed under the License is distributed on an "AS IS" BASIS,
199
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
200
+ See the License for the specific language governing permissions and
201
+ limitations under the License.
@@ -0,0 +1,213 @@
1
+ Metadata-Version: 2.1
2
+ Name: basistheoryclient
3
+ Version: 0.0.1
4
+ Summary:
5
+ License: Apache-2.0
6
+ Requires-Python: >=3.8,<4.0
7
+ Classifier: Intended Audience :: Developers
8
+ Classifier: License :: OSI Approved :: Apache Software License
9
+ Classifier: Operating System :: MacOS
10
+ Classifier: Operating System :: Microsoft :: Windows
11
+ Classifier: Operating System :: OS Independent
12
+ Classifier: Operating System :: POSIX
13
+ Classifier: Operating System :: POSIX :: Linux
14
+ Classifier: Programming Language :: Python
15
+ Classifier: Programming Language :: Python :: 3
16
+ Classifier: Programming Language :: Python :: 3.8
17
+ Classifier: Programming Language :: Python :: 3.9
18
+ Classifier: Programming Language :: Python :: 3.10
19
+ Classifier: Programming Language :: Python :: 3.11
20
+ Classifier: Programming Language :: Python :: 3.12
21
+ Classifier: Topic :: Software Development :: Libraries :: Python Modules
22
+ Classifier: Typing :: Typed
23
+ Requires-Dist: httpx (>=0.21.2)
24
+ Requires-Dist: pydantic (>=1.9.2)
25
+ Requires-Dist: pydantic-core (>=2.18.2)
26
+ Requires-Dist: typing_extensions (>=4.0.0)
27
+ Description-Content-Type: text/markdown
28
+
29
+ # BasisTheory Python Library
30
+
31
+ [![fern shield](https://img.shields.io/badge/%F0%9F%8C%BF-Built%20with%20Fern-brightgreen)](https://buildwithfern.com?utm_source=github&utm_medium=github&utm_campaign=readme&utm_source=https%3A%2F%2Fgithub.com%2FBasis-Theory%2Fpython-sdk)
32
+ [![pypi](https://img.shields.io/pypi/v/BasisTheoryClient)](https://pypi.python.org/pypi/BasisTheoryClient)
33
+
34
+ The BasisTheory Python library provides convenient access to the BasisTheory API from Python.
35
+
36
+ ## Documentation
37
+
38
+ API reference documentation is available [here](https://api.basistheory.com).
39
+
40
+ ## Installation
41
+
42
+ ```sh
43
+ pip install BasisTheoryClient
44
+ ```
45
+
46
+ ## Usage
47
+
48
+ Instantiate and use the client with the following:
49
+
50
+ ```python
51
+ from basis_theory import BasisTheory
52
+
53
+ client = BasisTheory(
54
+ correlation_id="YOUR_CORRELATION_ID",
55
+ api_key="YOUR_API_KEY",
56
+ )
57
+ client.tenants.self_.get()
58
+ ```
59
+
60
+ ## Async Client
61
+
62
+ The SDK also exports an `async` client so that you can make non-blocking calls to our API.
63
+
64
+ ```python
65
+ import asyncio
66
+
67
+ from basis_theory import AsyncBasisTheory
68
+
69
+ client = AsyncBasisTheory(
70
+ correlation_id="YOUR_CORRELATION_ID",
71
+ api_key="YOUR_API_KEY",
72
+ )
73
+
74
+
75
+ async def main() -> None:
76
+ await client.tenants.self_.get()
77
+
78
+
79
+ asyncio.run(main())
80
+ ```
81
+
82
+ ## Exception Handling
83
+
84
+ When the API returns a non-success status code (4xx or 5xx response), a subclass of the following error
85
+ will be thrown.
86
+
87
+ ```python
88
+ from basis_theory.core.api_error import ApiError
89
+
90
+ try:
91
+ client.tenants.self_.get(...)
92
+ except ApiError as e:
93
+ print(e.status_code)
94
+ print(e.body)
95
+ ```
96
+
97
+ ## Pagination
98
+
99
+ Paginated requests will return a `SyncPager` or `AsyncPager`, which can be used as generators for the underlying object.
100
+
101
+ ```python
102
+ from basis_theory import BasisTheory
103
+
104
+ client = BasisTheory(
105
+ correlation_id="YOUR_CORRELATION_ID",
106
+ api_key="YOUR_API_KEY",
107
+ )
108
+ response = client.applications.list()
109
+ for item in response:
110
+ yield item
111
+ # alternatively, you can paginate page-by-page
112
+ for page in response.iter_pages():
113
+ yield page
114
+ ```
115
+
116
+ ## Advanced
117
+
118
+ ### Access Raw Response Data
119
+
120
+ The SDK provides access to raw response data, including headers, through the `.with_raw_response` property.
121
+ The `.with_raw_response` property returns a "raw" client that can be used to access the `.headers` and `.data` attributes.
122
+
123
+ ```python
124
+ from basis_theory import BasisTheory
125
+
126
+ client = BasisTheory(
127
+ ...,
128
+ )
129
+ response = client.tenants.self_.with_raw_response.get(...)
130
+ print(response.headers) # access the response headers
131
+ print(response.data) # access the underlying object
132
+ pager = client.applications.list(...)
133
+ print(pager.response.headers) # access the response headers for the first page
134
+ for item in pager:
135
+ print(item) # access the underlying object(s)
136
+ for page in pager.iter_pages():
137
+ print(page.response.headers) # access the response headers for each page
138
+ for item in page:
139
+ print(item) # access the underlying object(s)
140
+ ```
141
+
142
+ ### Retries
143
+
144
+ The SDK is instrumented with automatic retries with exponential backoff. A request will be retried as long
145
+ as the request is deemed retryable and the number of retry attempts has not grown larger than the configured
146
+ retry limit (default: 2).
147
+
148
+ A request is deemed retryable when any of the following HTTP status codes is returned:
149
+
150
+ - [408](https://developer.mozilla.org/en-US/docs/Web/HTTP/Status/408) (Timeout)
151
+ - [429](https://developer.mozilla.org/en-US/docs/Web/HTTP/Status/429) (Too Many Requests)
152
+ - [5XX](https://developer.mozilla.org/en-US/docs/Web/HTTP/Status/500) (Internal Server Errors)
153
+
154
+ Use the `max_retries` request option to configure this behavior.
155
+
156
+ ```python
157
+ client.tenants.self_.get(..., request_options={
158
+ "max_retries": 1
159
+ })
160
+ ```
161
+
162
+ ### Timeouts
163
+
164
+ The SDK defaults to a 60 second timeout. You can configure this with a timeout option at the client or request level.
165
+
166
+ ```python
167
+
168
+ from basis_theory import BasisTheory
169
+
170
+ client = BasisTheory(
171
+ ...,
172
+ timeout=20.0,
173
+ )
174
+
175
+
176
+ # Override timeout for a specific method
177
+ client.tenants.self_.get(..., request_options={
178
+ "timeout_in_seconds": 1
179
+ })
180
+ ```
181
+
182
+ ### Custom Client
183
+
184
+ You can override the `httpx` client to customize it for your use-case. Some common use-cases include support for proxies
185
+ and transports.
186
+
187
+ ```python
188
+ import httpx
189
+ from basis_theory import BasisTheory
190
+
191
+ client = BasisTheory(
192
+ ...,
193
+ httpx_client=httpx.Client(
194
+ proxies="http://my.test.proxy.example.com",
195
+ transport=httpx.HTTPTransport(local_address="0.0.0.0"),
196
+ ),
197
+ )
198
+ ```
199
+
200
+ ## Contributing
201
+
202
+ While we value open-source contributions to this SDK, this library is generated programmatically.
203
+ Additions made directly to this library would have to be moved over to our generation code,
204
+ otherwise they would be overwritten upon the next generated release. Feel free to open a PR as
205
+ a proof of concept, but know that we will not be able to merge it as-is. We suggest opening
206
+ an issue first to discuss with us!
207
+
208
+ On the other hand, contributions to the README are always very welcome!
209
+ ## Reference
210
+
211
+ A full reference for this library is available [here](https://github.com/Basis-Theory/python-sdk/blob/HEAD/./reference.md).
212
+
213
+
@@ -0,0 +1,184 @@
1
+ # BasisTheory Python Library
2
+
3
+ [![fern shield](https://img.shields.io/badge/%F0%9F%8C%BF-Built%20with%20Fern-brightgreen)](https://buildwithfern.com?utm_source=github&utm_medium=github&utm_campaign=readme&utm_source=https%3A%2F%2Fgithub.com%2FBasis-Theory%2Fpython-sdk)
4
+ [![pypi](https://img.shields.io/pypi/v/BasisTheoryClient)](https://pypi.python.org/pypi/BasisTheoryClient)
5
+
6
+ The BasisTheory Python library provides convenient access to the BasisTheory API from Python.
7
+
8
+ ## Documentation
9
+
10
+ API reference documentation is available [here](https://api.basistheory.com).
11
+
12
+ ## Installation
13
+
14
+ ```sh
15
+ pip install BasisTheoryClient
16
+ ```
17
+
18
+ ## Usage
19
+
20
+ Instantiate and use the client with the following:
21
+
22
+ ```python
23
+ from basis_theory import BasisTheory
24
+
25
+ client = BasisTheory(
26
+ correlation_id="YOUR_CORRELATION_ID",
27
+ api_key="YOUR_API_KEY",
28
+ )
29
+ client.tenants.self_.get()
30
+ ```
31
+
32
+ ## Async Client
33
+
34
+ The SDK also exports an `async` client so that you can make non-blocking calls to our API.
35
+
36
+ ```python
37
+ import asyncio
38
+
39
+ from basis_theory import AsyncBasisTheory
40
+
41
+ client = AsyncBasisTheory(
42
+ correlation_id="YOUR_CORRELATION_ID",
43
+ api_key="YOUR_API_KEY",
44
+ )
45
+
46
+
47
+ async def main() -> None:
48
+ await client.tenants.self_.get()
49
+
50
+
51
+ asyncio.run(main())
52
+ ```
53
+
54
+ ## Exception Handling
55
+
56
+ When the API returns a non-success status code (4xx or 5xx response), a subclass of the following error
57
+ will be thrown.
58
+
59
+ ```python
60
+ from basis_theory.core.api_error import ApiError
61
+
62
+ try:
63
+ client.tenants.self_.get(...)
64
+ except ApiError as e:
65
+ print(e.status_code)
66
+ print(e.body)
67
+ ```
68
+
69
+ ## Pagination
70
+
71
+ Paginated requests will return a `SyncPager` or `AsyncPager`, which can be used as generators for the underlying object.
72
+
73
+ ```python
74
+ from basis_theory import BasisTheory
75
+
76
+ client = BasisTheory(
77
+ correlation_id="YOUR_CORRELATION_ID",
78
+ api_key="YOUR_API_KEY",
79
+ )
80
+ response = client.applications.list()
81
+ for item in response:
82
+ yield item
83
+ # alternatively, you can paginate page-by-page
84
+ for page in response.iter_pages():
85
+ yield page
86
+ ```
87
+
88
+ ## Advanced
89
+
90
+ ### Access Raw Response Data
91
+
92
+ The SDK provides access to raw response data, including headers, through the `.with_raw_response` property.
93
+ The `.with_raw_response` property returns a "raw" client that can be used to access the `.headers` and `.data` attributes.
94
+
95
+ ```python
96
+ from basis_theory import BasisTheory
97
+
98
+ client = BasisTheory(
99
+ ...,
100
+ )
101
+ response = client.tenants.self_.with_raw_response.get(...)
102
+ print(response.headers) # access the response headers
103
+ print(response.data) # access the underlying object
104
+ pager = client.applications.list(...)
105
+ print(pager.response.headers) # access the response headers for the first page
106
+ for item in pager:
107
+ print(item) # access the underlying object(s)
108
+ for page in pager.iter_pages():
109
+ print(page.response.headers) # access the response headers for each page
110
+ for item in page:
111
+ print(item) # access the underlying object(s)
112
+ ```
113
+
114
+ ### Retries
115
+
116
+ The SDK is instrumented with automatic retries with exponential backoff. A request will be retried as long
117
+ as the request is deemed retryable and the number of retry attempts has not grown larger than the configured
118
+ retry limit (default: 2).
119
+
120
+ A request is deemed retryable when any of the following HTTP status codes is returned:
121
+
122
+ - [408](https://developer.mozilla.org/en-US/docs/Web/HTTP/Status/408) (Timeout)
123
+ - [429](https://developer.mozilla.org/en-US/docs/Web/HTTP/Status/429) (Too Many Requests)
124
+ - [5XX](https://developer.mozilla.org/en-US/docs/Web/HTTP/Status/500) (Internal Server Errors)
125
+
126
+ Use the `max_retries` request option to configure this behavior.
127
+
128
+ ```python
129
+ client.tenants.self_.get(..., request_options={
130
+ "max_retries": 1
131
+ })
132
+ ```
133
+
134
+ ### Timeouts
135
+
136
+ The SDK defaults to a 60 second timeout. You can configure this with a timeout option at the client or request level.
137
+
138
+ ```python
139
+
140
+ from basis_theory import BasisTheory
141
+
142
+ client = BasisTheory(
143
+ ...,
144
+ timeout=20.0,
145
+ )
146
+
147
+
148
+ # Override timeout for a specific method
149
+ client.tenants.self_.get(..., request_options={
150
+ "timeout_in_seconds": 1
151
+ })
152
+ ```
153
+
154
+ ### Custom Client
155
+
156
+ You can override the `httpx` client to customize it for your use-case. Some common use-cases include support for proxies
157
+ and transports.
158
+
159
+ ```python
160
+ import httpx
161
+ from basis_theory import BasisTheory
162
+
163
+ client = BasisTheory(
164
+ ...,
165
+ httpx_client=httpx.Client(
166
+ proxies="http://my.test.proxy.example.com",
167
+ transport=httpx.HTTPTransport(local_address="0.0.0.0"),
168
+ ),
169
+ )
170
+ ```
171
+
172
+ ## Contributing
173
+
174
+ While we value open-source contributions to this SDK, this library is generated programmatically.
175
+ Additions made directly to this library would have to be moved over to our generation code,
176
+ otherwise they would be overwritten upon the next generated release. Feel free to open a PR as
177
+ a proof of concept, but know that we will not be able to merge it as-is. We suggest opening
178
+ an issue first to discuss with us!
179
+
180
+ On the other hand, contributions to the README are always very welcome!
181
+ ## Reference
182
+
183
+ A full reference for this library is available [here](https://github.com/Basis-Theory/python-sdk/blob/HEAD/./reference.md).
184
+
@@ -0,0 +1,85 @@
1
+ [project]
2
+ name = "BasisTheoryClient"
3
+
4
+ [tool.poetry]
5
+ name = "BasisTheoryClient"
6
+ version = "0.0.1"
7
+ description = ""
8
+ readme = "README.md"
9
+ authors = []
10
+ keywords = []
11
+ license = "Apache-2.0"
12
+ classifiers = [
13
+ "Intended Audience :: Developers",
14
+ "Programming Language :: Python",
15
+ "Programming Language :: Python :: 3",
16
+ "Programming Language :: Python :: 3.8",
17
+ "Programming Language :: Python :: 3.9",
18
+ "Programming Language :: Python :: 3.10",
19
+ "Programming Language :: Python :: 3.11",
20
+ "Programming Language :: Python :: 3.12",
21
+ "Operating System :: OS Independent",
22
+ "Operating System :: POSIX",
23
+ "Operating System :: MacOS",
24
+ "Operating System :: POSIX :: Linux",
25
+ "Operating System :: Microsoft :: Windows",
26
+ "Topic :: Software Development :: Libraries :: Python Modules",
27
+ "Typing :: Typed",
28
+ "License :: OSI Approved :: Apache Software License"
29
+ ]
30
+ packages = [
31
+ { include = "basis_theory", from = "src"}
32
+ ]
33
+
34
+ [project.urls]
35
+ Repository = 'https://github.com/Basis-Theory/python-sdk'
36
+
37
+ [tool.poetry.dependencies]
38
+ python = "^3.8"
39
+ httpx = ">=0.21.2"
40
+ pydantic = ">= 1.9.2"
41
+ pydantic-core = ">=2.18.2"
42
+ typing_extensions = ">= 4.0.0"
43
+
44
+ [tool.poetry.group.dev.dependencies]
45
+ mypy = "==1.13.0"
46
+ pytest = "^7.4.0"
47
+ pytest-asyncio = "^0.23.5"
48
+ python-dateutil = "^2.9.0"
49
+ types-python-dateutil = "^2.9.0.20240316"
50
+ ruff = "==0.11.5"
51
+
52
+ [tool.pytest.ini_options]
53
+ testpaths = [ "tests" ]
54
+ asyncio_mode = "auto"
55
+
56
+ [tool.mypy]
57
+ plugins = ["pydantic.mypy"]
58
+
59
+ [tool.ruff]
60
+ line-length = 120
61
+
62
+ [tool.ruff.lint]
63
+ select = [
64
+ "E", # pycodestyle errors
65
+ "F", # pyflakes
66
+ "I", # isort
67
+ ]
68
+ ignore = [
69
+ "E402", # Module level import not at top of file
70
+ "E501", # Line too long
71
+ "E711", # Comparison to `None` should be `cond is not None`
72
+ "E712", # Avoid equality comparisons to `True`; use `if ...:` checks
73
+ "E721", # Use `is` and `is not` for type comparisons, or `isinstance()` for insinstance checks
74
+ "E722", # Do not use bare `except`
75
+ "E731", # Do not assign a `lambda` expression, use a `def`
76
+ "F821", # Undefined name
77
+ "F841" # Local variable ... is assigned to but never used
78
+ ]
79
+
80
+ [tool.ruff.lint.isort]
81
+ section-order = ["future", "standard-library", "third-party", "first-party"]
82
+
83
+ [build-system]
84
+ requires = ["poetry-core"]
85
+ build-backend = "poetry.core.masonry.api"