clerk-backend-api 0.5.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 (210) hide show
  1. clerk_backend_api-0.5.0/PKG-INFO +663 -0
  2. clerk_backend_api-0.5.0/README-PYPI.md +638 -0
  3. clerk_backend_api-0.5.0/py.typed +1 -0
  4. clerk_backend_api-0.5.0/pyproject.toml +58 -0
  5. clerk_backend_api-0.5.0/src/clerk_backend_api/.genignore +1 -0
  6. clerk_backend_api-0.5.0/src/clerk_backend_api/__init__.py +5 -0
  7. clerk_backend_api-0.5.0/src/clerk_backend_api/_hooks/__init__.py +5 -0
  8. clerk_backend_api-0.5.0/src/clerk_backend_api/_hooks/registration.py +13 -0
  9. clerk_backend_api-0.5.0/src/clerk_backend_api/_hooks/sdkhooks.py +57 -0
  10. clerk_backend_api-0.5.0/src/clerk_backend_api/_hooks/types.py +76 -0
  11. clerk_backend_api-0.5.0/src/clerk_backend_api/actortokens.py +326 -0
  12. clerk_backend_api-0.5.0/src/clerk_backend_api/allowlistidentifiers.py +466 -0
  13. clerk_backend_api-0.5.0/src/clerk_backend_api/basesdk.py +253 -0
  14. clerk_backend_api-0.5.0/src/clerk_backend_api/betafeatures.py +503 -0
  15. clerk_backend_api-0.5.0/src/clerk_backend_api/blocklistidentifiers_sdk.py +466 -0
  16. clerk_backend_api-0.5.0/src/clerk_backend_api/clients.py +534 -0
  17. clerk_backend_api-0.5.0/src/clerk_backend_api/domains_sdk.py +658 -0
  18. clerk_backend_api-0.5.0/src/clerk_backend_api/emailaddresses.py +644 -0
  19. clerk_backend_api-0.5.0/src/clerk_backend_api/httpclient.py +78 -0
  20. clerk_backend_api-0.5.0/src/clerk_backend_api/instancesettings_sdk.py +484 -0
  21. clerk_backend_api-0.5.0/src/clerk_backend_api/invitations.py +537 -0
  22. clerk_backend_api-0.5.0/src/clerk_backend_api/jwks.py +144 -0
  23. clerk_backend_api-0.5.0/src/clerk_backend_api/jwks_helpers/__init__.py +30 -0
  24. clerk_backend_api-0.5.0/src/clerk_backend_api/jwks_helpers/authenticaterequest.py +135 -0
  25. clerk_backend_api-0.5.0/src/clerk_backend_api/jwks_helpers/verifytoken.py +206 -0
  26. clerk_backend_api-0.5.0/src/clerk_backend_api/jwttemplates.py +770 -0
  27. clerk_backend_api-0.5.0/src/clerk_backend_api/misc.py +164 -0
  28. clerk_backend_api-0.5.0/src/clerk_backend_api/models/__init__.py +151 -0
  29. clerk_backend_api-0.5.0/src/clerk_backend_api/models/actortoken.py +87 -0
  30. clerk_backend_api-0.5.0/src/clerk_backend_api/models/adddomainop.py +25 -0
  31. clerk_backend_api-0.5.0/src/clerk_backend_api/models/allowlistidentifier.py +65 -0
  32. clerk_backend_api-0.5.0/src/clerk_backend_api/models/banuserop.py +18 -0
  33. clerk_backend_api-0.5.0/src/clerk_backend_api/models/blocklistidentifier.py +63 -0
  34. clerk_backend_api-0.5.0/src/clerk_backend_api/models/blocklistidentifiers.py +23 -0
  35. clerk_backend_api-0.5.0/src/clerk_backend_api/models/changeproductioninstancedomainop.py +17 -0
  36. clerk_backend_api-0.5.0/src/clerk_backend_api/models/clerkerror.py +31 -0
  37. clerk_backend_api-0.5.0/src/clerk_backend_api/models/clerkerrors.py +32 -0
  38. clerk_backend_api-0.5.0/src/clerk_backend_api/models/client.py +95 -0
  39. clerk_backend_api-0.5.0/src/clerk_backend_api/models/cnametarget.py +24 -0
  40. clerk_backend_api-0.5.0/src/clerk_backend_api/models/createactortokenop.py +41 -0
  41. clerk_backend_api-0.5.0/src/clerk_backend_api/models/createallowlistidentifierop.py +29 -0
  42. clerk_backend_api-0.5.0/src/clerk_backend_api/models/createblocklistidentifierop.py +20 -0
  43. clerk_backend_api-0.5.0/src/clerk_backend_api/models/createemailaddressop.py +60 -0
  44. clerk_backend_api-0.5.0/src/clerk_backend_api/models/createinvitationop.py +94 -0
  45. clerk_backend_api-0.5.0/src/clerk_backend_api/models/createjwttemplateop.py +78 -0
  46. clerk_backend_api-0.5.0/src/clerk_backend_api/models/createoauthapplicationop.py +35 -0
  47. clerk_backend_api-0.5.0/src/clerk_backend_api/models/createorganizationinvitationbulkop.py +74 -0
  48. clerk_backend_api-0.5.0/src/clerk_backend_api/models/createorganizationinvitationop.py +74 -0
  49. clerk_backend_api-0.5.0/src/clerk_backend_api/models/createorganizationmembershipop.py +34 -0
  50. clerk_backend_api-0.5.0/src/clerk_backend_api/models/createorganizationop.py +63 -0
  51. clerk_backend_api-0.5.0/src/clerk_backend_api/models/createphonenumberop.py +70 -0
  52. clerk_backend_api-0.5.0/src/clerk_backend_api/models/createredirecturlop.py +17 -0
  53. clerk_backend_api-0.5.0/src/clerk_backend_api/models/createsamlconnectionop.py +102 -0
  54. clerk_backend_api-0.5.0/src/clerk_backend_api/models/createsessiontokenfromtemplateop.py +40 -0
  55. clerk_backend_api-0.5.0/src/clerk_backend_api/models/createsignintokenop.py +25 -0
  56. clerk_backend_api-0.5.0/src/clerk_backend_api/models/createuserop.py +599 -0
  57. clerk_backend_api-0.5.0/src/clerk_backend_api/models/deleteallowlistidentifierop.py +18 -0
  58. clerk_backend_api-0.5.0/src/clerk_backend_api/models/deleteblocklistidentifierop.py +18 -0
  59. clerk_backend_api-0.5.0/src/clerk_backend_api/models/deletedobject.py +21 -0
  60. clerk_backend_api-0.5.0/src/clerk_backend_api/models/deletedomainop.py +18 -0
  61. clerk_backend_api-0.5.0/src/clerk_backend_api/models/deleteemailaddressop.py +18 -0
  62. clerk_backend_api-0.5.0/src/clerk_backend_api/models/deletejwttemplateop.py +18 -0
  63. clerk_backend_api-0.5.0/src/clerk_backend_api/models/deleteoauthapplicationop.py +18 -0
  64. clerk_backend_api-0.5.0/src/clerk_backend_api/models/deleteorganizationlogoop.py +18 -0
  65. clerk_backend_api-0.5.0/src/clerk_backend_api/models/deleteorganizationmembershipop.py +22 -0
  66. clerk_backend_api-0.5.0/src/clerk_backend_api/models/deleteorganizationop.py +18 -0
  67. clerk_backend_api-0.5.0/src/clerk_backend_api/models/deletephonenumberop.py +18 -0
  68. clerk_backend_api-0.5.0/src/clerk_backend_api/models/deleteredirecturlop.py +18 -0
  69. clerk_backend_api-0.5.0/src/clerk_backend_api/models/deletesamlconnectionop.py +18 -0
  70. clerk_backend_api-0.5.0/src/clerk_backend_api/models/deleteuserop.py +18 -0
  71. clerk_backend_api-0.5.0/src/clerk_backend_api/models/deleteuserprofileimageop.py +18 -0
  72. clerk_backend_api-0.5.0/src/clerk_backend_api/models/disablemfaop.py +30 -0
  73. clerk_backend_api-0.5.0/src/clerk_backend_api/models/domain.py +69 -0
  74. clerk_backend_api-0.5.0/src/clerk_backend_api/models/domains.py +23 -0
  75. clerk_backend_api-0.5.0/src/clerk_backend_api/models/emailaddress.py +277 -0
  76. clerk_backend_api-0.5.0/src/clerk_backend_api/models/getclientlistop.py +43 -0
  77. clerk_backend_api-0.5.0/src/clerk_backend_api/models/getclientop.py +18 -0
  78. clerk_backend_api-0.5.0/src/clerk_backend_api/models/getemailaddressop.py +18 -0
  79. clerk_backend_api-0.5.0/src/clerk_backend_api/models/getjwttemplateop.py +18 -0
  80. clerk_backend_api-0.5.0/src/clerk_backend_api/models/getoauthaccesstokenop.py +97 -0
  81. clerk_backend_api-0.5.0/src/clerk_backend_api/models/getoauthapplicationop.py +18 -0
  82. clerk_backend_api-0.5.0/src/clerk_backend_api/models/getorganizationinvitationop.py +22 -0
  83. clerk_backend_api-0.5.0/src/clerk_backend_api/models/getorganizationop.py +18 -0
  84. clerk_backend_api-0.5.0/src/clerk_backend_api/models/getphonenumberop.py +18 -0
  85. clerk_backend_api-0.5.0/src/clerk_backend_api/models/getpublicinterstitialop.py +23 -0
  86. clerk_backend_api-0.5.0/src/clerk_backend_api/models/getredirecturlop.py +18 -0
  87. clerk_backend_api-0.5.0/src/clerk_backend_api/models/getsamlconnectionop.py +18 -0
  88. clerk_backend_api-0.5.0/src/clerk_backend_api/models/getsessionlistop.py +55 -0
  89. clerk_backend_api-0.5.0/src/clerk_backend_api/models/getsessionop.py +18 -0
  90. clerk_backend_api-0.5.0/src/clerk_backend_api/models/gettemplatelistop.py +24 -0
  91. clerk_backend_api-0.5.0/src/clerk_backend_api/models/gettemplateop.py +28 -0
  92. clerk_backend_api-0.5.0/src/clerk_backend_api/models/getuserlistop.py +162 -0
  93. clerk_backend_api-0.5.0/src/clerk_backend_api/models/getuserop.py +18 -0
  94. clerk_backend_api-0.5.0/src/clerk_backend_api/models/getuserscountop.py +84 -0
  95. clerk_backend_api-0.5.0/src/clerk_backend_api/models/identificationlink.py +24 -0
  96. clerk_backend_api-0.5.0/src/clerk_backend_api/models/instancerestrictions.py +30 -0
  97. clerk_backend_api-0.5.0/src/clerk_backend_api/models/instancesettings.py +32 -0
  98. clerk_backend_api-0.5.0/src/clerk_backend_api/models/invitation.py +87 -0
  99. clerk_backend_api-0.5.0/src/clerk_backend_api/models/invitation_revoked.py +85 -0
  100. clerk_backend_api-0.5.0/src/clerk_backend_api/models/jwttemplate.py +57 -0
  101. clerk_backend_api-0.5.0/src/clerk_backend_api/models/listinvitationsop.py +54 -0
  102. clerk_backend_api-0.5.0/src/clerk_backend_api/models/listoauthapplicationsop.py +43 -0
  103. clerk_backend_api-0.5.0/src/clerk_backend_api/models/listorganizationinvitationsop.py +58 -0
  104. clerk_backend_api-0.5.0/src/clerk_backend_api/models/listorganizationmembershipsop.py +57 -0
  105. clerk_backend_api-0.5.0/src/clerk_backend_api/models/listorganizationsop.py +60 -0
  106. clerk_backend_api-0.5.0/src/clerk_backend_api/models/listpendingorganizationinvitationsop.py +47 -0
  107. clerk_backend_api-0.5.0/src/clerk_backend_api/models/listsamlconnectionsop.py +43 -0
  108. clerk_backend_api-0.5.0/src/clerk_backend_api/models/lockuserop.py +18 -0
  109. clerk_backend_api-0.5.0/src/clerk_backend_api/models/mergeorganizationmetadataop.py +70 -0
  110. clerk_backend_api-0.5.0/src/clerk_backend_api/models/oauthapplication.py +54 -0
  111. clerk_backend_api-0.5.0/src/clerk_backend_api/models/oauthapplications.py +23 -0
  112. clerk_backend_api-0.5.0/src/clerk_backend_api/models/oauthapplicationwithsecret.py +63 -0
  113. clerk_backend_api-0.5.0/src/clerk_backend_api/models/organization.py +96 -0
  114. clerk_backend_api-0.5.0/src/clerk_backend_api/models/organizationinvitation.py +70 -0
  115. clerk_backend_api-0.5.0/src/clerk_backend_api/models/organizationinvitations.py +23 -0
  116. clerk_backend_api-0.5.0/src/clerk_backend_api/models/organizationmembership.py +213 -0
  117. clerk_backend_api-0.5.0/src/clerk_backend_api/models/organizationmemberships.py +23 -0
  118. clerk_backend_api-0.5.0/src/clerk_backend_api/models/organizations.py +23 -0
  119. clerk_backend_api-0.5.0/src/clerk_backend_api/models/organizationsettings.py +51 -0
  120. clerk_backend_api-0.5.0/src/clerk_backend_api/models/organizationwithlogo.py +103 -0
  121. clerk_backend_api-0.5.0/src/clerk_backend_api/models/phonenumber.py +195 -0
  122. clerk_backend_api-0.5.0/src/clerk_backend_api/models/previewtemplateop.py +105 -0
  123. clerk_backend_api-0.5.0/src/clerk_backend_api/models/proxycheck.py +32 -0
  124. clerk_backend_api-0.5.0/src/clerk_backend_api/models/redirecturl.py +38 -0
  125. clerk_backend_api-0.5.0/src/clerk_backend_api/models/reverttemplateop.py +28 -0
  126. clerk_backend_api-0.5.0/src/clerk_backend_api/models/revokeactortokenop.py +18 -0
  127. clerk_backend_api-0.5.0/src/clerk_backend_api/models/revokeinvitationop.py +18 -0
  128. clerk_backend_api-0.5.0/src/clerk_backend_api/models/revokeorganizationinvitationop.py +38 -0
  129. clerk_backend_api-0.5.0/src/clerk_backend_api/models/revokesessionop.py +18 -0
  130. clerk_backend_api-0.5.0/src/clerk_backend_api/models/revokesignintokenop.py +18 -0
  131. clerk_backend_api-0.5.0/src/clerk_backend_api/models/rotateoauthapplicationsecretop.py +18 -0
  132. clerk_backend_api-0.5.0/src/clerk_backend_api/models/samlaccount.py +219 -0
  133. clerk_backend_api-0.5.0/src/clerk_backend_api/models/samlconnection.py +112 -0
  134. clerk_backend_api-0.5.0/src/clerk_backend_api/models/samlconnections.py +23 -0
  135. clerk_backend_api-0.5.0/src/clerk_backend_api/models/schemas_passkey.py +126 -0
  136. clerk_backend_api-0.5.0/src/clerk_backend_api/models/sdkerror.py +22 -0
  137. clerk_backend_api-0.5.0/src/clerk_backend_api/models/security.py +16 -0
  138. clerk_backend_api-0.5.0/src/clerk_backend_api/models/session.py +106 -0
  139. clerk_backend_api-0.5.0/src/clerk_backend_api/models/setuserprofileimageop.py +42 -0
  140. clerk_backend_api-0.5.0/src/clerk_backend_api/models/signintoken.py +77 -0
  141. clerk_backend_api-0.5.0/src/clerk_backend_api/models/signup.py +127 -0
  142. clerk_backend_api-0.5.0/src/clerk_backend_api/models/svixurl.py +14 -0
  143. clerk_backend_api-0.5.0/src/clerk_backend_api/models/template.py +135 -0
  144. clerk_backend_api-0.5.0/src/clerk_backend_api/models/testingtoken.py +34 -0
  145. clerk_backend_api-0.5.0/src/clerk_backend_api/models/toggletemplatedeliveryop.py +67 -0
  146. clerk_backend_api-0.5.0/src/clerk_backend_api/models/totalcount.py +29 -0
  147. clerk_backend_api-0.5.0/src/clerk_backend_api/models/unbanuserop.py +18 -0
  148. clerk_backend_api-0.5.0/src/clerk_backend_api/models/unlockuserop.py +18 -0
  149. clerk_backend_api-0.5.0/src/clerk_backend_api/models/updatedomainop.py +71 -0
  150. clerk_backend_api-0.5.0/src/clerk_backend_api/models/updateemailaddressop.py +61 -0
  151. clerk_backend_api-0.5.0/src/clerk_backend_api/models/updateinstanceauthconfigop.py +78 -0
  152. clerk_backend_api-0.5.0/src/clerk_backend_api/models/updateinstanceop.py +87 -0
  153. clerk_backend_api-0.5.0/src/clerk_backend_api/models/updateinstanceorganizationsettingsop.py +64 -0
  154. clerk_backend_api-0.5.0/src/clerk_backend_api/models/updateinstancerestrictionsop.py +50 -0
  155. clerk_backend_api-0.5.0/src/clerk_backend_api/models/updatejwttemplateop.py +91 -0
  156. clerk_backend_api-0.5.0/src/clerk_backend_api/models/updateoauthapplicationop.py +38 -0
  157. clerk_backend_api-0.5.0/src/clerk_backend_api/models/updateorganizationmembershipmetadataop.py +74 -0
  158. clerk_backend_api-0.5.0/src/clerk_backend_api/models/updateorganizationmembershipop.py +34 -0
  159. clerk_backend_api-0.5.0/src/clerk_backend_api/models/updateorganizationop.py +97 -0
  160. clerk_backend_api-0.5.0/src/clerk_backend_api/models/updatephonenumberop.py +71 -0
  161. clerk_backend_api-0.5.0/src/clerk_backend_api/models/updateproductioninstancedomainop.py +17 -0
  162. clerk_backend_api-0.5.0/src/clerk_backend_api/models/updatesamlconnectionop.py +119 -0
  163. clerk_backend_api-0.5.0/src/clerk_backend_api/models/updatesignupop.py +71 -0
  164. clerk_backend_api-0.5.0/src/clerk_backend_api/models/updateusermetadataop.py +86 -0
  165. clerk_backend_api-0.5.0/src/clerk_backend_api/models/updateuserop.py +586 -0
  166. clerk_backend_api-0.5.0/src/clerk_backend_api/models/uploadorganizationlogoop.py +46 -0
  167. clerk_backend_api-0.5.0/src/clerk_backend_api/models/upserttemplateop.py +107 -0
  168. clerk_backend_api-0.5.0/src/clerk_backend_api/models/user.py +237 -0
  169. clerk_backend_api-0.5.0/src/clerk_backend_api/models/usersgetorganizationmembershipsop.py +47 -0
  170. clerk_backend_api-0.5.0/src/clerk_backend_api/models/verifyclientop.py +21 -0
  171. clerk_backend_api-0.5.0/src/clerk_backend_api/models/verifydomainproxyop.py +21 -0
  172. clerk_backend_api-0.5.0/src/clerk_backend_api/models/verifypasswordop.py +42 -0
  173. clerk_backend_api-0.5.0/src/clerk_backend_api/models/verifysessionop.py +40 -0
  174. clerk_backend_api-0.5.0/src/clerk_backend_api/models/verifytotpop.py +49 -0
  175. clerk_backend_api-0.5.0/src/clerk_backend_api/models/web3wallet.py +181 -0
  176. clerk_backend_api-0.5.0/src/clerk_backend_api/oauthapplications_sdk.py +1033 -0
  177. clerk_backend_api-0.5.0/src/clerk_backend_api/organizationinvitations_sdk.py +1222 -0
  178. clerk_backend_api-0.5.0/src/clerk_backend_api/organizationmemberships_sdk.py +923 -0
  179. clerk_backend_api-0.5.0/src/clerk_backend_api/organizations_sdk.py +1386 -0
  180. clerk_backend_api-0.5.0/src/clerk_backend_api/phonenumbers.py +644 -0
  181. clerk_backend_api-0.5.0/src/clerk_backend_api/proxychecks.py +182 -0
  182. clerk_backend_api-0.5.0/src/clerk_backend_api/py.typed +1 -0
  183. clerk_backend_api-0.5.0/src/clerk_backend_api/redirecturls.py +614 -0
  184. clerk_backend_api-0.5.0/src/clerk_backend_api/samlconnections_sdk.py +921 -0
  185. clerk_backend_api-0.5.0/src/clerk_backend_api/sdk.py +184 -0
  186. clerk_backend_api-0.5.0/src/clerk_backend_api/sdkconfiguration.py +48 -0
  187. clerk_backend_api-0.5.0/src/clerk_backend_api/sessions.py +845 -0
  188. clerk_backend_api-0.5.0/src/clerk_backend_api/signintokens.py +328 -0
  189. clerk_backend_api-0.5.0/src/clerk_backend_api/signups.py +174 -0
  190. clerk_backend_api-0.5.0/src/clerk_backend_api/templates.py +1006 -0
  191. clerk_backend_api-0.5.0/src/clerk_backend_api/testingtokens.py +144 -0
  192. clerk_backend_api-0.5.0/src/clerk_backend_api/types/__init__.py +21 -0
  193. clerk_backend_api-0.5.0/src/clerk_backend_api/types/basemodel.py +39 -0
  194. clerk_backend_api-0.5.0/src/clerk_backend_api/users.py +3321 -0
  195. clerk_backend_api-0.5.0/src/clerk_backend_api/utils/__init__.py +84 -0
  196. clerk_backend_api-0.5.0/src/clerk_backend_api/utils/annotations.py +19 -0
  197. clerk_backend_api-0.5.0/src/clerk_backend_api/utils/enums.py +34 -0
  198. clerk_backend_api-0.5.0/src/clerk_backend_api/utils/eventstreaming.py +178 -0
  199. clerk_backend_api-0.5.0/src/clerk_backend_api/utils/forms.py +208 -0
  200. clerk_backend_api-0.5.0/src/clerk_backend_api/utils/headers.py +136 -0
  201. clerk_backend_api-0.5.0/src/clerk_backend_api/utils/logger.py +19 -0
  202. clerk_backend_api-0.5.0/src/clerk_backend_api/utils/metadata.py +118 -0
  203. clerk_backend_api-0.5.0/src/clerk_backend_api/utils/queryparams.py +205 -0
  204. clerk_backend_api-0.5.0/src/clerk_backend_api/utils/requestbodies.py +66 -0
  205. clerk_backend_api-0.5.0/src/clerk_backend_api/utils/retries.py +216 -0
  206. clerk_backend_api-0.5.0/src/clerk_backend_api/utils/security.py +173 -0
  207. clerk_backend_api-0.5.0/src/clerk_backend_api/utils/serializers.py +190 -0
  208. clerk_backend_api-0.5.0/src/clerk_backend_api/utils/url.py +155 -0
  209. clerk_backend_api-0.5.0/src/clerk_backend_api/utils/values.py +134 -0
  210. clerk_backend_api-0.5.0/src/clerk_backend_api/webhooks.py +436 -0
@@ -0,0 +1,663 @@
1
+ Metadata-Version: 2.1
2
+ Name: clerk-backend-api
3
+ Version: 0.5.0
4
+ Summary: Python Client SDK for clerk.dev
5
+ Home-page: https://github.com/clerk/clerk-sdk-python.git
6
+ Author: Clerk
7
+ Requires-Python: >=3.8,<4.0
8
+ Classifier: Programming Language :: Python :: 3
9
+ Classifier: Programming Language :: Python :: 3.8
10
+ Classifier: Programming Language :: Python :: 3.9
11
+ Classifier: Programming Language :: Python :: 3.10
12
+ Classifier: Programming Language :: Python :: 3.11
13
+ Classifier: Programming Language :: Python :: 3.12
14
+ Requires-Dist: cryptography (>=43.0.1,<44.0.0)
15
+ Requires-Dist: eval-type-backport (>=0.2.0,<0.3.0)
16
+ Requires-Dist: httpx (>=0.27.0,<0.28.0)
17
+ Requires-Dist: jsonpath-python (>=1.0.6,<2.0.0)
18
+ Requires-Dist: pydantic (>=2.8.2,<2.9.0)
19
+ Requires-Dist: pyjwt (>=2.9.0,<3.0.0)
20
+ Requires-Dist: python-dateutil (==2.8.2)
21
+ Requires-Dist: typing-inspect (>=0.9.0,<0.10.0)
22
+ Project-URL: Repository, https://github.com/clerk/clerk-sdk-python.git
23
+ Description-Content-Type: text/markdown
24
+
25
+ <div align="center">
26
+ <img src="https://github.com/user-attachments/assets/bdff80ad-42b9-4176-8b35-c05c551f57ac" width="150">
27
+ <p>The most comprehensive User Management Platform</p>
28
+ <a href="https://clerk.com/docs/reference/backend-api"><img src="https://img.shields.io/static/v1?label=Docs&message=API Ref&color=000000&style=for-the-badge" /></a>
29
+ <a href="https://opensource.org/licenses/MIT"><img src="https://img.shields.io/badge/License-MIT-blue.svg?style=for-the-badge" /></a>
30
+ </div>
31
+ <br></br>
32
+
33
+ The Clerk Python library provides convenient access to the Clerk REST API from any Python application 3.0+. The library includes type definitions for all request params and response fields, and offers synchronous and asynchronous support powered by [httpx](https://www.python-httpx.org/)
34
+
35
+ <!-- Start Summary [summary] -->
36
+ ## Summary
37
+
38
+ Clerk Backend API: The Clerk REST Backend API, meant to be accessed by backend
39
+ servers.
40
+
41
+ ### Versions
42
+
43
+ When the API changes in a way that isn't compatible with older versions, a new version is released.
44
+ Each version is identified by its release date, e.g. `2021-02-05`. For more information, please see [Clerk API Versions](https://clerk.com/docs/backend-requests/versioning/overview).
45
+
46
+
47
+ Please see https://clerk.com/docs for more information.
48
+
49
+ More information about the API can be found at https://clerk.com/docs
50
+ <!-- End Summary [summary] -->
51
+
52
+ <!-- Start Table of Contents [toc] -->
53
+ ## Table of Contents
54
+
55
+ * [SDK Installation](https://github.com/clerk/clerk-sdk-python/blob/master/#sdk-installation)
56
+ * [IDE Support](https://github.com/clerk/clerk-sdk-python/blob/master/#ide-support)
57
+ * [SDK Example Usage](https://github.com/clerk/clerk-sdk-python/blob/master/#sdk-example-usage)
58
+ * [Available Resources and Operations](https://github.com/clerk/clerk-sdk-python/blob/master/#available-resources-and-operations)
59
+ * [Pagination](https://github.com/clerk/clerk-sdk-python/blob/master/#pagination)
60
+ * [File uploads](https://github.com/clerk/clerk-sdk-python/blob/master/#file-uploads)
61
+ * [Retries](https://github.com/clerk/clerk-sdk-python/blob/master/#retries)
62
+ * [Error Handling](https://github.com/clerk/clerk-sdk-python/blob/master/#error-handling)
63
+ * [Server Selection](https://github.com/clerk/clerk-sdk-python/blob/master/#server-selection)
64
+ * [Custom HTTP Client](https://github.com/clerk/clerk-sdk-python/blob/master/#custom-http-client)
65
+ * [Authentication](https://github.com/clerk/clerk-sdk-python/blob/master/#authentication)
66
+ * [Debugging](https://github.com/clerk/clerk-sdk-python/blob/master/#debugging)
67
+ <!-- End Table of Contents [toc] -->
68
+
69
+ <!-- Start SDK Installation [installation] -->
70
+ ## SDK Installation
71
+
72
+ The SDK can be installed with either *pip* or *poetry* package managers.
73
+
74
+ ### PIP
75
+
76
+ *PIP* is the default package installer for Python, enabling easy installation and management of packages from PyPI via the command line.
77
+
78
+ ```bash
79
+ pip install clerk-backend-api
80
+ ```
81
+
82
+ ### Poetry
83
+
84
+ *Poetry* is a modern tool that simplifies dependency management and package publishing by using a single `pyproject.toml` file to handle project metadata and dependencies.
85
+
86
+ ```bash
87
+ poetry add clerk-backend-api
88
+ ```
89
+ <!-- End SDK Installation [installation] -->
90
+
91
+ <!-- Start IDE Support [idesupport] -->
92
+ ## IDE Support
93
+
94
+ ### PyCharm
95
+
96
+ Generally, the SDK will work well with most IDEs out of the box. However, when using PyCharm, you can enjoy much better integration with Pydantic by installing an additional plugin.
97
+
98
+ - [PyCharm Pydantic Plugin](https://docs.pydantic.dev/latest/integrations/pycharm/)
99
+ <!-- End IDE Support [idesupport] -->
100
+
101
+ <!-- Start SDK Example Usage [usage] -->
102
+ ## SDK Example Usage
103
+
104
+ ### Example
105
+
106
+ ```python
107
+ # Synchronous Example
108
+ from clerk_backend_api import Clerk
109
+
110
+ s = Clerk(
111
+ bearer_auth="<YOUR_BEARER_TOKEN_HERE>",
112
+ )
113
+
114
+
115
+ res = s.email_addresses.get(email_address_id="email_address_id_example")
116
+
117
+ if res is not None:
118
+ # handle response
119
+ pass
120
+ ```
121
+
122
+ </br>
123
+
124
+ The same SDK client can also be used to make asychronous requests by importing asyncio.
125
+ ```python
126
+ # Asynchronous Example
127
+ import asyncio
128
+ from clerk_backend_api import Clerk
129
+
130
+ async def main():
131
+ s = Clerk(
132
+ bearer_auth="<YOUR_BEARER_TOKEN_HERE>",
133
+ )
134
+ res = await s.email_addresses.get_async(email_address_id="email_address_id_example")
135
+ if res is not None:
136
+ # handle response
137
+ pass
138
+
139
+ asyncio.run(main())
140
+ ```
141
+ <!-- End SDK Example Usage [usage] -->
142
+
143
+ <!-- Start Available Resources and Operations [operations] -->
144
+ ## Available Resources and Operations
145
+
146
+ ### [misc](https://github.com/clerk/clerk-sdk-python/blob/master/docs/sdks/misc/README.md)
147
+
148
+ * [get_public_interstitial](https://github.com/clerk/clerk-sdk-python/blob/master/docs/sdks/misc/README.md#get_public_interstitial) - Returns the markup for the interstitial page
149
+
150
+ ### [jwks](https://github.com/clerk/clerk-sdk-python/blob/master/docs/sdks/jwks/README.md)
151
+
152
+ * [get](https://github.com/clerk/clerk-sdk-python/blob/master/docs/sdks/jwks/README.md#get) - Retrieve the JSON Web Key Set of the instance
153
+
154
+ ### [clients](https://github.com/clerk/clerk-sdk-python/blob/master/docs/sdks/clients/README.md)
155
+
156
+ * [~~list~~](https://github.com/clerk/clerk-sdk-python/blob/master/docs/sdks/clients/README.md#list) - List all clients :warning: **Deprecated**
157
+ * [verify](https://github.com/clerk/clerk-sdk-python/blob/master/docs/sdks/clients/README.md#verify) - Verify a client
158
+ * [get](https://github.com/clerk/clerk-sdk-python/blob/master/docs/sdks/clients/README.md#get) - Get a client
159
+
160
+ ### [email_addresses](https://github.com/clerk/clerk-sdk-python/blob/master/docs/sdks/emailaddresses/README.md)
161
+
162
+ * [create](https://github.com/clerk/clerk-sdk-python/blob/master/docs/sdks/emailaddresses/README.md#create) - Create an email address
163
+ * [get](https://github.com/clerk/clerk-sdk-python/blob/master/docs/sdks/emailaddresses/README.md#get) - Retrieve an email address
164
+ * [delete](https://github.com/clerk/clerk-sdk-python/blob/master/docs/sdks/emailaddresses/README.md#delete) - Delete an email address
165
+ * [update](https://github.com/clerk/clerk-sdk-python/blob/master/docs/sdks/emailaddresses/README.md#update) - Update an email address
166
+
167
+ ### [phone_numbers](https://github.com/clerk/clerk-sdk-python/blob/master/docs/sdks/phonenumbers/README.md)
168
+
169
+ * [create](https://github.com/clerk/clerk-sdk-python/blob/master/docs/sdks/phonenumbers/README.md#create) - Create a phone number
170
+ * [get](https://github.com/clerk/clerk-sdk-python/blob/master/docs/sdks/phonenumbers/README.md#get) - Retrieve a phone number
171
+ * [delete](https://github.com/clerk/clerk-sdk-python/blob/master/docs/sdks/phonenumbers/README.md#delete) - Delete a phone number
172
+ * [update](https://github.com/clerk/clerk-sdk-python/blob/master/docs/sdks/phonenumbers/README.md#update) - Update a phone number
173
+
174
+ ### [sessions](https://github.com/clerk/clerk-sdk-python/blob/master/docs/sdks/sessions/README.md)
175
+
176
+ * [list](https://github.com/clerk/clerk-sdk-python/blob/master/docs/sdks/sessions/README.md#list) - List all sessions
177
+ * [get](https://github.com/clerk/clerk-sdk-python/blob/master/docs/sdks/sessions/README.md#get) - Retrieve a session
178
+ * [revoke](https://github.com/clerk/clerk-sdk-python/blob/master/docs/sdks/sessions/README.md#revoke) - Revoke a session
179
+ * [~~verify~~](https://github.com/clerk/clerk-sdk-python/blob/master/docs/sdks/sessions/README.md#verify) - Verify a session :warning: **Deprecated**
180
+ * [create_token_from_template](https://github.com/clerk/clerk-sdk-python/blob/master/docs/sdks/sessions/README.md#create_token_from_template) - Create a session token from a jwt template
181
+
182
+ ### [templates](https://github.com/clerk/clerk-sdk-python/blob/master/docs/sdks/templates/README.md)
183
+
184
+ * [list](https://github.com/clerk/clerk-sdk-python/blob/master/docs/sdks/templates/README.md#list) - List all templates
185
+ * [get](https://github.com/clerk/clerk-sdk-python/blob/master/docs/sdks/templates/README.md#get) - Retrieve a template
186
+ * [upsert](https://github.com/clerk/clerk-sdk-python/blob/master/docs/sdks/templates/README.md#upsert) - Update a template for a given type and slug
187
+ * [revert](https://github.com/clerk/clerk-sdk-python/blob/master/docs/sdks/templates/README.md#revert) - Revert a template
188
+ * [preview](https://github.com/clerk/clerk-sdk-python/blob/master/docs/sdks/templates/README.md#preview) - Preview changes to a template
189
+ * [toggle_delivery](https://github.com/clerk/clerk-sdk-python/blob/master/docs/sdks/templates/README.md#toggle_delivery) - Toggle the delivery by Clerk for a template of a given type and slug
190
+
191
+ ### [users](https://github.com/clerk/clerk-sdk-python/blob/master/docs/sdks/users/README.md)
192
+
193
+ * [list](https://github.com/clerk/clerk-sdk-python/blob/master/docs/sdks/users/README.md#list) - List all users
194
+ * [create](https://github.com/clerk/clerk-sdk-python/blob/master/docs/sdks/users/README.md#create) - Create a new user
195
+ * [count](https://github.com/clerk/clerk-sdk-python/blob/master/docs/sdks/users/README.md#count) - Count users
196
+ * [get](https://github.com/clerk/clerk-sdk-python/blob/master/docs/sdks/users/README.md#get) - Retrieve a user
197
+ * [update](https://github.com/clerk/clerk-sdk-python/blob/master/docs/sdks/users/README.md#update) - Update a user
198
+ * [delete](https://github.com/clerk/clerk-sdk-python/blob/master/docs/sdks/users/README.md#delete) - Delete a user
199
+ * [ban](https://github.com/clerk/clerk-sdk-python/blob/master/docs/sdks/users/README.md#ban) - Ban a user
200
+ * [unban](https://github.com/clerk/clerk-sdk-python/blob/master/docs/sdks/users/README.md#unban) - Unban a user
201
+ * [lock](https://github.com/clerk/clerk-sdk-python/blob/master/docs/sdks/users/README.md#lock) - Lock a user
202
+ * [unlock](https://github.com/clerk/clerk-sdk-python/blob/master/docs/sdks/users/README.md#unlock) - Unlock a user
203
+ * [set_profile_image](https://github.com/clerk/clerk-sdk-python/blob/master/docs/sdks/users/README.md#set_profile_image) - Set user profile image
204
+ * [delete_profile_image](https://github.com/clerk/clerk-sdk-python/blob/master/docs/sdks/users/README.md#delete_profile_image) - Delete user profile image
205
+ * [update_metadata](https://github.com/clerk/clerk-sdk-python/blob/master/docs/sdks/users/README.md#update_metadata) - Merge and update a user's metadata
206
+ * [get_o_auth_access_token](https://github.com/clerk/clerk-sdk-python/blob/master/docs/sdks/users/README.md#get_o_auth_access_token) - Retrieve the OAuth access token of a user
207
+ * [get_organization_memberships](https://github.com/clerk/clerk-sdk-python/blob/master/docs/sdks/users/README.md#get_organization_memberships) - Retrieve all memberships for a user
208
+ * [verify_password](https://github.com/clerk/clerk-sdk-python/blob/master/docs/sdks/users/README.md#verify_password) - Verify the password of a user
209
+ * [verify_totp](https://github.com/clerk/clerk-sdk-python/blob/master/docs/sdks/users/README.md#verify_totp) - Verify a TOTP or backup code for a user
210
+ * [disable_mfa](https://github.com/clerk/clerk-sdk-python/blob/master/docs/sdks/users/README.md#disable_mfa) - Disable a user's MFA methods
211
+
212
+ ### [invitations](https://github.com/clerk/clerk-sdk-python/blob/master/docs/sdks/invitations/README.md)
213
+
214
+ * [create](https://github.com/clerk/clerk-sdk-python/blob/master/docs/sdks/invitations/README.md#create) - Create an invitation
215
+ * [list](https://github.com/clerk/clerk-sdk-python/blob/master/docs/sdks/invitations/README.md#list) - List all invitations
216
+ * [revoke](https://github.com/clerk/clerk-sdk-python/blob/master/docs/sdks/invitations/README.md#revoke) - Revokes an invitation
217
+
218
+ ### [allowlist_identifiers](https://github.com/clerk/clerk-sdk-python/blob/master/docs/sdks/allowlistidentifiers/README.md)
219
+
220
+ * [list](https://github.com/clerk/clerk-sdk-python/blob/master/docs/sdks/allowlistidentifiers/README.md#list) - List all identifiers on the allow-list
221
+ * [create](https://github.com/clerk/clerk-sdk-python/blob/master/docs/sdks/allowlistidentifiers/README.md#create) - Add identifier to the allow-list
222
+ * [delete](https://github.com/clerk/clerk-sdk-python/blob/master/docs/sdks/allowlistidentifiers/README.md#delete) - Delete identifier from allow-list
223
+
224
+ ### [blocklist_identifiers](https://github.com/clerk/clerk-sdk-python/blob/master/docs/sdks/blocklistidentifierssdk/README.md)
225
+
226
+ * [list](https://github.com/clerk/clerk-sdk-python/blob/master/docs/sdks/blocklistidentifierssdk/README.md#list) - List all identifiers on the block-list
227
+ * [create](https://github.com/clerk/clerk-sdk-python/blob/master/docs/sdks/blocklistidentifierssdk/README.md#create) - Add identifier to the block-list
228
+ * [delete](https://github.com/clerk/clerk-sdk-python/blob/master/docs/sdks/blocklistidentifierssdk/README.md#delete) - Delete identifier from block-list
229
+
230
+ ### [beta_features](https://github.com/clerk/clerk-sdk-python/blob/master/docs/sdks/betafeatures/README.md)
231
+
232
+ * [update_instance_auth_config](https://github.com/clerk/clerk-sdk-python/blob/master/docs/sdks/betafeatures/README.md#update_instance_auth_config) - Update instance settings
233
+ * [~~update_production_instance_domain~~](https://github.com/clerk/clerk-sdk-python/blob/master/docs/sdks/betafeatures/README.md#update_production_instance_domain) - Update production instance domain :warning: **Deprecated**
234
+ * [change_production_instance_domain](https://github.com/clerk/clerk-sdk-python/blob/master/docs/sdks/betafeatures/README.md#change_production_instance_domain) - Update production instance domain
235
+
236
+ ### [actor_tokens](https://github.com/clerk/clerk-sdk-python/blob/master/docs/sdks/actortokens/README.md)
237
+
238
+ * [create](https://github.com/clerk/clerk-sdk-python/blob/master/docs/sdks/actortokens/README.md#create) - Create actor token
239
+ * [revoke](https://github.com/clerk/clerk-sdk-python/blob/master/docs/sdks/actortokens/README.md#revoke) - Revoke actor token
240
+
241
+ ### [domains](https://github.com/clerk/clerk-sdk-python/blob/master/docs/sdks/domainssdk/README.md)
242
+
243
+ * [list](https://github.com/clerk/clerk-sdk-python/blob/master/docs/sdks/domainssdk/README.md#list) - List all instance domains
244
+ * [add](https://github.com/clerk/clerk-sdk-python/blob/master/docs/sdks/domainssdk/README.md#add) - Add a domain
245
+ * [delete](https://github.com/clerk/clerk-sdk-python/blob/master/docs/sdks/domainssdk/README.md#delete) - Delete a satellite domain
246
+ * [update](https://github.com/clerk/clerk-sdk-python/blob/master/docs/sdks/domainssdk/README.md#update) - Update a domain
247
+
248
+ ### [instance_settings](https://github.com/clerk/clerk-sdk-python/blob/master/docs/sdks/instancesettingssdk/README.md)
249
+
250
+ * [update](https://github.com/clerk/clerk-sdk-python/blob/master/docs/sdks/instancesettingssdk/README.md#update) - Update instance settings
251
+ * [update_restrictions](https://github.com/clerk/clerk-sdk-python/blob/master/docs/sdks/instancesettingssdk/README.md#update_restrictions) - Update instance restrictions
252
+ * [update_organization_settings](https://github.com/clerk/clerk-sdk-python/blob/master/docs/sdks/instancesettingssdk/README.md#update_organization_settings) - Update instance organization settings
253
+
254
+ ### [webhooks](https://github.com/clerk/clerk-sdk-python/blob/master/docs/sdks/webhooks/README.md)
255
+
256
+ * [create_svix_app](https://github.com/clerk/clerk-sdk-python/blob/master/docs/sdks/webhooks/README.md#create_svix_app) - Create a Svix app
257
+ * [delete_svix_app](https://github.com/clerk/clerk-sdk-python/blob/master/docs/sdks/webhooks/README.md#delete_svix_app) - Delete a Svix app
258
+ * [generate_svix_auth_url](https://github.com/clerk/clerk-sdk-python/blob/master/docs/sdks/webhooks/README.md#generate_svix_auth_url) - Create a Svix Dashboard URL
259
+
260
+ ### [jwt_templates](https://github.com/clerk/clerk-sdk-python/blob/master/docs/sdks/jwttemplates/README.md)
261
+
262
+ * [list](https://github.com/clerk/clerk-sdk-python/blob/master/docs/sdks/jwttemplates/README.md#list) - List all templates
263
+ * [create](https://github.com/clerk/clerk-sdk-python/blob/master/docs/sdks/jwttemplates/README.md#create) - Create a JWT template
264
+ * [get](https://github.com/clerk/clerk-sdk-python/blob/master/docs/sdks/jwttemplates/README.md#get) - Retrieve a template
265
+ * [update](https://github.com/clerk/clerk-sdk-python/blob/master/docs/sdks/jwttemplates/README.md#update) - Update a JWT template
266
+ * [delete](https://github.com/clerk/clerk-sdk-python/blob/master/docs/sdks/jwttemplates/README.md#delete) - Delete a Template
267
+
268
+ ### [organizations](https://github.com/clerk/clerk-sdk-python/blob/master/docs/sdks/organizationssdk/README.md)
269
+
270
+ * [list](https://github.com/clerk/clerk-sdk-python/blob/master/docs/sdks/organizationssdk/README.md#list) - Get a list of organizations for an instance
271
+ * [create](https://github.com/clerk/clerk-sdk-python/blob/master/docs/sdks/organizationssdk/README.md#create) - Create an organization
272
+ * [get](https://github.com/clerk/clerk-sdk-python/blob/master/docs/sdks/organizationssdk/README.md#get) - Retrieve an organization by ID or slug
273
+ * [update](https://github.com/clerk/clerk-sdk-python/blob/master/docs/sdks/organizationssdk/README.md#update) - Update an organization
274
+ * [delete](https://github.com/clerk/clerk-sdk-python/blob/master/docs/sdks/organizationssdk/README.md#delete) - Delete an organization
275
+ * [merge_metadata](https://github.com/clerk/clerk-sdk-python/blob/master/docs/sdks/organizationssdk/README.md#merge_metadata) - Merge and update metadata for an organization
276
+ * [upload_logo](https://github.com/clerk/clerk-sdk-python/blob/master/docs/sdks/organizationssdk/README.md#upload_logo) - Upload a logo for the organization
277
+ * [delete_logo](https://github.com/clerk/clerk-sdk-python/blob/master/docs/sdks/organizationssdk/README.md#delete_logo) - Delete the organization's logo.
278
+
279
+ ### [organization_invitations](https://github.com/clerk/clerk-sdk-python/blob/master/docs/sdks/organizationinvitationssdk/README.md)
280
+
281
+ * [create](https://github.com/clerk/clerk-sdk-python/blob/master/docs/sdks/organizationinvitationssdk/README.md#create) - Create and send an organization invitation
282
+ * [list](https://github.com/clerk/clerk-sdk-python/blob/master/docs/sdks/organizationinvitationssdk/README.md#list) - Get a list of organization invitations
283
+ * [create_bulk](https://github.com/clerk/clerk-sdk-python/blob/master/docs/sdks/organizationinvitationssdk/README.md#create_bulk) - Bulk create and send organization invitations
284
+ * [~~list_pending~~](https://github.com/clerk/clerk-sdk-python/blob/master/docs/sdks/organizationinvitationssdk/README.md#list_pending) - Get a list of pending organization invitations :warning: **Deprecated**
285
+ * [get](https://github.com/clerk/clerk-sdk-python/blob/master/docs/sdks/organizationinvitationssdk/README.md#get) - Retrieve an organization invitation by ID
286
+ * [revoke](https://github.com/clerk/clerk-sdk-python/blob/master/docs/sdks/organizationinvitationssdk/README.md#revoke) - Revoke a pending organization invitation
287
+
288
+ ### [organization_memberships](https://github.com/clerk/clerk-sdk-python/blob/master/docs/sdks/organizationmembershipssdk/README.md)
289
+
290
+ * [create](https://github.com/clerk/clerk-sdk-python/blob/master/docs/sdks/organizationmembershipssdk/README.md#create) - Create a new organization membership
291
+ * [list](https://github.com/clerk/clerk-sdk-python/blob/master/docs/sdks/organizationmembershipssdk/README.md#list) - Get a list of all members of an organization
292
+ * [update](https://github.com/clerk/clerk-sdk-python/blob/master/docs/sdks/organizationmembershipssdk/README.md#update) - Update an organization membership
293
+ * [delete](https://github.com/clerk/clerk-sdk-python/blob/master/docs/sdks/organizationmembershipssdk/README.md#delete) - Remove a member from an organization
294
+ * [update_metadata](https://github.com/clerk/clerk-sdk-python/blob/master/docs/sdks/organizationmembershipssdk/README.md#update_metadata) - Merge and update organization membership metadata
295
+
296
+ ### [proxy_checks](https://github.com/clerk/clerk-sdk-python/blob/master/docs/sdks/proxychecks/README.md)
297
+
298
+ * [verify](https://github.com/clerk/clerk-sdk-python/blob/master/docs/sdks/proxychecks/README.md#verify) - Verify the proxy configuration for your domain
299
+
300
+ ### [redirect_urls](https://github.com/clerk/clerk-sdk-python/blob/master/docs/sdks/redirecturls/README.md)
301
+
302
+ * [list](https://github.com/clerk/clerk-sdk-python/blob/master/docs/sdks/redirecturls/README.md#list) - List all redirect URLs
303
+ * [create](https://github.com/clerk/clerk-sdk-python/blob/master/docs/sdks/redirecturls/README.md#create) - Create a redirect URL
304
+ * [get](https://github.com/clerk/clerk-sdk-python/blob/master/docs/sdks/redirecturls/README.md#get) - Retrieve a redirect URL
305
+ * [delete](https://github.com/clerk/clerk-sdk-python/blob/master/docs/sdks/redirecturls/README.md#delete) - Delete a redirect URL
306
+
307
+ ### [sign_in_tokens](https://github.com/clerk/clerk-sdk-python/blob/master/docs/sdks/signintokens/README.md)
308
+
309
+ * [create](https://github.com/clerk/clerk-sdk-python/blob/master/docs/sdks/signintokens/README.md#create) - Create sign-in token
310
+ * [revoke](https://github.com/clerk/clerk-sdk-python/blob/master/docs/sdks/signintokens/README.md#revoke) - Revoke the given sign-in token
311
+
312
+ ### [sign_ups](https://github.com/clerk/clerk-sdk-python/blob/master/docs/sdks/signups/README.md)
313
+
314
+ * [update](https://github.com/clerk/clerk-sdk-python/blob/master/docs/sdks/signups/README.md#update) - Update a sign-up
315
+
316
+ ### [o_auth_applications](https://github.com/clerk/clerk-sdk-python/blob/master/docs/sdks/oauthapplicationssdk/README.md)
317
+
318
+ * [list](https://github.com/clerk/clerk-sdk-python/blob/master/docs/sdks/oauthapplicationssdk/README.md#list) - Get a list of OAuth applications for an instance
319
+ * [create](https://github.com/clerk/clerk-sdk-python/blob/master/docs/sdks/oauthapplicationssdk/README.md#create) - Create an OAuth application
320
+ * [get](https://github.com/clerk/clerk-sdk-python/blob/master/docs/sdks/oauthapplicationssdk/README.md#get) - Retrieve an OAuth application by ID
321
+ * [update](https://github.com/clerk/clerk-sdk-python/blob/master/docs/sdks/oauthapplicationssdk/README.md#update) - Update an OAuth application
322
+ * [delete](https://github.com/clerk/clerk-sdk-python/blob/master/docs/sdks/oauthapplicationssdk/README.md#delete) - Delete an OAuth application
323
+ * [rotate_secret](https://github.com/clerk/clerk-sdk-python/blob/master/docs/sdks/oauthapplicationssdk/README.md#rotate_secret) - Rotate the client secret of the given OAuth application
324
+
325
+ ### [saml_connections](https://github.com/clerk/clerk-sdk-python/blob/master/docs/sdks/samlconnectionssdk/README.md)
326
+
327
+ * [list](https://github.com/clerk/clerk-sdk-python/blob/master/docs/sdks/samlconnectionssdk/README.md#list) - Get a list of SAML Connections for an instance
328
+ * [create](https://github.com/clerk/clerk-sdk-python/blob/master/docs/sdks/samlconnectionssdk/README.md#create) - Create a SAML Connection
329
+ * [get](https://github.com/clerk/clerk-sdk-python/blob/master/docs/sdks/samlconnectionssdk/README.md#get) - Retrieve a SAML Connection by ID
330
+ * [update](https://github.com/clerk/clerk-sdk-python/blob/master/docs/sdks/samlconnectionssdk/README.md#update) - Update a SAML Connection
331
+ * [delete](https://github.com/clerk/clerk-sdk-python/blob/master/docs/sdks/samlconnectionssdk/README.md#delete) - Delete a SAML Connection
332
+
333
+ ### [testing_tokens](https://github.com/clerk/clerk-sdk-python/blob/master/docs/sdks/testingtokens/README.md)
334
+
335
+ * [create](https://github.com/clerk/clerk-sdk-python/blob/master/docs/sdks/testingtokens/README.md#create) - Retrieve a new testing token
336
+ <!-- End Available Resources and Operations [operations] -->
337
+
338
+ <!-- Start Pagination [pagination] -->
339
+ ## Pagination
340
+
341
+ Some of the endpoints in this SDK support pagination. To use pagination, you make your SDK calls as usual, but the
342
+ returned response object will have a `Next` method that can be called to pull down the next group of results. If the
343
+ return value of `Next` is `None`, then there are no more pages to be fetched.
344
+
345
+ Here's an example of one such pagination call:
346
+ ```python
347
+ from clerk_backend_api import Clerk
348
+
349
+ s = Clerk(
350
+ bearer_auth="<YOUR_BEARER_TOKEN_HERE>",
351
+ )
352
+
353
+
354
+ res = s.clients.list(limit=20, offset=10)
355
+
356
+ if res is not None:
357
+ while True:
358
+ # handle items
359
+
360
+ res = res.Next()
361
+ if res is None:
362
+ break
363
+
364
+
365
+ ```
366
+ <!-- End Pagination [pagination] -->
367
+
368
+ <!-- Start File uploads [file-upload] -->
369
+ ## File uploads
370
+
371
+ Certain SDK methods accept file objects as part of a request body or multi-part request. It is possible and typically recommended to upload files as a stream rather than reading the entire contents into memory. This avoids excessive memory consumption and potentially crashing with out-of-memory errors when working with very large files. The following example demonstrates how to attach a file stream to a request.
372
+
373
+ > [!TIP]
374
+ >
375
+ > For endpoints that handle file uploads bytes arrays can also be used. However, using streams is recommended for large files.
376
+ >
377
+
378
+ ```python
379
+ from clerk_backend_api import Clerk
380
+
381
+ s = Clerk(
382
+ bearer_auth="<YOUR_BEARER_TOKEN_HERE>",
383
+ )
384
+
385
+
386
+ res = s.users.set_profile_image(user_id="usr_test123", file={
387
+ "file_name": "your_file_here",
388
+ "content": open("<file_path>", "rb"),
389
+ "content_type": "<value>",
390
+ })
391
+
392
+ if res is not None:
393
+ # handle response
394
+ pass
395
+
396
+ ```
397
+ <!-- End File uploads [file-upload] -->
398
+
399
+ <!-- Start Retries [retries] -->
400
+ ## Retries
401
+
402
+ Some of the endpoints in this SDK support retries. If you use the SDK without any configuration, it will fall back to the default retry strategy provided by the API. However, the default retry strategy can be overridden on a per-operation basis, or across the entire SDK.
403
+
404
+ To change the default retry strategy for a single API call, simply provide a `RetryConfig` object to the call:
405
+ ```python
406
+ from clerk.utils import BackoffStrategy, RetryConfig
407
+ from clerk_backend_api import Clerk
408
+
409
+ s = Clerk()
410
+
411
+
412
+ s.misc.get_public_interstitial(frontend_api="frontend-api_1a2b3c4d", publishable_key="pub_1a2b3c4d",
413
+ RetryConfig("backoff", BackoffStrategy(1, 50, 1.1, 100), False))
414
+
415
+ # Use the SDK ...
416
+
417
+ ```
418
+
419
+ If you'd like to override the default retry strategy for all operations that support retries, you can use the `retry_config` optional parameter when initializing the SDK:
420
+ ```python
421
+ from clerk.utils import BackoffStrategy, RetryConfig
422
+ from clerk_backend_api import Clerk
423
+
424
+ s = Clerk(
425
+ retry_config=RetryConfig("backoff", BackoffStrategy(1, 50, 1.1, 100), False),
426
+ )
427
+
428
+
429
+ s.misc.get_public_interstitial(frontend_api="frontend-api_1a2b3c4d", publishable_key="pub_1a2b3c4d")
430
+
431
+ # Use the SDK ...
432
+
433
+ ```
434
+ <!-- End Retries [retries] -->
435
+
436
+ <!-- Start Error Handling [errors] -->
437
+ ## Error Handling
438
+
439
+ Handling errors in this SDK should largely match your expectations. All operations return a response object or raise an error. If Error objects are specified in your OpenAPI Spec, the SDK will raise the appropriate Error type.
440
+
441
+ | Error Object | Status Code | Content Type |
442
+ | ------------------ | ------------------ | ------------------ |
443
+ | models.ClerkErrors | 400,401,410,422 | application/json |
444
+ | models.SDKError | 4xx-5xx | */* |
445
+
446
+ ### Example
447
+
448
+ ```python
449
+ from clerk_backend_api import Clerk, models
450
+
451
+ s = Clerk(
452
+ bearer_auth="<YOUR_BEARER_TOKEN_HERE>",
453
+ )
454
+
455
+ res = None
456
+ try:
457
+ res = s.clients.list(limit=20, offset=10)
458
+
459
+ except models.ClerkErrors as e:
460
+ # handle e.data: models.ClerkErrorsData
461
+ raise(e)
462
+ except models.SDKError as e:
463
+ # handle exception
464
+ raise(e)
465
+
466
+ if res is not None:
467
+ while True:
468
+ # handle items
469
+
470
+ res = res.Next()
471
+ if res is None:
472
+ break
473
+
474
+
475
+ ```
476
+ <!-- End Error Handling [errors] -->
477
+
478
+ <!-- Start Server Selection [server] -->
479
+ ## Server Selection
480
+
481
+ ### Select Server by Index
482
+
483
+ You can override the default server globally by passing a server index to the `server_idx: int` optional parameter when initializing the SDK client instance. The selected server will then be used as the default on the operations that use it. This table lists the indexes associated with the available servers:
484
+
485
+ | # | Server | Variables |
486
+ | - | ------ | --------- |
487
+ | 0 | `https://api.clerk.com/v1` | None |
488
+
489
+ #### Example
490
+
491
+ ```python
492
+ from clerk_backend_api import Clerk
493
+
494
+ s = Clerk(
495
+ server_idx=0,
496
+ )
497
+
498
+
499
+ s.misc.get_public_interstitial(frontend_api="frontend-api_1a2b3c4d", publishable_key="pub_1a2b3c4d")
500
+
501
+ # Use the SDK ...
502
+
503
+ ```
504
+
505
+
506
+ ### Override Server URL Per-Client
507
+
508
+ The default server can also be overridden globally by passing a URL to the `server_url: str` optional parameter when initializing the SDK client instance. For example:
509
+ ```python
510
+ from clerk_backend_api import Clerk
511
+
512
+ s = Clerk(
513
+ server_url="https://api.clerk.com/v1",
514
+ )
515
+
516
+
517
+ s.misc.get_public_interstitial(frontend_api="frontend-api_1a2b3c4d", publishable_key="pub_1a2b3c4d")
518
+
519
+ # Use the SDK ...
520
+
521
+ ```
522
+ <!-- End Server Selection [server] -->
523
+
524
+ <!-- Start Custom HTTP Client [http-client] -->
525
+ ## Custom HTTP Client
526
+
527
+ The Python SDK makes API calls using the [httpx](https://www.python-httpx.org/) HTTP library. In order to provide a convenient way to configure timeouts, cookies, proxies, custom headers, and other low-level configuration, you can initialize the SDK client with your own HTTP client instance.
528
+ Depending on whether you are using the sync or async version of the SDK, you can pass an instance of `HttpClient` or `AsyncHttpClient` respectively, which are Protocol's ensuring that the client has the necessary methods to make API calls.
529
+ This allows you to wrap the client with your own custom logic, such as adding custom headers, logging, or error handling, or you can just pass an instance of `httpx.Client` or `httpx.AsyncClient` directly.
530
+
531
+ For example, you could specify a header for every request that this sdk makes as follows:
532
+ ```python
533
+ from clerk_backend_api import Clerk
534
+ import httpx
535
+
536
+ http_client = httpx.Client(headers={"x-custom-header": "someValue"})
537
+ s = Clerk(client=http_client)
538
+ ```
539
+
540
+ or you could wrap the client with your own custom logic:
541
+ ```python
542
+ from clerk_backend_api import Clerk
543
+ from clerk_backend_api.httpclient import AsyncHttpClient
544
+ import httpx
545
+
546
+ class CustomClient(AsyncHttpClient):
547
+ client: AsyncHttpClient
548
+
549
+ def __init__(self, client: AsyncHttpClient):
550
+ self.client = client
551
+
552
+ async def send(
553
+ self,
554
+ request: httpx.Request,
555
+ *,
556
+ stream: bool = False,
557
+ auth: Union[
558
+ httpx._types.AuthTypes, httpx._client.UseClientDefault, None
559
+ ] = httpx.USE_CLIENT_DEFAULT,
560
+ follow_redirects: Union[
561
+ bool, httpx._client.UseClientDefault
562
+ ] = httpx.USE_CLIENT_DEFAULT,
563
+ ) -> httpx.Response:
564
+ request.headers["Client-Level-Header"] = "added by client"
565
+
566
+ return await self.client.send(
567
+ request, stream=stream, auth=auth, follow_redirects=follow_redirects
568
+ )
569
+
570
+ def build_request(
571
+ self,
572
+ method: str,
573
+ url: httpx._types.URLTypes,
574
+ *,
575
+ content: Optional[httpx._types.RequestContent] = None,
576
+ data: Optional[httpx._types.RequestData] = None,
577
+ files: Optional[httpx._types.RequestFiles] = None,
578
+ json: Optional[Any] = None,
579
+ params: Optional[httpx._types.QueryParamTypes] = None,
580
+ headers: Optional[httpx._types.HeaderTypes] = None,
581
+ cookies: Optional[httpx._types.CookieTypes] = None,
582
+ timeout: Union[
583
+ httpx._types.TimeoutTypes, httpx._client.UseClientDefault
584
+ ] = httpx.USE_CLIENT_DEFAULT,
585
+ extensions: Optional[httpx._types.RequestExtensions] = None,
586
+ ) -> httpx.Request:
587
+ return self.client.build_request(
588
+ method,
589
+ url,
590
+ content=content,
591
+ data=data,
592
+ files=files,
593
+ json=json,
594
+ params=params,
595
+ headers=headers,
596
+ cookies=cookies,
597
+ timeout=timeout,
598
+ extensions=extensions,
599
+ )
600
+
601
+ s = Clerk(async_client=CustomClient(httpx.AsyncClient()))
602
+ ```
603
+ <!-- End Custom HTTP Client [http-client] -->
604
+
605
+ <!-- Start Authentication [security] -->
606
+ ## Authentication
607
+
608
+ ### Per-Client Security Schemes
609
+
610
+ This SDK supports the following security scheme globally:
611
+
612
+ | Name | Type | Scheme |
613
+ | ------------- | ------------- | ------------- |
614
+ | `bearer_auth` | http | HTTP Bearer |
615
+
616
+ To authenticate with the API the `bearer_auth` parameter must be set when initializing the SDK client instance. For example:
617
+ ```python
618
+ from clerk_backend_api import Clerk
619
+
620
+ s = Clerk(
621
+ bearer_auth="<YOUR_BEARER_TOKEN_HERE>",
622
+ )
623
+
624
+
625
+ s.misc.get_public_interstitial(frontend_api="frontend-api_1a2b3c4d", publishable_key="pub_1a2b3c4d")
626
+
627
+ # Use the SDK ...
628
+
629
+ ```
630
+ <!-- End Authentication [security] -->
631
+
632
+ <!-- Start Debugging [debug] -->
633
+ ## Debugging
634
+
635
+ You can setup your SDK to emit debug logs for SDK requests and responses.
636
+
637
+ You can pass your own logger class directly into your SDK.
638
+ ```python
639
+ from clerk_backend_api import Clerk
640
+ import logging
641
+
642
+ logging.basicConfig(level=logging.DEBUG)
643
+ s = Clerk(debug_logger=logging.getLogger("clerk_backend_api"))
644
+ ```
645
+ <!-- End Debugging [debug] -->
646
+
647
+ <!-- Placeholder for Future Speakeasy SDK Sections -->
648
+
649
+ # Development
650
+
651
+ ## Maturity
652
+
653
+ This SDK is in beta, and there may be breaking changes between versions without a major version update. Therefore, we recommend pinning usage
654
+ to a specific package version. This way, you can install the same version each time without breaking changes unless you are intentionally
655
+ looking for the latest version.
656
+
657
+ ## Contributions
658
+
659
+ While we value open-source contributions to this SDK, this library is generated programmatically. Any manual changes added to internal files will be overwritten on the next generation.
660
+ We look forward to hearing your feedback. Feel free to open a PR or an issue with a proof of concept and we'll do our best to include it in a future release.
661
+
662
+ ### SDK Created by [Speakeasy](https://docs.speakeasyapi.dev/docs/using-speakeasy/client-sdks)
663
+