@steerable/runtime-darwin-arm64 0.0.0-stage → 0.9.0

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 (2192) hide show
  1. package/bin/steerable-egress-proxy +0 -0
  2. package/package.json +25 -4
  3. package/python-runtime/manifest.json +8 -0
  4. package/python-runtime/python/bin/2to3 +7 -0
  5. package/python-runtime/python/bin/2to3-3.12 +7 -0
  6. package/python-runtime/python/bin/cffi-gen-src +6 -0
  7. package/python-runtime/python/bin/dotenv +6 -0
  8. package/python-runtime/python/bin/httpx +6 -0
  9. package/python-runtime/python/bin/idle3 +7 -0
  10. package/python-runtime/python/bin/idle3.12 +7 -0
  11. package/python-runtime/python/bin/idna +6 -0
  12. package/python-runtime/python/bin/jsonschema +6 -0
  13. package/python-runtime/python/bin/mcp +6 -0
  14. package/python-runtime/python/bin/pydoc3 +7 -0
  15. package/python-runtime/python/bin/pydoc3.12 +7 -0
  16. package/python-runtime/python/bin/python +0 -0
  17. package/python-runtime/python/bin/python3 +0 -0
  18. package/python-runtime/python/bin/python3-config +76 -0
  19. package/python-runtime/python/bin/python3.12 +0 -0
  20. package/python-runtime/python/bin/python3.12-config +76 -0
  21. package/python-runtime/python/bin/steerable-sidecar +6 -0
  22. package/python-runtime/python/bin/steerable-sidecar-acp +6 -0
  23. package/python-runtime/python/bin/steerable-sidecar-headless +6 -0
  24. package/python-runtime/python/bin/uvicorn +6 -0
  25. package/python-runtime/python/include/python3.12/Python.h +109 -0
  26. package/python-runtime/python/include/python3.12/abstract.h +899 -0
  27. package/python-runtime/python/include/python3.12/bltinmodule.h +14 -0
  28. package/python-runtime/python/include/python3.12/boolobject.h +42 -0
  29. package/python-runtime/python/include/python3.12/bytearrayobject.h +44 -0
  30. package/python-runtime/python/include/python3.12/bytesobject.h +69 -0
  31. package/python-runtime/python/include/python3.12/ceval.h +168 -0
  32. package/python-runtime/python/include/python3.12/codecs.h +248 -0
  33. package/python-runtime/python/include/python3.12/compile.h +22 -0
  34. package/python-runtime/python/include/python3.12/complexobject.h +30 -0
  35. package/python-runtime/python/include/python3.12/cpython/abstract.h +206 -0
  36. package/python-runtime/python/include/python3.12/cpython/bytearrayobject.h +34 -0
  37. package/python-runtime/python/include/python3.12/cpython/bytesobject.h +133 -0
  38. package/python-runtime/python/include/python3.12/cpython/cellobject.h +44 -0
  39. package/python-runtime/python/include/python3.12/cpython/ceval.h +35 -0
  40. package/python-runtime/python/include/python3.12/cpython/classobject.h +71 -0
  41. package/python-runtime/python/include/python3.12/cpython/code.h +389 -0
  42. package/python-runtime/python/include/python3.12/cpython/compile.h +69 -0
  43. package/python-runtime/python/include/python3.12/cpython/complexobject.h +44 -0
  44. package/python-runtime/python/include/python3.12/cpython/context.h +78 -0
  45. package/python-runtime/python/include/python3.12/cpython/descrobject.h +64 -0
  46. package/python-runtime/python/include/python3.12/cpython/dictobject.h +118 -0
  47. package/python-runtime/python/include/python3.12/cpython/fileobject.h +19 -0
  48. package/python-runtime/python/include/python3.12/cpython/fileutils.h +8 -0
  49. package/python-runtime/python/include/python3.12/cpython/floatobject.h +27 -0
  50. package/python-runtime/python/include/python3.12/cpython/frameobject.h +29 -0
  51. package/python-runtime/python/include/python3.12/cpython/funcobject.h +190 -0
  52. package/python-runtime/python/include/python3.12/cpython/genobject.h +89 -0
  53. package/python-runtime/python/include/python3.12/cpython/import.h +46 -0
  54. package/python-runtime/python/include/python3.12/cpython/initconfig.h +256 -0
  55. package/python-runtime/python/include/python3.12/cpython/interpreteridobject.h +11 -0
  56. package/python-runtime/python/include/python3.12/cpython/listobject.h +47 -0
  57. package/python-runtime/python/include/python3.12/cpython/longintrepr.h +133 -0
  58. package/python-runtime/python/include/python3.12/cpython/longobject.h +100 -0
  59. package/python-runtime/python/include/python3.12/cpython/memoryobject.h +52 -0
  60. package/python-runtime/python/include/python3.12/cpython/methodobject.h +66 -0
  61. package/python-runtime/python/include/python3.12/cpython/modsupport.h +109 -0
  62. package/python-runtime/python/include/python3.12/cpython/object.h +575 -0
  63. package/python-runtime/python/include/python3.12/cpython/objimpl.h +95 -0
  64. package/python-runtime/python/include/python3.12/cpython/odictobject.h +43 -0
  65. package/python-runtime/python/include/python3.12/cpython/picklebufobject.h +31 -0
  66. package/python-runtime/python/include/python3.12/cpython/pthread_stubs.h +88 -0
  67. package/python-runtime/python/include/python3.12/cpython/pyctype.h +39 -0
  68. package/python-runtime/python/include/python3.12/cpython/pydebug.h +38 -0
  69. package/python-runtime/python/include/python3.12/cpython/pyerrors.h +178 -0
  70. package/python-runtime/python/include/python3.12/cpython/pyfpe.h +15 -0
  71. package/python-runtime/python/include/python3.12/cpython/pyframe.h +35 -0
  72. package/python-runtime/python/include/python3.12/cpython/pylifecycle.h +111 -0
  73. package/python-runtime/python/include/python3.12/cpython/pymem.h +98 -0
  74. package/python-runtime/python/include/python3.12/cpython/pystate.h +456 -0
  75. package/python-runtime/python/include/python3.12/cpython/pythonrun.h +121 -0
  76. package/python-runtime/python/include/python3.12/cpython/pythread.h +42 -0
  77. package/python-runtime/python/include/python3.12/cpython/pytime.h +331 -0
  78. package/python-runtime/python/include/python3.12/cpython/setobject.h +72 -0
  79. package/python-runtime/python/include/python3.12/cpython/sysmodule.h +16 -0
  80. package/python-runtime/python/include/python3.12/cpython/traceback.h +16 -0
  81. package/python-runtime/python/include/python3.12/cpython/tupleobject.h +39 -0
  82. package/python-runtime/python/include/python3.12/cpython/unicodeobject.h +976 -0
  83. package/python-runtime/python/include/python3.12/cpython/warnings.h +20 -0
  84. package/python-runtime/python/include/python3.12/cpython/weakrefobject.h +56 -0
  85. package/python-runtime/python/include/python3.12/datetime.h +267 -0
  86. package/python-runtime/python/include/python3.12/descrobject.h +100 -0
  87. package/python-runtime/python/include/python3.12/dictobject.h +97 -0
  88. package/python-runtime/python/include/python3.12/dynamic_annotations.h +499 -0
  89. package/python-runtime/python/include/python3.12/enumobject.h +17 -0
  90. package/python-runtime/python/include/python3.12/errcode.h +38 -0
  91. package/python-runtime/python/include/python3.12/exports.h +36 -0
  92. package/python-runtime/python/include/python3.12/fileobject.h +49 -0
  93. package/python-runtime/python/include/python3.12/fileutils.h +26 -0
  94. package/python-runtime/python/include/python3.12/floatobject.h +54 -0
  95. package/python-runtime/python/include/python3.12/frameobject.h +20 -0
  96. package/python-runtime/python/include/python3.12/genericaliasobject.h +14 -0
  97. package/python-runtime/python/include/python3.12/import.h +98 -0
  98. package/python-runtime/python/include/python3.12/internal/pycore_abstract.h +25 -0
  99. package/python-runtime/python/include/python3.12/internal/pycore_asdl.h +112 -0
  100. package/python-runtime/python/include/python3.12/internal/pycore_ast.h +922 -0
  101. package/python-runtime/python/include/python3.12/internal/pycore_ast_state.h +265 -0
  102. package/python-runtime/python/include/python3.12/internal/pycore_atexit.h +57 -0
  103. package/python-runtime/python/include/python3.12/internal/pycore_atomic.h +557 -0
  104. package/python-runtime/python/include/python3.12/internal/pycore_atomic_funcs.h +94 -0
  105. package/python-runtime/python/include/python3.12/internal/pycore_bitutils.h +186 -0
  106. package/python-runtime/python/include/python3.12/internal/pycore_blocks_output_buffer.h +317 -0
  107. package/python-runtime/python/include/python3.12/internal/pycore_bytes_methods.h +73 -0
  108. package/python-runtime/python/include/python3.12/internal/pycore_bytesobject.h +47 -0
  109. package/python-runtime/python/include/python3.12/internal/pycore_call.h +133 -0
  110. package/python-runtime/python/include/python3.12/internal/pycore_ceval.h +164 -0
  111. package/python-runtime/python/include/python3.12/internal/pycore_ceval_state.h +103 -0
  112. package/python-runtime/python/include/python3.12/internal/pycore_code.h +496 -0
  113. package/python-runtime/python/include/python3.12/internal/pycore_compile.h +118 -0
  114. package/python-runtime/python/include/python3.12/internal/pycore_condvar.h +99 -0
  115. package/python-runtime/python/include/python3.12/internal/pycore_context.h +71 -0
  116. package/python-runtime/python/include/python3.12/internal/pycore_descrobject.h +26 -0
  117. package/python-runtime/python/include/python3.12/internal/pycore_dict.h +199 -0
  118. package/python-runtime/python/include/python3.12/internal/pycore_dict_state.h +50 -0
  119. package/python-runtime/python/include/python3.12/internal/pycore_dtoa.h +69 -0
  120. package/python-runtime/python/include/python3.12/internal/pycore_emscripten_signal.h +25 -0
  121. package/python-runtime/python/include/python3.12/internal/pycore_exceptions.h +37 -0
  122. package/python-runtime/python/include/python3.12/internal/pycore_faulthandler.h +99 -0
  123. package/python-runtime/python/include/python3.12/internal/pycore_fileutils.h +292 -0
  124. package/python-runtime/python/include/python3.12/internal/pycore_fileutils_windows.h +98 -0
  125. package/python-runtime/python/include/python3.12/internal/pycore_floatobject.h +71 -0
  126. package/python-runtime/python/include/python3.12/internal/pycore_flowgraph.h +120 -0
  127. package/python-runtime/python/include/python3.12/internal/pycore_format.h +27 -0
  128. package/python-runtime/python/include/python3.12/internal/pycore_frame.h +283 -0
  129. package/python-runtime/python/include/python3.12/internal/pycore_function.h +26 -0
  130. package/python-runtime/python/include/python3.12/internal/pycore_gc.h +211 -0
  131. package/python-runtime/python/include/python3.12/internal/pycore_genobject.h +49 -0
  132. package/python-runtime/python/include/python3.12/internal/pycore_getopt.h +22 -0
  133. package/python-runtime/python/include/python3.12/internal/pycore_gil.h +50 -0
  134. package/python-runtime/python/include/python3.12/internal/pycore_global_objects.h +105 -0
  135. package/python-runtime/python/include/python3.12/internal/pycore_global_objects_fini_generated.h +1517 -0
  136. package/python-runtime/python/include/python3.12/internal/pycore_global_strings.h +777 -0
  137. package/python-runtime/python/include/python3.12/internal/pycore_hamt.h +134 -0
  138. package/python-runtime/python/include/python3.12/internal/pycore_hashtable.h +149 -0
  139. package/python-runtime/python/include/python3.12/internal/pycore_import.h +183 -0
  140. package/python-runtime/python/include/python3.12/internal/pycore_initconfig.h +179 -0
  141. package/python-runtime/python/include/python3.12/internal/pycore_instruments.h +106 -0
  142. package/python-runtime/python/include/python3.12/internal/pycore_interp.h +275 -0
  143. package/python-runtime/python/include/python3.12/internal/pycore_intrinsics.h +32 -0
  144. package/python-runtime/python/include/python3.12/internal/pycore_list.h +83 -0
  145. package/python-runtime/python/include/python3.12/internal/pycore_long.h +258 -0
  146. package/python-runtime/python/include/python3.12/internal/pycore_memoryobject.h +18 -0
  147. package/python-runtime/python/include/python3.12/internal/pycore_moduleobject.h +45 -0
  148. package/python-runtime/python/include/python3.12/internal/pycore_namespace.h +20 -0
  149. package/python-runtime/python/include/python3.12/internal/pycore_object.h +455 -0
  150. package/python-runtime/python/include/python3.12/internal/pycore_object_state.h +42 -0
  151. package/python-runtime/python/include/python3.12/internal/pycore_obmalloc.h +700 -0
  152. package/python-runtime/python/include/python3.12/internal/pycore_obmalloc_init.h +73 -0
  153. package/python-runtime/python/include/python3.12/internal/pycore_opcode.h +587 -0
  154. package/python-runtime/python/include/python3.12/internal/pycore_opcode_utils.h +92 -0
  155. package/python-runtime/python/include/python3.12/internal/pycore_parser.h +66 -0
  156. package/python-runtime/python/include/python3.12/internal/pycore_pathconfig.h +24 -0
  157. package/python-runtime/python/include/python3.12/internal/pycore_pyarena.h +64 -0
  158. package/python-runtime/python/include/python3.12/internal/pycore_pyerrors.h +129 -0
  159. package/python-runtime/python/include/python3.12/internal/pycore_pyhash.h +40 -0
  160. package/python-runtime/python/include/python3.12/internal/pycore_pylifecycle.h +99 -0
  161. package/python-runtime/python/include/python3.12/internal/pycore_pymath.h +205 -0
  162. package/python-runtime/python/include/python3.12/internal/pycore_pymem.h +98 -0
  163. package/python-runtime/python/include/python3.12/internal/pycore_pymem_init.h +85 -0
  164. package/python-runtime/python/include/python3.12/internal/pycore_pystate.h +180 -0
  165. package/python-runtime/python/include/python3.12/internal/pycore_pythread.h +81 -0
  166. package/python-runtime/python/include/python3.12/internal/pycore_range.h +21 -0
  167. package/python-runtime/python/include/python3.12/internal/pycore_runtime.h +235 -0
  168. package/python-runtime/python/include/python3.12/internal/pycore_runtime_init.h +188 -0
  169. package/python-runtime/python/include/python3.12/internal/pycore_runtime_init_generated.h +1511 -0
  170. package/python-runtime/python/include/python3.12/internal/pycore_signal.h +98 -0
  171. package/python-runtime/python/include/python3.12/internal/pycore_sliceobject.h +22 -0
  172. package/python-runtime/python/include/python3.12/internal/pycore_strhex.h +36 -0
  173. package/python-runtime/python/include/python3.12/internal/pycore_structseq.h +39 -0
  174. package/python-runtime/python/include/python3.12/internal/pycore_symtable.h +160 -0
  175. package/python-runtime/python/include/python3.12/internal/pycore_sysmodule.h +34 -0
  176. package/python-runtime/python/include/python3.12/internal/pycore_time.h +25 -0
  177. package/python-runtime/python/include/python3.12/internal/pycore_token.h +108 -0
  178. package/python-runtime/python/include/python3.12/internal/pycore_traceback.h +101 -0
  179. package/python-runtime/python/include/python3.12/internal/pycore_tracemalloc.h +123 -0
  180. package/python-runtime/python/include/python3.12/internal/pycore_tuple.h +79 -0
  181. package/python-runtime/python/include/python3.12/internal/pycore_typeobject.h +151 -0
  182. package/python-runtime/python/include/python3.12/internal/pycore_typevarobject.h +24 -0
  183. package/python-runtime/python/include/python3.12/internal/pycore_ucnhash.h +34 -0
  184. package/python-runtime/python/include/python3.12/internal/pycore_unicodeobject.h +86 -0
  185. package/python-runtime/python/include/python3.12/internal/pycore_unicodeobject_generated.h +2832 -0
  186. package/python-runtime/python/include/python3.12/internal/pycore_unionobject.h +23 -0
  187. package/python-runtime/python/include/python3.12/internal/pycore_warnings.h +29 -0
  188. package/python-runtime/python/include/python3.12/interpreteridobject.h +17 -0
  189. package/python-runtime/python/include/python3.12/intrcheck.h +30 -0
  190. package/python-runtime/python/include/python3.12/iterobject.h +27 -0
  191. package/python-runtime/python/include/python3.12/listobject.h +52 -0
  192. package/python-runtime/python/include/python3.12/longobject.h +108 -0
  193. package/python-runtime/python/include/python3.12/marshal.h +31 -0
  194. package/python-runtime/python/include/python3.12/memoryobject.h +34 -0
  195. package/python-runtime/python/include/python3.12/methodobject.h +132 -0
  196. package/python-runtime/python/include/python3.12/modsupport.h +168 -0
  197. package/python-runtime/python/include/python3.12/moduleobject.h +119 -0
  198. package/python-runtime/python/include/python3.12/object.h +993 -0
  199. package/python-runtime/python/include/python3.12/objimpl.h +234 -0
  200. package/python-runtime/python/include/python3.12/opcode.h +271 -0
  201. package/python-runtime/python/include/python3.12/osdefs.h +51 -0
  202. package/python-runtime/python/include/python3.12/osmodule.h +17 -0
  203. package/python-runtime/python/include/python3.12/patchlevel.h +35 -0
  204. package/python-runtime/python/include/python3.12/py_curses.h +99 -0
  205. package/python-runtime/python/include/python3.12/pybuffer.h +145 -0
  206. package/python-runtime/python/include/python3.12/pycapsule.h +59 -0
  207. package/python-runtime/python/include/python3.12/pyconfig.h +1943 -0
  208. package/python-runtime/python/include/python3.12/pydtrace.h +59 -0
  209. package/python-runtime/python/include/python3.12/pyerrors.h +337 -0
  210. package/python-runtime/python/include/python3.12/pyexpat.h +62 -0
  211. package/python-runtime/python/include/python3.12/pyframe.h +26 -0
  212. package/python-runtime/python/include/python3.12/pyhash.h +144 -0
  213. package/python-runtime/python/include/python3.12/pylifecycle.h +78 -0
  214. package/python-runtime/python/include/python3.12/pymacconfig.h +99 -0
  215. package/python-runtime/python/include/python3.12/pymacro.h +172 -0
  216. package/python-runtime/python/include/python3.12/pymath.h +62 -0
  217. package/python-runtime/python/include/python3.12/pymem.h +104 -0
  218. package/python-runtime/python/include/python3.12/pyport.h +782 -0
  219. package/python-runtime/python/include/python3.12/pystate.h +132 -0
  220. package/python-runtime/python/include/python3.12/pystats.h +110 -0
  221. package/python-runtime/python/include/python3.12/pystrcmp.h +23 -0
  222. package/python-runtime/python/include/python3.12/pystrtod.h +46 -0
  223. package/python-runtime/python/include/python3.12/pythonrun.h +49 -0
  224. package/python-runtime/python/include/python3.12/pythread.h +135 -0
  225. package/python-runtime/python/include/python3.12/pytypedefs.h +30 -0
  226. package/python-runtime/python/include/python3.12/rangeobject.h +27 -0
  227. package/python-runtime/python/include/python3.12/setobject.h +49 -0
  228. package/python-runtime/python/include/python3.12/sliceobject.h +65 -0
  229. package/python-runtime/python/include/python3.12/structmember.h +56 -0
  230. package/python-runtime/python/include/python3.12/structseq.h +49 -0
  231. package/python-runtime/python/include/python3.12/sysmodule.h +54 -0
  232. package/python-runtime/python/include/python3.12/traceback.h +26 -0
  233. package/python-runtime/python/include/python3.12/tracemalloc.h +77 -0
  234. package/python-runtime/python/include/python3.12/tupleobject.h +46 -0
  235. package/python-runtime/python/include/python3.12/typeslots.h +88 -0
  236. package/python-runtime/python/include/python3.12/unicodeobject.h +1020 -0
  237. package/python-runtime/python/include/python3.12/warnings.h +45 -0
  238. package/python-runtime/python/include/python3.12/weakrefobject.h +42 -0
  239. package/python-runtime/python/lib/itcl4.3.5/itcl.tcl +151 -0
  240. package/python-runtime/python/lib/itcl4.3.5/itclConfig.sh +67 -0
  241. package/python-runtime/python/lib/itcl4.3.5/itclHullCmds.tcl +562 -0
  242. package/python-runtime/python/lib/itcl4.3.5/itclWidget.tcl +447 -0
  243. package/python-runtime/python/lib/itcl4.3.5/libitcl4.3.5.dylib +0 -0
  244. package/python-runtime/python/lib/itcl4.3.5/libitclstub.a +0 -0
  245. package/python-runtime/python/lib/itcl4.3.5/libitclstub4.3.5.a +0 -0
  246. package/python-runtime/python/lib/itcl4.3.5/libtcl9itcl4.3.5.dylib +0 -0
  247. package/python-runtime/python/lib/itcl4.3.5/pkgIndex.tcl +14 -0
  248. package/python-runtime/python/lib/libpython3.12.dylib +0 -0
  249. package/python-runtime/python/lib/libtcl9.0.dylib +0 -0
  250. package/python-runtime/python/lib/libtcl9tk9.0.dylib +0 -0
  251. package/python-runtime/python/lib/pkgconfig/python-3.12-embed.pc +13 -0
  252. package/python-runtime/python/lib/pkgconfig/python-3.12.pc +13 -0
  253. package/python-runtime/python/lib/pkgconfig/python3-embed.pc +13 -0
  254. package/python-runtime/python/lib/pkgconfig/python3.pc +13 -0
  255. package/python-runtime/python/lib/python3.12/LICENSE.txt +279 -0
  256. package/python-runtime/python/lib/python3.12/__future__.py +147 -0
  257. package/python-runtime/python/lib/python3.12/__hello__.py +16 -0
  258. package/python-runtime/python/lib/python3.12/__phello__/__init__.py +7 -0
  259. package/python-runtime/python/lib/python3.12/__phello__/spam.py +7 -0
  260. package/python-runtime/python/lib/python3.12/_aix_support.py +108 -0
  261. package/python-runtime/python/lib/python3.12/_collections_abc.py +1173 -0
  262. package/python-runtime/python/lib/python3.12/_compat_pickle.py +252 -0
  263. package/python-runtime/python/lib/python3.12/_compression.py +162 -0
  264. package/python-runtime/python/lib/python3.12/_markupbase.py +396 -0
  265. package/python-runtime/python/lib/python3.12/_osx_support.py +579 -0
  266. package/python-runtime/python/lib/python3.12/_py_abc.py +147 -0
  267. package/python-runtime/python/lib/python3.12/_pydatetime.py +2643 -0
  268. package/python-runtime/python/lib/python3.12/_pydecimal.py +6339 -0
  269. package/python-runtime/python/lib/python3.12/_pyio.py +2698 -0
  270. package/python-runtime/python/lib/python3.12/_pylong.py +329 -0
  271. package/python-runtime/python/lib/python3.12/_sitebuiltins.py +103 -0
  272. package/python-runtime/python/lib/python3.12/_strptime.py +664 -0
  273. package/python-runtime/python/lib/python3.12/_sysconfigdata__darwin_darwin.py +984 -0
  274. package/python-runtime/python/lib/python3.12/_threading_local.py +242 -0
  275. package/python-runtime/python/lib/python3.12/_weakrefset.py +205 -0
  276. package/python-runtime/python/lib/python3.12/abc.py +188 -0
  277. package/python-runtime/python/lib/python3.12/aifc.py +984 -0
  278. package/python-runtime/python/lib/python3.12/antigravity.py +17 -0
  279. package/python-runtime/python/lib/python3.12/argparse.py +2650 -0
  280. package/python-runtime/python/lib/python3.12/ast.py +1840 -0
  281. package/python-runtime/python/lib/python3.12/asyncio/__init__.py +47 -0
  282. package/python-runtime/python/lib/python3.12/asyncio/__main__.py +128 -0
  283. package/python-runtime/python/lib/python3.12/asyncio/base_events.py +2024 -0
  284. package/python-runtime/python/lib/python3.12/asyncio/base_futures.py +67 -0
  285. package/python-runtime/python/lib/python3.12/asyncio/base_subprocess.py +285 -0
  286. package/python-runtime/python/lib/python3.12/asyncio/base_tasks.py +94 -0
  287. package/python-runtime/python/lib/python3.12/asyncio/constants.py +41 -0
  288. package/python-runtime/python/lib/python3.12/asyncio/coroutines.py +109 -0
  289. package/python-runtime/python/lib/python3.12/asyncio/events.py +868 -0
  290. package/python-runtime/python/lib/python3.12/asyncio/exceptions.py +62 -0
  291. package/python-runtime/python/lib/python3.12/asyncio/format_helpers.py +76 -0
  292. package/python-runtime/python/lib/python3.12/asyncio/futures.py +430 -0
  293. package/python-runtime/python/lib/python3.12/asyncio/locks.py +586 -0
  294. package/python-runtime/python/lib/python3.12/asyncio/log.py +7 -0
  295. package/python-runtime/python/lib/python3.12/asyncio/mixins.py +21 -0
  296. package/python-runtime/python/lib/python3.12/asyncio/proactor_events.py +897 -0
  297. package/python-runtime/python/lib/python3.12/asyncio/protocols.py +216 -0
  298. package/python-runtime/python/lib/python3.12/asyncio/queues.py +244 -0
  299. package/python-runtime/python/lib/python3.12/asyncio/runners.py +216 -0
  300. package/python-runtime/python/lib/python3.12/asyncio/selector_events.py +1324 -0
  301. package/python-runtime/python/lib/python3.12/asyncio/sslproto.py +929 -0
  302. package/python-runtime/python/lib/python3.12/asyncio/staggered.py +174 -0
  303. package/python-runtime/python/lib/python3.12/asyncio/streams.py +770 -0
  304. package/python-runtime/python/lib/python3.12/asyncio/subprocess.py +229 -0
  305. package/python-runtime/python/lib/python3.12/asyncio/taskgroups.py +268 -0
  306. package/python-runtime/python/lib/python3.12/asyncio/tasks.py +1065 -0
  307. package/python-runtime/python/lib/python3.12/asyncio/threads.py +25 -0
  308. package/python-runtime/python/lib/python3.12/asyncio/timeouts.py +168 -0
  309. package/python-runtime/python/lib/python3.12/asyncio/transports.py +335 -0
  310. package/python-runtime/python/lib/python3.12/asyncio/trsock.py +98 -0
  311. package/python-runtime/python/lib/python3.12/asyncio/unix_events.py +1500 -0
  312. package/python-runtime/python/lib/python3.12/asyncio/windows_events.py +901 -0
  313. package/python-runtime/python/lib/python3.12/asyncio/windows_utils.py +173 -0
  314. package/python-runtime/python/lib/python3.12/base64.py +586 -0
  315. package/python-runtime/python/lib/python3.12/bdb.py +920 -0
  316. package/python-runtime/python/lib/python3.12/bisect.py +118 -0
  317. package/python-runtime/python/lib/python3.12/bz2.py +344 -0
  318. package/python-runtime/python/lib/python3.12/cProfile.py +195 -0
  319. package/python-runtime/python/lib/python3.12/calendar.py +808 -0
  320. package/python-runtime/python/lib/python3.12/cgi.py +1014 -0
  321. package/python-runtime/python/lib/python3.12/cgitb.py +332 -0
  322. package/python-runtime/python/lib/python3.12/chunk.py +173 -0
  323. package/python-runtime/python/lib/python3.12/cmd.py +401 -0
  324. package/python-runtime/python/lib/python3.12/code.py +324 -0
  325. package/python-runtime/python/lib/python3.12/codecs.py +1129 -0
  326. package/python-runtime/python/lib/python3.12/codeop.py +161 -0
  327. package/python-runtime/python/lib/python3.12/collections/__init__.py +1592 -0
  328. package/python-runtime/python/lib/python3.12/collections/abc.py +3 -0
  329. package/python-runtime/python/lib/python3.12/colorsys.py +166 -0
  330. package/python-runtime/python/lib/python3.12/compileall.py +469 -0
  331. package/python-runtime/python/lib/python3.12/concurrent/__init__.py +1 -0
  332. package/python-runtime/python/lib/python3.12/concurrent/futures/__init__.py +54 -0
  333. package/python-runtime/python/lib/python3.12/concurrent/futures/_base.py +654 -0
  334. package/python-runtime/python/lib/python3.12/concurrent/futures/process.py +876 -0
  335. package/python-runtime/python/lib/python3.12/concurrent/futures/thread.py +240 -0
  336. package/python-runtime/python/lib/python3.12/configparser.py +1333 -0
  337. package/python-runtime/python/lib/python3.12/contextlib.py +800 -0
  338. package/python-runtime/python/lib/python3.12/contextvars.py +4 -0
  339. package/python-runtime/python/lib/python3.12/copy.py +292 -0
  340. package/python-runtime/python/lib/python3.12/copyreg.py +217 -0
  341. package/python-runtime/python/lib/python3.12/crypt.py +124 -0
  342. package/python-runtime/python/lib/python3.12/csv.py +451 -0
  343. package/python-runtime/python/lib/python3.12/ctypes/__init__.py +582 -0
  344. package/python-runtime/python/lib/python3.12/ctypes/_aix.py +327 -0
  345. package/python-runtime/python/lib/python3.12/ctypes/_endian.py +78 -0
  346. package/python-runtime/python/lib/python3.12/ctypes/macholib/README.ctypes +7 -0
  347. package/python-runtime/python/lib/python3.12/ctypes/macholib/__init__.py +9 -0
  348. package/python-runtime/python/lib/python3.12/ctypes/macholib/dyld.py +165 -0
  349. package/python-runtime/python/lib/python3.12/ctypes/macholib/dylib.py +42 -0
  350. package/python-runtime/python/lib/python3.12/ctypes/macholib/fetch_macholib +2 -0
  351. package/python-runtime/python/lib/python3.12/ctypes/macholib/fetch_macholib.bat +1 -0
  352. package/python-runtime/python/lib/python3.12/ctypes/macholib/framework.py +42 -0
  353. package/python-runtime/python/lib/python3.12/ctypes/util.py +379 -0
  354. package/python-runtime/python/lib/python3.12/ctypes/wintypes.py +202 -0
  355. package/python-runtime/python/lib/python3.12/curses/__init__.py +101 -0
  356. package/python-runtime/python/lib/python3.12/curses/ascii.py +99 -0
  357. package/python-runtime/python/lib/python3.12/curses/has_key.py +192 -0
  358. package/python-runtime/python/lib/python3.12/curses/panel.py +6 -0
  359. package/python-runtime/python/lib/python3.12/curses/textpad.py +204 -0
  360. package/python-runtime/python/lib/python3.12/dataclasses.py +1588 -0
  361. package/python-runtime/python/lib/python3.12/datetime.py +9 -0
  362. package/python-runtime/python/lib/python3.12/dbm/__init__.py +190 -0
  363. package/python-runtime/python/lib/python3.12/dbm/dumb.py +317 -0
  364. package/python-runtime/python/lib/python3.12/dbm/gnu.py +3 -0
  365. package/python-runtime/python/lib/python3.12/dbm/ndbm.py +3 -0
  366. package/python-runtime/python/lib/python3.12/decimal.py +108 -0
  367. package/python-runtime/python/lib/python3.12/difflib.py +2056 -0
  368. package/python-runtime/python/lib/python3.12/dis.py +805 -0
  369. package/python-runtime/python/lib/python3.12/doctest.py +2845 -0
  370. package/python-runtime/python/lib/python3.12/email/__init__.py +61 -0
  371. package/python-runtime/python/lib/python3.12/email/_encoded_words.py +233 -0
  372. package/python-runtime/python/lib/python3.12/email/_header_value_parser.py +3108 -0
  373. package/python-runtime/python/lib/python3.12/email/_parseaddr.py +557 -0
  374. package/python-runtime/python/lib/python3.12/email/_policybase.py +382 -0
  375. package/python-runtime/python/lib/python3.12/email/architecture.rst +216 -0
  376. package/python-runtime/python/lib/python3.12/email/base64mime.py +115 -0
  377. package/python-runtime/python/lib/python3.12/email/charset.py +398 -0
  378. package/python-runtime/python/lib/python3.12/email/contentmanager.py +251 -0
  379. package/python-runtime/python/lib/python3.12/email/encoders.py +65 -0
  380. package/python-runtime/python/lib/python3.12/email/errors.py +117 -0
  381. package/python-runtime/python/lib/python3.12/email/feedparser.py +534 -0
  382. package/python-runtime/python/lib/python3.12/email/generator.py +530 -0
  383. package/python-runtime/python/lib/python3.12/email/header.py +573 -0
  384. package/python-runtime/python/lib/python3.12/email/headerregistry.py +604 -0
  385. package/python-runtime/python/lib/python3.12/email/iterators.py +68 -0
  386. package/python-runtime/python/lib/python3.12/email/message.py +1215 -0
  387. package/python-runtime/python/lib/python3.12/email/mime/__init__.py +0 -0
  388. package/python-runtime/python/lib/python3.12/email/mime/application.py +37 -0
  389. package/python-runtime/python/lib/python3.12/email/mime/audio.py +100 -0
  390. package/python-runtime/python/lib/python3.12/email/mime/base.py +29 -0
  391. package/python-runtime/python/lib/python3.12/email/mime/image.py +152 -0
  392. package/python-runtime/python/lib/python3.12/email/mime/message.py +33 -0
  393. package/python-runtime/python/lib/python3.12/email/mime/multipart.py +47 -0
  394. package/python-runtime/python/lib/python3.12/email/mime/nonmultipart.py +21 -0
  395. package/python-runtime/python/lib/python3.12/email/mime/text.py +40 -0
  396. package/python-runtime/python/lib/python3.12/email/parser.py +127 -0
  397. package/python-runtime/python/lib/python3.12/email/policy.py +232 -0
  398. package/python-runtime/python/lib/python3.12/email/quoprimime.py +300 -0
  399. package/python-runtime/python/lib/python3.12/email/utils.py +486 -0
  400. package/python-runtime/python/lib/python3.12/encodings/__init__.py +174 -0
  401. package/python-runtime/python/lib/python3.12/encodings/aliases.py +551 -0
  402. package/python-runtime/python/lib/python3.12/encodings/ascii.py +50 -0
  403. package/python-runtime/python/lib/python3.12/encodings/base64_codec.py +55 -0
  404. package/python-runtime/python/lib/python3.12/encodings/big5.py +39 -0
  405. package/python-runtime/python/lib/python3.12/encodings/big5hkscs.py +39 -0
  406. package/python-runtime/python/lib/python3.12/encodings/bz2_codec.py +78 -0
  407. package/python-runtime/python/lib/python3.12/encodings/charmap.py +69 -0
  408. package/python-runtime/python/lib/python3.12/encodings/cp037.py +307 -0
  409. package/python-runtime/python/lib/python3.12/encodings/cp1006.py +307 -0
  410. package/python-runtime/python/lib/python3.12/encodings/cp1026.py +307 -0
  411. package/python-runtime/python/lib/python3.12/encodings/cp1125.py +698 -0
  412. package/python-runtime/python/lib/python3.12/encodings/cp1140.py +307 -0
  413. package/python-runtime/python/lib/python3.12/encodings/cp1250.py +307 -0
  414. package/python-runtime/python/lib/python3.12/encodings/cp1251.py +307 -0
  415. package/python-runtime/python/lib/python3.12/encodings/cp1252.py +307 -0
  416. package/python-runtime/python/lib/python3.12/encodings/cp1253.py +307 -0
  417. package/python-runtime/python/lib/python3.12/encodings/cp1254.py +307 -0
  418. package/python-runtime/python/lib/python3.12/encodings/cp1255.py +307 -0
  419. package/python-runtime/python/lib/python3.12/encodings/cp1256.py +307 -0
  420. package/python-runtime/python/lib/python3.12/encodings/cp1257.py +307 -0
  421. package/python-runtime/python/lib/python3.12/encodings/cp1258.py +307 -0
  422. package/python-runtime/python/lib/python3.12/encodings/cp273.py +307 -0
  423. package/python-runtime/python/lib/python3.12/encodings/cp424.py +307 -0
  424. package/python-runtime/python/lib/python3.12/encodings/cp437.py +698 -0
  425. package/python-runtime/python/lib/python3.12/encodings/cp500.py +307 -0
  426. package/python-runtime/python/lib/python3.12/encodings/cp720.py +309 -0
  427. package/python-runtime/python/lib/python3.12/encodings/cp737.py +698 -0
  428. package/python-runtime/python/lib/python3.12/encodings/cp775.py +697 -0
  429. package/python-runtime/python/lib/python3.12/encodings/cp850.py +698 -0
  430. package/python-runtime/python/lib/python3.12/encodings/cp852.py +698 -0
  431. package/python-runtime/python/lib/python3.12/encodings/cp855.py +698 -0
  432. package/python-runtime/python/lib/python3.12/encodings/cp856.py +307 -0
  433. package/python-runtime/python/lib/python3.12/encodings/cp857.py +694 -0
  434. package/python-runtime/python/lib/python3.12/encodings/cp858.py +698 -0
  435. package/python-runtime/python/lib/python3.12/encodings/cp860.py +698 -0
  436. package/python-runtime/python/lib/python3.12/encodings/cp861.py +698 -0
  437. package/python-runtime/python/lib/python3.12/encodings/cp862.py +698 -0
  438. package/python-runtime/python/lib/python3.12/encodings/cp863.py +698 -0
  439. package/python-runtime/python/lib/python3.12/encodings/cp864.py +690 -0
  440. package/python-runtime/python/lib/python3.12/encodings/cp865.py +698 -0
  441. package/python-runtime/python/lib/python3.12/encodings/cp866.py +698 -0
  442. package/python-runtime/python/lib/python3.12/encodings/cp869.py +689 -0
  443. package/python-runtime/python/lib/python3.12/encodings/cp874.py +307 -0
  444. package/python-runtime/python/lib/python3.12/encodings/cp875.py +307 -0
  445. package/python-runtime/python/lib/python3.12/encodings/cp932.py +39 -0
  446. package/python-runtime/python/lib/python3.12/encodings/cp949.py +39 -0
  447. package/python-runtime/python/lib/python3.12/encodings/cp950.py +39 -0
  448. package/python-runtime/python/lib/python3.12/encodings/euc_jis_2004.py +39 -0
  449. package/python-runtime/python/lib/python3.12/encodings/euc_jisx0213.py +39 -0
  450. package/python-runtime/python/lib/python3.12/encodings/euc_jp.py +39 -0
  451. package/python-runtime/python/lib/python3.12/encodings/euc_kr.py +39 -0
  452. package/python-runtime/python/lib/python3.12/encodings/gb18030.py +39 -0
  453. package/python-runtime/python/lib/python3.12/encodings/gb2312.py +39 -0
  454. package/python-runtime/python/lib/python3.12/encodings/gbk.py +39 -0
  455. package/python-runtime/python/lib/python3.12/encodings/hex_codec.py +55 -0
  456. package/python-runtime/python/lib/python3.12/encodings/hp_roman8.py +314 -0
  457. package/python-runtime/python/lib/python3.12/encodings/hz.py +39 -0
  458. package/python-runtime/python/lib/python3.12/encodings/idna.py +317 -0
  459. package/python-runtime/python/lib/python3.12/encodings/iso2022_jp.py +39 -0
  460. package/python-runtime/python/lib/python3.12/encodings/iso2022_jp_1.py +39 -0
  461. package/python-runtime/python/lib/python3.12/encodings/iso2022_jp_2.py +39 -0
  462. package/python-runtime/python/lib/python3.12/encodings/iso2022_jp_2004.py +39 -0
  463. package/python-runtime/python/lib/python3.12/encodings/iso2022_jp_3.py +39 -0
  464. package/python-runtime/python/lib/python3.12/encodings/iso2022_jp_ext.py +39 -0
  465. package/python-runtime/python/lib/python3.12/encodings/iso2022_kr.py +39 -0
  466. package/python-runtime/python/lib/python3.12/encodings/iso8859_1.py +307 -0
  467. package/python-runtime/python/lib/python3.12/encodings/iso8859_10.py +307 -0
  468. package/python-runtime/python/lib/python3.12/encodings/iso8859_11.py +307 -0
  469. package/python-runtime/python/lib/python3.12/encodings/iso8859_13.py +307 -0
  470. package/python-runtime/python/lib/python3.12/encodings/iso8859_14.py +307 -0
  471. package/python-runtime/python/lib/python3.12/encodings/iso8859_15.py +307 -0
  472. package/python-runtime/python/lib/python3.12/encodings/iso8859_16.py +307 -0
  473. package/python-runtime/python/lib/python3.12/encodings/iso8859_2.py +307 -0
  474. package/python-runtime/python/lib/python3.12/encodings/iso8859_3.py +307 -0
  475. package/python-runtime/python/lib/python3.12/encodings/iso8859_4.py +307 -0
  476. package/python-runtime/python/lib/python3.12/encodings/iso8859_5.py +307 -0
  477. package/python-runtime/python/lib/python3.12/encodings/iso8859_6.py +307 -0
  478. package/python-runtime/python/lib/python3.12/encodings/iso8859_7.py +307 -0
  479. package/python-runtime/python/lib/python3.12/encodings/iso8859_8.py +307 -0
  480. package/python-runtime/python/lib/python3.12/encodings/iso8859_9.py +307 -0
  481. package/python-runtime/python/lib/python3.12/encodings/johab.py +39 -0
  482. package/python-runtime/python/lib/python3.12/encodings/koi8_r.py +307 -0
  483. package/python-runtime/python/lib/python3.12/encodings/koi8_t.py +308 -0
  484. package/python-runtime/python/lib/python3.12/encodings/koi8_u.py +307 -0
  485. package/python-runtime/python/lib/python3.12/encodings/kz1048.py +307 -0
  486. package/python-runtime/python/lib/python3.12/encodings/latin_1.py +50 -0
  487. package/python-runtime/python/lib/python3.12/encodings/mac_arabic.py +698 -0
  488. package/python-runtime/python/lib/python3.12/encodings/mac_croatian.py +307 -0
  489. package/python-runtime/python/lib/python3.12/encodings/mac_cyrillic.py +307 -0
  490. package/python-runtime/python/lib/python3.12/encodings/mac_farsi.py +307 -0
  491. package/python-runtime/python/lib/python3.12/encodings/mac_greek.py +307 -0
  492. package/python-runtime/python/lib/python3.12/encodings/mac_iceland.py +307 -0
  493. package/python-runtime/python/lib/python3.12/encodings/mac_latin2.py +312 -0
  494. package/python-runtime/python/lib/python3.12/encodings/mac_roman.py +307 -0
  495. package/python-runtime/python/lib/python3.12/encodings/mac_romanian.py +307 -0
  496. package/python-runtime/python/lib/python3.12/encodings/mac_turkish.py +307 -0
  497. package/python-runtime/python/lib/python3.12/encodings/mbcs.py +47 -0
  498. package/python-runtime/python/lib/python3.12/encodings/oem.py +41 -0
  499. package/python-runtime/python/lib/python3.12/encodings/palmos.py +308 -0
  500. package/python-runtime/python/lib/python3.12/encodings/ptcp154.py +312 -0
  501. package/python-runtime/python/lib/python3.12/encodings/punycode.py +237 -0
  502. package/python-runtime/python/lib/python3.12/encodings/quopri_codec.py +56 -0
  503. package/python-runtime/python/lib/python3.12/encodings/raw_unicode_escape.py +46 -0
  504. package/python-runtime/python/lib/python3.12/encodings/rot_13.py +113 -0
  505. package/python-runtime/python/lib/python3.12/encodings/shift_jis.py +39 -0
  506. package/python-runtime/python/lib/python3.12/encodings/shift_jis_2004.py +39 -0
  507. package/python-runtime/python/lib/python3.12/encodings/shift_jisx0213.py +39 -0
  508. package/python-runtime/python/lib/python3.12/encodings/tis_620.py +307 -0
  509. package/python-runtime/python/lib/python3.12/encodings/undefined.py +49 -0
  510. package/python-runtime/python/lib/python3.12/encodings/unicode_escape.py +46 -0
  511. package/python-runtime/python/lib/python3.12/encodings/utf_16.py +155 -0
  512. package/python-runtime/python/lib/python3.12/encodings/utf_16_be.py +42 -0
  513. package/python-runtime/python/lib/python3.12/encodings/utf_16_le.py +42 -0
  514. package/python-runtime/python/lib/python3.12/encodings/utf_32.py +150 -0
  515. package/python-runtime/python/lib/python3.12/encodings/utf_32_be.py +37 -0
  516. package/python-runtime/python/lib/python3.12/encodings/utf_32_le.py +37 -0
  517. package/python-runtime/python/lib/python3.12/encodings/utf_7.py +38 -0
  518. package/python-runtime/python/lib/python3.12/encodings/utf_8.py +42 -0
  519. package/python-runtime/python/lib/python3.12/encodings/utf_8_sig.py +130 -0
  520. package/python-runtime/python/lib/python3.12/encodings/uu_codec.py +103 -0
  521. package/python-runtime/python/lib/python3.12/encodings/zlib_codec.py +77 -0
  522. package/python-runtime/python/lib/python3.12/enum.py +2108 -0
  523. package/python-runtime/python/lib/python3.12/filecmp.py +315 -0
  524. package/python-runtime/python/lib/python3.12/fileinput.py +442 -0
  525. package/python-runtime/python/lib/python3.12/fnmatch.py +185 -0
  526. package/python-runtime/python/lib/python3.12/fractions.py +990 -0
  527. package/python-runtime/python/lib/python3.12/ftplib.py +966 -0
  528. package/python-runtime/python/lib/python3.12/functools.py +1009 -0
  529. package/python-runtime/python/lib/python3.12/genericpath.py +176 -0
  530. package/python-runtime/python/lib/python3.12/getopt.py +215 -0
  531. package/python-runtime/python/lib/python3.12/getpass.py +185 -0
  532. package/python-runtime/python/lib/python3.12/gettext.py +646 -0
  533. package/python-runtime/python/lib/python3.12/glob.py +252 -0
  534. package/python-runtime/python/lib/python3.12/graphlib.py +250 -0
  535. package/python-runtime/python/lib/python3.12/gzip.py +711 -0
  536. package/python-runtime/python/lib/python3.12/hashlib.py +253 -0
  537. package/python-runtime/python/lib/python3.12/heapq.py +603 -0
  538. package/python-runtime/python/lib/python3.12/hmac.py +219 -0
  539. package/python-runtime/python/lib/python3.12/html/__init__.py +132 -0
  540. package/python-runtime/python/lib/python3.12/html/entities.py +2513 -0
  541. package/python-runtime/python/lib/python3.12/html/parser.py +535 -0
  542. package/python-runtime/python/lib/python3.12/http/__init__.py +200 -0
  543. package/python-runtime/python/lib/python3.12/http/client.py +1570 -0
  544. package/python-runtime/python/lib/python3.12/http/cookiejar.py +2121 -0
  545. package/python-runtime/python/lib/python3.12/http/cookies.py +615 -0
  546. package/python-runtime/python/lib/python3.12/http/server.py +1335 -0
  547. package/python-runtime/python/lib/python3.12/imaplib.py +1641 -0
  548. package/python-runtime/python/lib/python3.12/imghdr.py +180 -0
  549. package/python-runtime/python/lib/python3.12/importlib/__init__.py +138 -0
  550. package/python-runtime/python/lib/python3.12/importlib/_abc.py +39 -0
  551. package/python-runtime/python/lib/python3.12/importlib/_bootstrap.py +1551 -0
  552. package/python-runtime/python/lib/python3.12/importlib/_bootstrap_external.py +1749 -0
  553. package/python-runtime/python/lib/python3.12/importlib/abc.py +239 -0
  554. package/python-runtime/python/lib/python3.12/importlib/machinery.py +20 -0
  555. package/python-runtime/python/lib/python3.12/importlib/metadata/__init__.py +966 -0
  556. package/python-runtime/python/lib/python3.12/importlib/metadata/_adapters.py +89 -0
  557. package/python-runtime/python/lib/python3.12/importlib/metadata/_collections.py +30 -0
  558. package/python-runtime/python/lib/python3.12/importlib/metadata/_functools.py +104 -0
  559. package/python-runtime/python/lib/python3.12/importlib/metadata/_itertools.py +73 -0
  560. package/python-runtime/python/lib/python3.12/importlib/metadata/_meta.py +63 -0
  561. package/python-runtime/python/lib/python3.12/importlib/metadata/_text.py +99 -0
  562. package/python-runtime/python/lib/python3.12/importlib/readers.py +12 -0
  563. package/python-runtime/python/lib/python3.12/importlib/resources/__init__.py +38 -0
  564. package/python-runtime/python/lib/python3.12/importlib/resources/_adapters.py +168 -0
  565. package/python-runtime/python/lib/python3.12/importlib/resources/_common.py +208 -0
  566. package/python-runtime/python/lib/python3.12/importlib/resources/_itertools.py +38 -0
  567. package/python-runtime/python/lib/python3.12/importlib/resources/_legacy.py +98 -0
  568. package/python-runtime/python/lib/python3.12/importlib/resources/abc.py +173 -0
  569. package/python-runtime/python/lib/python3.12/importlib/resources/readers.py +146 -0
  570. package/python-runtime/python/lib/python3.12/importlib/resources/simple.py +106 -0
  571. package/python-runtime/python/lib/python3.12/importlib/simple.py +14 -0
  572. package/python-runtime/python/lib/python3.12/importlib/util.py +270 -0
  573. package/python-runtime/python/lib/python3.12/inspect.py +3433 -0
  574. package/python-runtime/python/lib/python3.12/io.py +99 -0
  575. package/python-runtime/python/lib/python3.12/ipaddress.py +2430 -0
  576. package/python-runtime/python/lib/python3.12/json/__init__.py +359 -0
  577. package/python-runtime/python/lib/python3.12/json/decoder.py +357 -0
  578. package/python-runtime/python/lib/python3.12/json/encoder.py +443 -0
  579. package/python-runtime/python/lib/python3.12/json/scanner.py +73 -0
  580. package/python-runtime/python/lib/python3.12/json/tool.py +85 -0
  581. package/python-runtime/python/lib/python3.12/keyword.py +64 -0
  582. package/python-runtime/python/lib/python3.12/lib-dynload/_crypt.cpython-312-darwin.so +0 -0
  583. package/python-runtime/python/lib/python3.12/lib-dynload/_dbm.cpython-312-darwin.so +0 -0
  584. package/python-runtime/python/lib/python3.12/lib-dynload/_tkinter.cpython-312-darwin.so +0 -0
  585. package/python-runtime/python/lib/python3.12/linecache.py +185 -0
  586. package/python-runtime/python/lib/python3.12/locale.py +1779 -0
  587. package/python-runtime/python/lib/python3.12/logging/__init__.py +2345 -0
  588. package/python-runtime/python/lib/python3.12/logging/config.py +1078 -0
  589. package/python-runtime/python/lib/python3.12/logging/handlers.py +1624 -0
  590. package/python-runtime/python/lib/python3.12/lzma.py +356 -0
  591. package/python-runtime/python/lib/python3.12/mailbox.py +2153 -0
  592. package/python-runtime/python/lib/python3.12/mailcap.py +302 -0
  593. package/python-runtime/python/lib/python3.12/mimetypes.py +656 -0
  594. package/python-runtime/python/lib/python3.12/modulefinder.py +666 -0
  595. package/python-runtime/python/lib/python3.12/multiprocessing/__init__.py +37 -0
  596. package/python-runtime/python/lib/python3.12/multiprocessing/connection.py +1178 -0
  597. package/python-runtime/python/lib/python3.12/multiprocessing/context.py +377 -0
  598. package/python-runtime/python/lib/python3.12/multiprocessing/dummy/__init__.py +126 -0
  599. package/python-runtime/python/lib/python3.12/multiprocessing/dummy/connection.py +75 -0
  600. package/python-runtime/python/lib/python3.12/multiprocessing/forkserver.py +350 -0
  601. package/python-runtime/python/lib/python3.12/multiprocessing/heap.py +337 -0
  602. package/python-runtime/python/lib/python3.12/multiprocessing/managers.py +1387 -0
  603. package/python-runtime/python/lib/python3.12/multiprocessing/pool.py +957 -0
  604. package/python-runtime/python/lib/python3.12/multiprocessing/popen_fork.py +83 -0
  605. package/python-runtime/python/lib/python3.12/multiprocessing/popen_forkserver.py +74 -0
  606. package/python-runtime/python/lib/python3.12/multiprocessing/popen_spawn_posix.py +72 -0
  607. package/python-runtime/python/lib/python3.12/multiprocessing/popen_spawn_win32.py +145 -0
  608. package/python-runtime/python/lib/python3.12/multiprocessing/process.py +439 -0
  609. package/python-runtime/python/lib/python3.12/multiprocessing/queues.py +401 -0
  610. package/python-runtime/python/lib/python3.12/multiprocessing/reduction.py +281 -0
  611. package/python-runtime/python/lib/python3.12/multiprocessing/resource_sharer.py +154 -0
  612. package/python-runtime/python/lib/python3.12/multiprocessing/resource_tracker.py +294 -0
  613. package/python-runtime/python/lib/python3.12/multiprocessing/shared_memory.py +534 -0
  614. package/python-runtime/python/lib/python3.12/multiprocessing/sharedctypes.py +240 -0
  615. package/python-runtime/python/lib/python3.12/multiprocessing/spawn.py +307 -0
  616. package/python-runtime/python/lib/python3.12/multiprocessing/synchronize.py +404 -0
  617. package/python-runtime/python/lib/python3.12/multiprocessing/util.py +494 -0
  618. package/python-runtime/python/lib/python3.12/netrc.py +192 -0
  619. package/python-runtime/python/lib/python3.12/nntplib.py +1093 -0
  620. package/python-runtime/python/lib/python3.12/ntpath.py +869 -0
  621. package/python-runtime/python/lib/python3.12/nturl2path.py +69 -0
  622. package/python-runtime/python/lib/python3.12/numbers.py +418 -0
  623. package/python-runtime/python/lib/python3.12/opcode.py +493 -0
  624. package/python-runtime/python/lib/python3.12/operator.py +467 -0
  625. package/python-runtime/python/lib/python3.12/optparse.py +1681 -0
  626. package/python-runtime/python/lib/python3.12/os.py +1159 -0
  627. package/python-runtime/python/lib/python3.12/pathlib.py +1435 -0
  628. package/python-runtime/python/lib/python3.12/pdb.py +1987 -0
  629. package/python-runtime/python/lib/python3.12/pickle.py +1866 -0
  630. package/python-runtime/python/lib/python3.12/pickletools.py +2904 -0
  631. package/python-runtime/python/lib/python3.12/pipes.py +250 -0
  632. package/python-runtime/python/lib/python3.12/pkgutil.py +529 -0
  633. package/python-runtime/python/lib/python3.12/platform.py +1359 -0
  634. package/python-runtime/python/lib/python3.12/plistlib.py +920 -0
  635. package/python-runtime/python/lib/python3.12/poplib.py +478 -0
  636. package/python-runtime/python/lib/python3.12/posixpath.py +577 -0
  637. package/python-runtime/python/lib/python3.12/pprint.py +658 -0
  638. package/python-runtime/python/lib/python3.12/profile.py +615 -0
  639. package/python-runtime/python/lib/python3.12/pstats.py +778 -0
  640. package/python-runtime/python/lib/python3.12/pty.py +211 -0
  641. package/python-runtime/python/lib/python3.12/py_compile.py +212 -0
  642. package/python-runtime/python/lib/python3.12/pyclbr.py +314 -0
  643. package/python-runtime/python/lib/python3.12/pydoc.py +2950 -0
  644. package/python-runtime/python/lib/python3.12/queue.py +326 -0
  645. package/python-runtime/python/lib/python3.12/quopri.py +237 -0
  646. package/python-runtime/python/lib/python3.12/random.py +996 -0
  647. package/python-runtime/python/lib/python3.12/re/__init__.py +385 -0
  648. package/python-runtime/python/lib/python3.12/re/_casefix.py +106 -0
  649. package/python-runtime/python/lib/python3.12/re/_compiler.py +770 -0
  650. package/python-runtime/python/lib/python3.12/re/_constants.py +220 -0
  651. package/python-runtime/python/lib/python3.12/re/_parser.py +1080 -0
  652. package/python-runtime/python/lib/python3.12/reprlib.py +214 -0
  653. package/python-runtime/python/lib/python3.12/rlcompleter.py +219 -0
  654. package/python-runtime/python/lib/python3.12/runpy.py +319 -0
  655. package/python-runtime/python/lib/python3.12/sched.py +167 -0
  656. package/python-runtime/python/lib/python3.12/secrets.py +71 -0
  657. package/python-runtime/python/lib/python3.12/selectors.py +623 -0
  658. package/python-runtime/python/lib/python3.12/shelve.py +243 -0
  659. package/python-runtime/python/lib/python3.12/shlex.py +345 -0
  660. package/python-runtime/python/lib/python3.12/shutil.py +1566 -0
  661. package/python-runtime/python/lib/python3.12/signal.py +94 -0
  662. package/python-runtime/python/lib/python3.12/site-packages/PIL/AvifImagePlugin.py +299 -0
  663. package/python-runtime/python/lib/python3.12/site-packages/PIL/BdfFontFile.py +122 -0
  664. package/python-runtime/python/lib/python3.12/site-packages/PIL/BlpImagePlugin.py +503 -0
  665. package/python-runtime/python/lib/python3.12/site-packages/PIL/BmpImagePlugin.py +526 -0
  666. package/python-runtime/python/lib/python3.12/site-packages/PIL/BufrStubImagePlugin.py +70 -0
  667. package/python-runtime/python/lib/python3.12/site-packages/PIL/ContainerIO.py +177 -0
  668. package/python-runtime/python/lib/python3.12/site-packages/PIL/CurImagePlugin.py +105 -0
  669. package/python-runtime/python/lib/python3.12/site-packages/PIL/DcxImagePlugin.py +88 -0
  670. package/python-runtime/python/lib/python3.12/site-packages/PIL/DdsImagePlugin.py +637 -0
  671. package/python-runtime/python/lib/python3.12/site-packages/PIL/EpsImagePlugin.py +494 -0
  672. package/python-runtime/python/lib/python3.12/site-packages/PIL/ExifTags.py +383 -0
  673. package/python-runtime/python/lib/python3.12/site-packages/PIL/FitsImagePlugin.py +171 -0
  674. package/python-runtime/python/lib/python3.12/site-packages/PIL/FliImagePlugin.py +188 -0
  675. package/python-runtime/python/lib/python3.12/site-packages/PIL/FontFile.py +163 -0
  676. package/python-runtime/python/lib/python3.12/site-packages/PIL/FpxImagePlugin.py +264 -0
  677. package/python-runtime/python/lib/python3.12/site-packages/PIL/FtexImagePlugin.py +119 -0
  678. package/python-runtime/python/lib/python3.12/site-packages/PIL/GbrImagePlugin.py +101 -0
  679. package/python-runtime/python/lib/python3.12/site-packages/PIL/GdImageFile.py +109 -0
  680. package/python-runtime/python/lib/python3.12/site-packages/PIL/GifImagePlugin.py +1152 -0
  681. package/python-runtime/python/lib/python3.12/site-packages/PIL/GimpGradientFile.py +156 -0
  682. package/python-runtime/python/lib/python3.12/site-packages/PIL/GimpPaletteFile.py +77 -0
  683. package/python-runtime/python/lib/python3.12/site-packages/PIL/GribStubImagePlugin.py +70 -0
  684. package/python-runtime/python/lib/python3.12/site-packages/PIL/Hdf5StubImagePlugin.py +70 -0
  685. package/python-runtime/python/lib/python3.12/site-packages/PIL/IcnsImagePlugin.py +406 -0
  686. package/python-runtime/python/lib/python3.12/site-packages/PIL/IcoImagePlugin.py +418 -0
  687. package/python-runtime/python/lib/python3.12/site-packages/PIL/ImImagePlugin.py +401 -0
  688. package/python-runtime/python/lib/python3.12/site-packages/PIL/Image.py +4390 -0
  689. package/python-runtime/python/lib/python3.12/site-packages/PIL/ImageChops.py +278 -0
  690. package/python-runtime/python/lib/python3.12/site-packages/PIL/ImageCms.py +1069 -0
  691. package/python-runtime/python/lib/python3.12/site-packages/PIL/ImageColor.py +321 -0
  692. package/python-runtime/python/lib/python3.12/site-packages/PIL/ImageDraw.py +1003 -0
  693. package/python-runtime/python/lib/python3.12/site-packages/PIL/ImageDraw2.py +250 -0
  694. package/python-runtime/python/lib/python3.12/site-packages/PIL/ImageEnhance.py +112 -0
  695. package/python-runtime/python/lib/python3.12/site-packages/PIL/ImageFile.py +944 -0
  696. package/python-runtime/python/lib/python3.12/site-packages/PIL/ImageFilter.py +596 -0
  697. package/python-runtime/python/lib/python3.12/site-packages/PIL/ImageFont.py +1335 -0
  698. package/python-runtime/python/lib/python3.12/site-packages/PIL/ImageGrab.py +229 -0
  699. package/python-runtime/python/lib/python3.12/site-packages/PIL/ImageMath.py +314 -0
  700. package/python-runtime/python/lib/python3.12/site-packages/PIL/ImageMode.py +85 -0
  701. package/python-runtime/python/lib/python3.12/site-packages/PIL/ImageMorph.py +317 -0
  702. package/python-runtime/python/lib/python3.12/site-packages/PIL/ImageOps.py +803 -0
  703. package/python-runtime/python/lib/python3.12/site-packages/PIL/ImagePalette.py +314 -0
  704. package/python-runtime/python/lib/python3.12/site-packages/PIL/ImagePath.py +20 -0
  705. package/python-runtime/python/lib/python3.12/site-packages/PIL/ImageQt.py +229 -0
  706. package/python-runtime/python/lib/python3.12/site-packages/PIL/ImageSequence.py +89 -0
  707. package/python-runtime/python/lib/python3.12/site-packages/PIL/ImageShow.py +372 -0
  708. package/python-runtime/python/lib/python3.12/site-packages/PIL/ImageStat.py +169 -0
  709. package/python-runtime/python/lib/python3.12/site-packages/PIL/ImageText.py +512 -0
  710. package/python-runtime/python/lib/python3.12/site-packages/PIL/ImageTk.py +269 -0
  711. package/python-runtime/python/lib/python3.12/site-packages/PIL/ImageTransform.py +138 -0
  712. package/python-runtime/python/lib/python3.12/site-packages/PIL/ImageWin.py +247 -0
  713. package/python-runtime/python/lib/python3.12/site-packages/PIL/ImtImagePlugin.py +103 -0
  714. package/python-runtime/python/lib/python3.12/site-packages/PIL/IptcImagePlugin.py +228 -0
  715. package/python-runtime/python/lib/python3.12/site-packages/PIL/Jpeg2KImagePlugin.py +472 -0
  716. package/python-runtime/python/lib/python3.12/site-packages/PIL/JpegImagePlugin.py +913 -0
  717. package/python-runtime/python/lib/python3.12/site-packages/PIL/JpegPresets.py +240 -0
  718. package/python-runtime/python/lib/python3.12/site-packages/PIL/McIdasImagePlugin.py +80 -0
  719. package/python-runtime/python/lib/python3.12/site-packages/PIL/MicImagePlugin.py +105 -0
  720. package/python-runtime/python/lib/python3.12/site-packages/PIL/MpegImagePlugin.py +89 -0
  721. package/python-runtime/python/lib/python3.12/site-packages/PIL/MpoImagePlugin.py +211 -0
  722. package/python-runtime/python/lib/python3.12/site-packages/PIL/MspImagePlugin.py +206 -0
  723. package/python-runtime/python/lib/python3.12/site-packages/PIL/PSDraw.py +249 -0
  724. package/python-runtime/python/lib/python3.12/site-packages/PIL/PaletteFile.py +58 -0
  725. package/python-runtime/python/lib/python3.12/site-packages/PIL/PalmImagePlugin.py +220 -0
  726. package/python-runtime/python/lib/python3.12/site-packages/PIL/PcdImagePlugin.py +68 -0
  727. package/python-runtime/python/lib/python3.12/site-packages/PIL/PcfFontFile.py +258 -0
  728. package/python-runtime/python/lib/python3.12/site-packages/PIL/PcxImagePlugin.py +237 -0
  729. package/python-runtime/python/lib/python3.12/site-packages/PIL/PdfImagePlugin.py +313 -0
  730. package/python-runtime/python/lib/python3.12/site-packages/PIL/PdfParser.py +1129 -0
  731. package/python-runtime/python/lib/python3.12/site-packages/PIL/PixarImagePlugin.py +74 -0
  732. package/python-runtime/python/lib/python3.12/site-packages/PIL/PngImagePlugin.py +1616 -0
  733. package/python-runtime/python/lib/python3.12/site-packages/PIL/PpmImagePlugin.py +380 -0
  734. package/python-runtime/python/lib/python3.12/site-packages/PIL/PsdImagePlugin.py +340 -0
  735. package/python-runtime/python/lib/python3.12/site-packages/PIL/QoiImagePlugin.py +248 -0
  736. package/python-runtime/python/lib/python3.12/site-packages/PIL/SgiImagePlugin.py +236 -0
  737. package/python-runtime/python/lib/python3.12/site-packages/PIL/SpiderImagePlugin.py +329 -0
  738. package/python-runtime/python/lib/python3.12/site-packages/PIL/SunImagePlugin.py +147 -0
  739. package/python-runtime/python/lib/python3.12/site-packages/PIL/TarIO.py +68 -0
  740. package/python-runtime/python/lib/python3.12/site-packages/PIL/TgaImagePlugin.py +295 -0
  741. package/python-runtime/python/lib/python3.12/site-packages/PIL/TiffImagePlugin.py +2410 -0
  742. package/python-runtime/python/lib/python3.12/site-packages/PIL/TiffTags.py +571 -0
  743. package/python-runtime/python/lib/python3.12/site-packages/PIL/WalImageFile.py +134 -0
  744. package/python-runtime/python/lib/python3.12/site-packages/PIL/WebPImagePlugin.py +352 -0
  745. package/python-runtime/python/lib/python3.12/site-packages/PIL/WmfImagePlugin.py +189 -0
  746. package/python-runtime/python/lib/python3.12/site-packages/PIL/XVThumbImagePlugin.py +83 -0
  747. package/python-runtime/python/lib/python3.12/site-packages/PIL/XbmImagePlugin.py +128 -0
  748. package/python-runtime/python/lib/python3.12/site-packages/PIL/XpmImagePlugin.py +175 -0
  749. package/python-runtime/python/lib/python3.12/site-packages/PIL/__init__.py +87 -0
  750. package/python-runtime/python/lib/python3.12/site-packages/PIL/__main__.py +7 -0
  751. package/python-runtime/python/lib/python3.12/site-packages/PIL/_avif.cpython-312-darwin.so +0 -0
  752. package/python-runtime/python/lib/python3.12/site-packages/PIL/_avif.pyi +3 -0
  753. package/python-runtime/python/lib/python3.12/site-packages/PIL/_binary.py +115 -0
  754. package/python-runtime/python/lib/python3.12/site-packages/PIL/_deprecate.py +74 -0
  755. package/python-runtime/python/lib/python3.12/site-packages/PIL/_imaging.cpython-312-darwin.so +0 -0
  756. package/python-runtime/python/lib/python3.12/site-packages/PIL/_imaging.pyi +31 -0
  757. package/python-runtime/python/lib/python3.12/site-packages/PIL/_imagingcms.cpython-312-darwin.so +0 -0
  758. package/python-runtime/python/lib/python3.12/site-packages/PIL/_imagingcms.pyi +143 -0
  759. package/python-runtime/python/lib/python3.12/site-packages/PIL/_imagingft.cpython-312-darwin.so +0 -0
  760. package/python-runtime/python/lib/python3.12/site-packages/PIL/_imagingft.pyi +70 -0
  761. package/python-runtime/python/lib/python3.12/site-packages/PIL/_imagingmath.cpython-312-darwin.so +0 -0
  762. package/python-runtime/python/lib/python3.12/site-packages/PIL/_imagingmath.pyi +3 -0
  763. package/python-runtime/python/lib/python3.12/site-packages/PIL/_imagingmorph.cpython-312-darwin.so +0 -0
  764. package/python-runtime/python/lib/python3.12/site-packages/PIL/_imagingmorph.pyi +3 -0
  765. package/python-runtime/python/lib/python3.12/site-packages/PIL/_imagingtk.cpython-312-darwin.so +0 -0
  766. package/python-runtime/python/lib/python3.12/site-packages/PIL/_imagingtk.pyi +3 -0
  767. package/python-runtime/python/lib/python3.12/site-packages/PIL/_tkinter_finder.py +20 -0
  768. package/python-runtime/python/lib/python3.12/site-packages/PIL/_typing.py +46 -0
  769. package/python-runtime/python/lib/python3.12/site-packages/PIL/_util.py +29 -0
  770. package/python-runtime/python/lib/python3.12/site-packages/PIL/_version.py +4 -0
  771. package/python-runtime/python/lib/python3.12/site-packages/PIL/_webp.cpython-312-darwin.so +0 -0
  772. package/python-runtime/python/lib/python3.12/site-packages/PIL/_webp.pyi +3 -0
  773. package/python-runtime/python/lib/python3.12/site-packages/PIL/features.py +347 -0
  774. package/python-runtime/python/lib/python3.12/site-packages/PIL/py.typed +0 -0
  775. package/python-runtime/python/lib/python3.12/site-packages/PIL/report.py +5 -0
  776. package/python-runtime/python/lib/python3.12/site-packages/README.txt +2 -0
  777. package/python-runtime/python/lib/python3.12/site-packages/_cffi_backend.cpython-312-darwin.so +0 -0
  778. package/python-runtime/python/lib/python3.12/site-packages/acp/__init__.py +247 -0
  779. package/python-runtime/python/lib/python3.12/site-packages/acp/_cookies.py +53 -0
  780. package/python-runtime/python/lib/python3.12/site-packages/acp/_deserialize.py +62 -0
  781. package/python-runtime/python/lib/python3.12/site-packages/acp/_jsonrpc.py +28 -0
  782. package/python-runtime/python/lib/python3.12/site-packages/acp/_protocol_adapters.py +72 -0
  783. package/python-runtime/python/lib/python3.12/site-packages/acp/_schema_base.py +79 -0
  784. package/python-runtime/python/lib/python3.12/site-packages/acp/_sse.py +98 -0
  785. package/python-runtime/python/lib/python3.12/site-packages/acp/_transport.py +145 -0
  786. package/python-runtime/python/lib/python3.12/site-packages/acp/agent/__init__.py +3 -0
  787. package/python-runtime/python/lib/python3.12/site-packages/acp/agent/connection.py +367 -0
  788. package/python-runtime/python/lib/python3.12/site-packages/acp/agent/router.py +10 -0
  789. package/python-runtime/python/lib/python3.12/site-packages/acp/client/__init__.py +3 -0
  790. package/python-runtime/python/lib/python3.12/site-packages/acp/client/connection.py +626 -0
  791. package/python-runtime/python/lib/python3.12/site-packages/acp/client/router.py +10 -0
  792. package/python-runtime/python/lib/python3.12/site-packages/acp/connection.py +344 -0
  793. package/python-runtime/python/lib/python3.12/site-packages/acp/contrib/__init__.py +27 -0
  794. package/python-runtime/python/lib/python3.12/site-packages/acp/contrib/permissions.py +105 -0
  795. package/python-runtime/python/lib/python3.12/site-packages/acp/contrib/session_state.py +274 -0
  796. package/python-runtime/python/lib/python3.12/site-packages/acp/contrib/tool_calls.py +290 -0
  797. package/python-runtime/python/lib/python3.12/site-packages/acp/core.py +111 -0
  798. package/python-runtime/python/lib/python3.12/site-packages/acp/exceptions.py +50 -0
  799. package/python-runtime/python/lib/python3.12/site-packages/acp/experimental/__init__.py +13 -0
  800. package/python-runtime/python/lib/python3.12/site-packages/acp/experimental/negotiation.py +214 -0
  801. package/python-runtime/python/lib/python3.12/site-packages/acp/experimental/v2/__init__.py +18 -0
  802. package/python-runtime/python/lib/python3.12/site-packages/acp/experimental/v2/_connection.py +24 -0
  803. package/python-runtime/python/lib/python3.12/site-packages/acp/experimental/v2/_initialization.py +67 -0
  804. package/python-runtime/python/lib/python3.12/site-packages/acp/experimental/v2/_methods.py +58 -0
  805. package/python-runtime/python/lib/python3.12/site-packages/acp/experimental/v2/_params.py +65 -0
  806. package/python-runtime/python/lib/python3.12/site-packages/acp/experimental/v2/_router.py +74 -0
  807. package/python-runtime/python/lib/python3.12/site-packages/acp/experimental/v2/_schema_base.py +60 -0
  808. package/python-runtime/python/lib/python3.12/site-packages/acp/experimental/v2/agent.py +287 -0
  809. package/python-runtime/python/lib/python3.12/site-packages/acp/experimental/v2/client.py +463 -0
  810. package/python-runtime/python/lib/python3.12/site-packages/acp/experimental/v2/interfaces.py +314 -0
  811. package/python-runtime/python/lib/python3.12/site-packages/acp/experimental/v2/meta.py +41 -0
  812. package/python-runtime/python/lib/python3.12/site-packages/acp/experimental/v2/schema.py +6018 -0
  813. package/python-runtime/python/lib/python3.12/site-packages/acp/http/__init__.py +30 -0
  814. package/python-runtime/python/lib/python3.12/site-packages/acp/http/asgi.py +97 -0
  815. package/python-runtime/python/lib/python3.12/site-packages/acp/http/client.py +266 -0
  816. package/python-runtime/python/lib/python3.12/site-packages/acp/http/protocol.py +115 -0
  817. package/python-runtime/python/lib/python3.12/site-packages/acp/http/server.py +374 -0
  818. package/python-runtime/python/lib/python3.12/site-packages/acp/interfaces.py +468 -0
  819. package/python-runtime/python/lib/python3.12/site-packages/acp/meta.py +50 -0
  820. package/python-runtime/python/lib/python3.12/site-packages/acp/py.typed +1 -0
  821. package/python-runtime/python/lib/python3.12/site-packages/acp/router.py +239 -0
  822. package/python-runtime/python/lib/python3.12/site-packages/acp/schema.py +5846 -0
  823. package/python-runtime/python/lib/python3.12/site-packages/acp/stdio.py +208 -0
  824. package/python-runtime/python/lib/python3.12/site-packages/acp/task/__init__.py +4 -0
  825. package/python-runtime/python/lib/python3.12/site-packages/acp/task/sender.py +63 -0
  826. package/python-runtime/python/lib/python3.12/site-packages/acp/task/supervisor.py +80 -0
  827. package/python-runtime/python/lib/python3.12/site-packages/acp/telemetry.py +41 -0
  828. package/python-runtime/python/lib/python3.12/site-packages/acp/transports.py +112 -0
  829. package/python-runtime/python/lib/python3.12/site-packages/acp/utils.py +265 -0
  830. package/python-runtime/python/lib/python3.12/site-packages/acp/ws/__init__.py +23 -0
  831. package/python-runtime/python/lib/python3.12/site-packages/acp/ws/client.py +124 -0
  832. package/python-runtime/python/lib/python3.12/site-packages/acp/ws/server.py +75 -0
  833. package/python-runtime/python/lib/python3.12/site-packages/ag_ui/__init__.py +0 -0
  834. package/python-runtime/python/lib/python3.12/site-packages/ag_ui/_generated/__init__.py +9 -0
  835. package/python-runtime/python/lib/python3.12/site-packages/ag_ui/_generated/models.py +2825 -0
  836. package/python-runtime/python/lib/python3.12/site-packages/ag_ui/_generated/version.py +12 -0
  837. package/python-runtime/python/lib/python3.12/site-packages/ag_ui/core/__init__.py +242 -0
  838. package/python-runtime/python/lib/python3.12/site-packages/ag_ui/core/capabilities.py +64 -0
  839. package/python-runtime/python/lib/python3.12/site-packages/ag_ui/core/deprecated.py +46 -0
  840. package/python-runtime/python/lib/python3.12/site-packages/ag_ui/core/events.py +131 -0
  841. package/python-runtime/python/lib/python3.12/site-packages/ag_ui/core/token_usage.py +210 -0
  842. package/python-runtime/python/lib/python3.12/site-packages/ag_ui/core/types.py +162 -0
  843. package/python-runtime/python/lib/python3.12/site-packages/ag_ui/core/version.py +38 -0
  844. package/python-runtime/python/lib/python3.12/site-packages/ag_ui/encoder/__init__.py +7 -0
  845. package/python-runtime/python/lib/python3.12/site-packages/ag_ui/encoder/encoder.py +36 -0
  846. package/python-runtime/python/lib/python3.12/site-packages/ag_ui/py.typed +0 -0
  847. package/python-runtime/python/lib/python3.12/site-packages/ag_ui_protocol-1.0.0.dist-info/INSTALLER +1 -0
  848. package/python-runtime/python/lib/python3.12/site-packages/ag_ui_protocol-1.0.0.dist-info/METADATA +114 -0
  849. package/python-runtime/python/lib/python3.12/site-packages/ag_ui_protocol-1.0.0.dist-info/RECORD +32 -0
  850. package/python-runtime/python/lib/python3.12/site-packages/ag_ui_protocol-1.0.0.dist-info/WHEEL +4 -0
  851. package/python-runtime/python/lib/python3.12/site-packages/agent_client_protocol-1.0.0.dist-info/INSTALLER +1 -0
  852. package/python-runtime/python/lib/python3.12/site-packages/agent_client_protocol-1.0.0.dist-info/METADATA +106 -0
  853. package/python-runtime/python/lib/python3.12/site-packages/agent_client_protocol-1.0.0.dist-info/RECORD +115 -0
  854. package/python-runtime/python/lib/python3.12/site-packages/agent_client_protocol-1.0.0.dist-info/WHEEL +4 -0
  855. package/python-runtime/python/lib/python3.12/site-packages/agent_client_protocol-1.0.0.dist-info/entry_points.txt +4 -0
  856. package/python-runtime/python/lib/python3.12/site-packages/annotated_types/__init__.py +416 -0
  857. package/python-runtime/python/lib/python3.12/site-packages/annotated_types/py.typed +0 -0
  858. package/python-runtime/python/lib/python3.12/site-packages/annotated_types/test_cases.py +146 -0
  859. package/python-runtime/python/lib/python3.12/site-packages/annotated_types-0.8.0.dist-info/INSTALLER +1 -0
  860. package/python-runtime/python/lib/python3.12/site-packages/annotated_types-0.8.0.dist-info/METADATA +295 -0
  861. package/python-runtime/python/lib/python3.12/site-packages/annotated_types-0.8.0.dist-info/RECORD +10 -0
  862. package/python-runtime/python/lib/python3.12/site-packages/annotated_types-0.8.0.dist-info/WHEEL +4 -0
  863. package/python-runtime/python/lib/python3.12/site-packages/anyio/__init__.py +154 -0
  864. package/python-runtime/python/lib/python3.12/site-packages/anyio/_backends/__init__.py +0 -0
  865. package/python-runtime/python/lib/python3.12/site-packages/anyio/_backends/_asyncio.py +3300 -0
  866. package/python-runtime/python/lib/python3.12/site-packages/anyio/_backends/_trio.py +1489 -0
  867. package/python-runtime/python/lib/python3.12/site-packages/anyio/_core/__init__.py +0 -0
  868. package/python-runtime/python/lib/python3.12/site-packages/anyio/_core/_asyncio_selector_thread.py +167 -0
  869. package/python-runtime/python/lib/python3.12/site-packages/anyio/_core/_concurrency_utils.py +156 -0
  870. package/python-runtime/python/lib/python3.12/site-packages/anyio/_core/_contextmanagers.py +200 -0
  871. package/python-runtime/python/lib/python3.12/site-packages/anyio/_core/_eventloop.py +244 -0
  872. package/python-runtime/python/lib/python3.12/site-packages/anyio/_core/_exceptions.py +205 -0
  873. package/python-runtime/python/lib/python3.12/site-packages/anyio/_core/_fileio.py +1047 -0
  874. package/python-runtime/python/lib/python3.12/site-packages/anyio/_core/_futures.py +191 -0
  875. package/python-runtime/python/lib/python3.12/site-packages/anyio/_core/_resources.py +18 -0
  876. package/python-runtime/python/lib/python3.12/site-packages/anyio/_core/_signals.py +29 -0
  877. package/python-runtime/python/lib/python3.12/site-packages/anyio/_core/_sockets.py +1032 -0
  878. package/python-runtime/python/lib/python3.12/site-packages/anyio/_core/_streams.py +52 -0
  879. package/python-runtime/python/lib/python3.12/site-packages/anyio/_core/_subprocesses.py +196 -0
  880. package/python-runtime/python/lib/python3.12/site-packages/anyio/_core/_synchronization.py +780 -0
  881. package/python-runtime/python/lib/python3.12/site-packages/anyio/_core/_tasks.py +464 -0
  882. package/python-runtime/python/lib/python3.12/site-packages/anyio/_core/_tempfile.py +623 -0
  883. package/python-runtime/python/lib/python3.12/site-packages/anyio/_core/_testing.py +82 -0
  884. package/python-runtime/python/lib/python3.12/site-packages/anyio/_core/_typedattr.py +90 -0
  885. package/python-runtime/python/lib/python3.12/site-packages/anyio/_lazyimport.py +176 -0
  886. package/python-runtime/python/lib/python3.12/site-packages/anyio/abc/__init__.py +63 -0
  887. package/python-runtime/python/lib/python3.12/site-packages/anyio/abc/_eventloop.py +443 -0
  888. package/python-runtime/python/lib/python3.12/site-packages/anyio/abc/_resources.py +39 -0
  889. package/python-runtime/python/lib/python3.12/site-packages/anyio/abc/_sockets.py +401 -0
  890. package/python-runtime/python/lib/python3.12/site-packages/anyio/abc/_streams.py +237 -0
  891. package/python-runtime/python/lib/python3.12/site-packages/anyio/abc/_subprocesses.py +82 -0
  892. package/python-runtime/python/lib/python3.12/site-packages/anyio/abc/_tasks.py +223 -0
  893. package/python-runtime/python/lib/python3.12/site-packages/anyio/abc/_testing.py +79 -0
  894. package/python-runtime/python/lib/python3.12/site-packages/anyio/from_thread.py +689 -0
  895. package/python-runtime/python/lib/python3.12/site-packages/anyio/functools.py +400 -0
  896. package/python-runtime/python/lib/python3.12/site-packages/anyio/itertools.py +632 -0
  897. package/python-runtime/python/lib/python3.12/site-packages/anyio/lowlevel.py +228 -0
  898. package/python-runtime/python/lib/python3.12/site-packages/anyio/py.typed +0 -0
  899. package/python-runtime/python/lib/python3.12/site-packages/anyio/pytest_plugin.py +408 -0
  900. package/python-runtime/python/lib/python3.12/site-packages/anyio/streams/__init__.py +0 -0
  901. package/python-runtime/python/lib/python3.12/site-packages/anyio/streams/buffered.py +212 -0
  902. package/python-runtime/python/lib/python3.12/site-packages/anyio/streams/file.py +162 -0
  903. package/python-runtime/python/lib/python3.12/site-packages/anyio/streams/memory.py +365 -0
  904. package/python-runtime/python/lib/python3.12/site-packages/anyio/streams/stapled.py +160 -0
  905. package/python-runtime/python/lib/python3.12/site-packages/anyio/streams/text.py +189 -0
  906. package/python-runtime/python/lib/python3.12/site-packages/anyio/streams/tls.py +450 -0
  907. package/python-runtime/python/lib/python3.12/site-packages/anyio/to_interpreter.py +246 -0
  908. package/python-runtime/python/lib/python3.12/site-packages/anyio/to_process.py +269 -0
  909. package/python-runtime/python/lib/python3.12/site-packages/anyio/to_thread.py +80 -0
  910. package/python-runtime/python/lib/python3.12/site-packages/anyio-4.16.0.dist-info/INSTALLER +1 -0
  911. package/python-runtime/python/lib/python3.12/site-packages/anyio-4.16.0.dist-info/METADATA +108 -0
  912. package/python-runtime/python/lib/python3.12/site-packages/anyio-4.16.0.dist-info/RECORD +100 -0
  913. package/python-runtime/python/lib/python3.12/site-packages/anyio-4.16.0.dist-info/WHEEL +5 -0
  914. package/python-runtime/python/lib/python3.12/site-packages/anyio-4.16.0.dist-info/entry_points.txt +2 -0
  915. package/python-runtime/python/lib/python3.12/site-packages/attr/__init__.py +104 -0
  916. package/python-runtime/python/lib/python3.12/site-packages/attr/__init__.pyi +389 -0
  917. package/python-runtime/python/lib/python3.12/site-packages/attr/_cmp.py +160 -0
  918. package/python-runtime/python/lib/python3.12/site-packages/attr/_cmp.pyi +13 -0
  919. package/python-runtime/python/lib/python3.12/site-packages/attr/_compat.py +99 -0
  920. package/python-runtime/python/lib/python3.12/site-packages/attr/_config.py +31 -0
  921. package/python-runtime/python/lib/python3.12/site-packages/attr/_funcs.py +497 -0
  922. package/python-runtime/python/lib/python3.12/site-packages/attr/_make.py +3406 -0
  923. package/python-runtime/python/lib/python3.12/site-packages/attr/_next_gen.py +674 -0
  924. package/python-runtime/python/lib/python3.12/site-packages/attr/_typing_compat.pyi +15 -0
  925. package/python-runtime/python/lib/python3.12/site-packages/attr/_version_info.py +89 -0
  926. package/python-runtime/python/lib/python3.12/site-packages/attr/_version_info.pyi +9 -0
  927. package/python-runtime/python/lib/python3.12/site-packages/attr/converters.py +162 -0
  928. package/python-runtime/python/lib/python3.12/site-packages/attr/converters.pyi +19 -0
  929. package/python-runtime/python/lib/python3.12/site-packages/attr/exceptions.py +95 -0
  930. package/python-runtime/python/lib/python3.12/site-packages/attr/exceptions.pyi +17 -0
  931. package/python-runtime/python/lib/python3.12/site-packages/attr/filters.py +72 -0
  932. package/python-runtime/python/lib/python3.12/site-packages/attr/filters.pyi +6 -0
  933. package/python-runtime/python/lib/python3.12/site-packages/attr/py.typed +0 -0
  934. package/python-runtime/python/lib/python3.12/site-packages/attr/setters.py +79 -0
  935. package/python-runtime/python/lib/python3.12/site-packages/attr/setters.pyi +20 -0
  936. package/python-runtime/python/lib/python3.12/site-packages/attr/validators.py +750 -0
  937. package/python-runtime/python/lib/python3.12/site-packages/attr/validators.pyi +140 -0
  938. package/python-runtime/python/lib/python3.12/site-packages/attrs/__init__.py +72 -0
  939. package/python-runtime/python/lib/python3.12/site-packages/attrs/__init__.pyi +314 -0
  940. package/python-runtime/python/lib/python3.12/site-packages/attrs/converters.py +3 -0
  941. package/python-runtime/python/lib/python3.12/site-packages/attrs/exceptions.py +3 -0
  942. package/python-runtime/python/lib/python3.12/site-packages/attrs/filters.py +3 -0
  943. package/python-runtime/python/lib/python3.12/site-packages/attrs/py.typed +0 -0
  944. package/python-runtime/python/lib/python3.12/site-packages/attrs/setters.py +3 -0
  945. package/python-runtime/python/lib/python3.12/site-packages/attrs/validators.py +3 -0
  946. package/python-runtime/python/lib/python3.12/site-packages/attrs-26.1.0.dist-info/INSTALLER +1 -0
  947. package/python-runtime/python/lib/python3.12/site-packages/attrs-26.1.0.dist-info/METADATA +199 -0
  948. package/python-runtime/python/lib/python3.12/site-packages/attrs-26.1.0.dist-info/RECORD +55 -0
  949. package/python-runtime/python/lib/python3.12/site-packages/attrs-26.1.0.dist-info/WHEEL +4 -0
  950. package/python-runtime/python/lib/python3.12/site-packages/certifi/__init__.py +4 -0
  951. package/python-runtime/python/lib/python3.12/site-packages/certifi/__main__.py +12 -0
  952. package/python-runtime/python/lib/python3.12/site-packages/certifi/cacert.pem +3885 -0
  953. package/python-runtime/python/lib/python3.12/site-packages/certifi/core.py +83 -0
  954. package/python-runtime/python/lib/python3.12/site-packages/certifi/py.typed +0 -0
  955. package/python-runtime/python/lib/python3.12/site-packages/certifi-2026.10.23.dist-info/INSTALLER +1 -0
  956. package/python-runtime/python/lib/python3.12/site-packages/certifi-2026.10.23.dist-info/METADATA +79 -0
  957. package/python-runtime/python/lib/python3.12/site-packages/certifi-2026.10.23.dist-info/RECORD +18 -0
  958. package/python-runtime/python/lib/python3.12/site-packages/certifi-2026.10.23.dist-info/WHEEL +5 -0
  959. package/python-runtime/python/lib/python3.12/site-packages/cffi/__init__.py +14 -0
  960. package/python-runtime/python/lib/python3.12/site-packages/cffi/_cffi_errors.h +135 -0
  961. package/python-runtime/python/lib/python3.12/site-packages/cffi/_cffi_gen_src.py +216 -0
  962. package/python-runtime/python/lib/python3.12/site-packages/cffi/_cffi_include.h +397 -0
  963. package/python-runtime/python/lib/python3.12/site-packages/cffi/_embedding.h +512 -0
  964. package/python-runtime/python/lib/python3.12/site-packages/cffi/_imp_emulation.py +83 -0
  965. package/python-runtime/python/lib/python3.12/site-packages/cffi/_shimmed_dist_utils.py +45 -0
  966. package/python-runtime/python/lib/python3.12/site-packages/cffi/api.py +960 -0
  967. package/python-runtime/python/lib/python3.12/site-packages/cffi/backend_ctypes.py +1120 -0
  968. package/python-runtime/python/lib/python3.12/site-packages/cffi/cffi_opcode.py +187 -0
  969. package/python-runtime/python/lib/python3.12/site-packages/cffi/commontypes.py +82 -0
  970. package/python-runtime/python/lib/python3.12/site-packages/cffi/cparser.py +1014 -0
  971. package/python-runtime/python/lib/python3.12/site-packages/cffi/error.py +31 -0
  972. package/python-runtime/python/lib/python3.12/site-packages/cffi/ffiplatform.py +113 -0
  973. package/python-runtime/python/lib/python3.12/site-packages/cffi/gen_src.py +5 -0
  974. package/python-runtime/python/lib/python3.12/site-packages/cffi/lock.py +30 -0
  975. package/python-runtime/python/lib/python3.12/site-packages/cffi/model.py +617 -0
  976. package/python-runtime/python/lib/python3.12/site-packages/cffi/parse_c_type.h +181 -0
  977. package/python-runtime/python/lib/python3.12/site-packages/cffi/pkgconfig.py +121 -0
  978. package/python-runtime/python/lib/python3.12/site-packages/cffi/recompiler.py +1586 -0
  979. package/python-runtime/python/lib/python3.12/site-packages/cffi/setuptools_ext.py +231 -0
  980. package/python-runtime/python/lib/python3.12/site-packages/cffi/vengine_cpy.py +1058 -0
  981. package/python-runtime/python/lib/python3.12/site-packages/cffi/vengine_gen.py +679 -0
  982. package/python-runtime/python/lib/python3.12/site-packages/cffi/verifier.py +306 -0
  983. package/python-runtime/python/lib/python3.12/site-packages/cffi-2.1.1.dist-info/INSTALLER +1 -0
  984. package/python-runtime/python/lib/python3.12/site-packages/cffi-2.1.1.dist-info/METADATA +67 -0
  985. package/python-runtime/python/lib/python3.12/site-packages/cffi-2.1.1.dist-info/RECORD +53 -0
  986. package/python-runtime/python/lib/python3.12/site-packages/cffi-2.1.1.dist-info/WHEEL +6 -0
  987. package/python-runtime/python/lib/python3.12/site-packages/cffi-2.1.1.dist-info/entry_points.txt +5 -0
  988. package/python-runtime/python/lib/python3.12/site-packages/click/__init__.py +144 -0
  989. package/python-runtime/python/lib/python3.12/site-packages/click/_compat.py +590 -0
  990. package/python-runtime/python/lib/python3.12/site-packages/click/_termui_impl.py +970 -0
  991. package/python-runtime/python/lib/python3.12/site-packages/click/_textwrap.py +188 -0
  992. package/python-runtime/python/lib/python3.12/site-packages/click/_utils.py +45 -0
  993. package/python-runtime/python/lib/python3.12/site-packages/click/_winconsole.py +292 -0
  994. package/python-runtime/python/lib/python3.12/site-packages/click/core.py +3825 -0
  995. package/python-runtime/python/lib/python3.12/site-packages/click/decorators.py +625 -0
  996. package/python-runtime/python/lib/python3.12/site-packages/click/exceptions.py +378 -0
  997. package/python-runtime/python/lib/python3.12/site-packages/click/formatting.py +320 -0
  998. package/python-runtime/python/lib/python3.12/site-packages/click/globals.py +67 -0
  999. package/python-runtime/python/lib/python3.12/site-packages/click/parser.py +533 -0
  1000. package/python-runtime/python/lib/python3.12/site-packages/click/py.typed +0 -0
  1001. package/python-runtime/python/lib/python3.12/site-packages/click/shell_completion.py +796 -0
  1002. package/python-runtime/python/lib/python3.12/site-packages/click/termui.py +1024 -0
  1003. package/python-runtime/python/lib/python3.12/site-packages/click/testing.py +796 -0
  1004. package/python-runtime/python/lib/python3.12/site-packages/click/types.py +1437 -0
  1005. package/python-runtime/python/lib/python3.12/site-packages/click/utils.py +676 -0
  1006. package/python-runtime/python/lib/python3.12/site-packages/click-8.5.1.dist-info/INSTALLER +1 -0
  1007. package/python-runtime/python/lib/python3.12/site-packages/click-8.5.1.dist-info/METADATA +83 -0
  1008. package/python-runtime/python/lib/python3.12/site-packages/click-8.5.1.dist-info/RECORD +40 -0
  1009. package/python-runtime/python/lib/python3.12/site-packages/click-8.5.1.dist-info/WHEEL +4 -0
  1010. package/python-runtime/python/lib/python3.12/site-packages/cryptography/__about__.py +17 -0
  1011. package/python-runtime/python/lib/python3.12/site-packages/cryptography/__init__.py +13 -0
  1012. package/python-runtime/python/lib/python3.12/site-packages/cryptography/cobblestone.py +21 -0
  1013. package/python-runtime/python/lib/python3.12/site-packages/cryptography/exceptions.py +52 -0
  1014. package/python-runtime/python/lib/python3.12/site-packages/cryptography/fernet.py +240 -0
  1015. package/python-runtime/python/lib/python3.12/site-packages/cryptography/hazmat/__init__.py +13 -0
  1016. package/python-runtime/python/lib/python3.12/site-packages/cryptography/hazmat/_oid.py +373 -0
  1017. package/python-runtime/python/lib/python3.12/site-packages/cryptography/hazmat/asn1/__init__.py +47 -0
  1018. package/python-runtime/python/lib/python3.12/site-packages/cryptography/hazmat/asn1/asn1.py +533 -0
  1019. package/python-runtime/python/lib/python3.12/site-packages/cryptography/hazmat/backends/__init__.py +13 -0
  1020. package/python-runtime/python/lib/python3.12/site-packages/cryptography/hazmat/backends/openssl/__init__.py +9 -0
  1021. package/python-runtime/python/lib/python3.12/site-packages/cryptography/hazmat/backends/openssl/backend.py +309 -0
  1022. package/python-runtime/python/lib/python3.12/site-packages/cryptography/hazmat/bindings/__init__.py +5 -0
  1023. package/python-runtime/python/lib/python3.12/site-packages/cryptography/hazmat/bindings/_rust/__init__.pyi +67 -0
  1024. package/python-runtime/python/lib/python3.12/site-packages/cryptography/hazmat/bindings/_rust/_openssl.pyi +8 -0
  1025. package/python-runtime/python/lib/python3.12/site-packages/cryptography/hazmat/bindings/_rust/asn1.pyi +7 -0
  1026. package/python-runtime/python/lib/python3.12/site-packages/cryptography/hazmat/bindings/_rust/cobblestone.pyi +33 -0
  1027. package/python-runtime/python/lib/python3.12/site-packages/cryptography/hazmat/bindings/_rust/declarative_asn1.pyi +133 -0
  1028. package/python-runtime/python/lib/python3.12/site-packages/cryptography/hazmat/bindings/_rust/exceptions.pyi +17 -0
  1029. package/python-runtime/python/lib/python3.12/site-packages/cryptography/hazmat/bindings/_rust/ocsp.pyi +117 -0
  1030. package/python-runtime/python/lib/python3.12/site-packages/cryptography/hazmat/bindings/_rust/openssl/__init__.pyi +82 -0
  1031. package/python-runtime/python/lib/python3.12/site-packages/cryptography/hazmat/bindings/_rust/openssl/aead.pyi +189 -0
  1032. package/python-runtime/python/lib/python3.12/site-packages/cryptography/hazmat/bindings/_rust/openssl/ciphers.pyi +38 -0
  1033. package/python-runtime/python/lib/python3.12/site-packages/cryptography/hazmat/bindings/_rust/openssl/cmac.pyi +18 -0
  1034. package/python-runtime/python/lib/python3.12/site-packages/cryptography/hazmat/bindings/_rust/openssl/dh.pyi +51 -0
  1035. package/python-runtime/python/lib/python3.12/site-packages/cryptography/hazmat/bindings/_rust/openssl/dsa.pyi +41 -0
  1036. package/python-runtime/python/lib/python3.12/site-packages/cryptography/hazmat/bindings/_rust/openssl/ec.pyi +52 -0
  1037. package/python-runtime/python/lib/python3.12/site-packages/cryptography/hazmat/bindings/_rust/openssl/ed25519.pyi +13 -0
  1038. package/python-runtime/python/lib/python3.12/site-packages/cryptography/hazmat/bindings/_rust/openssl/ed448.pyi +13 -0
  1039. package/python-runtime/python/lib/python3.12/site-packages/cryptography/hazmat/bindings/_rust/openssl/hashes.pyi +30 -0
  1040. package/python-runtime/python/lib/python3.12/site-packages/cryptography/hazmat/bindings/_rust/openssl/hmac.pyi +22 -0
  1041. package/python-runtime/python/lib/python3.12/site-packages/cryptography/hazmat/bindings/_rust/openssl/hpke.pyi +109 -0
  1042. package/python-runtime/python/lib/python3.12/site-packages/cryptography/hazmat/bindings/_rust/openssl/kdf.pyi +205 -0
  1043. package/python-runtime/python/lib/python3.12/site-packages/cryptography/hazmat/bindings/_rust/openssl/keys.pyi +34 -0
  1044. package/python-runtime/python/lib/python3.12/site-packages/cryptography/hazmat/bindings/_rust/openssl/keywrap.pyi +28 -0
  1045. package/python-runtime/python/lib/python3.12/site-packages/cryptography/hazmat/bindings/_rust/openssl/mldsa.pyi +35 -0
  1046. package/python-runtime/python/lib/python3.12/site-packages/cryptography/hazmat/bindings/_rust/openssl/mlkem.pyi +18 -0
  1047. package/python-runtime/python/lib/python3.12/site-packages/cryptography/hazmat/bindings/_rust/openssl/poly1305.pyi +15 -0
  1048. package/python-runtime/python/lib/python3.12/site-packages/cryptography/hazmat/bindings/_rust/openssl/rsa.pyi +55 -0
  1049. package/python-runtime/python/lib/python3.12/site-packages/cryptography/hazmat/bindings/_rust/openssl/x25519.pyi +13 -0
  1050. package/python-runtime/python/lib/python3.12/site-packages/cryptography/hazmat/bindings/_rust/openssl/x448.pyi +13 -0
  1051. package/python-runtime/python/lib/python3.12/site-packages/cryptography/hazmat/bindings/_rust/pkcs12.pyi +52 -0
  1052. package/python-runtime/python/lib/python3.12/site-packages/cryptography/hazmat/bindings/_rust/pkcs7.pyi +50 -0
  1053. package/python-runtime/python/lib/python3.12/site-packages/cryptography/hazmat/bindings/_rust/test_support.pyi +23 -0
  1054. package/python-runtime/python/lib/python3.12/site-packages/cryptography/hazmat/bindings/_rust/x509.pyi +313 -0
  1055. package/python-runtime/python/lib/python3.12/site-packages/cryptography/hazmat/bindings/_rust.abi3.so +0 -0
  1056. package/python-runtime/python/lib/python3.12/site-packages/cryptography/hazmat/bindings/openssl/__init__.py +5 -0
  1057. package/python-runtime/python/lib/python3.12/site-packages/cryptography/hazmat/bindings/openssl/_conditional.py +199 -0
  1058. package/python-runtime/python/lib/python3.12/site-packages/cryptography/hazmat/bindings/openssl/binding.py +107 -0
  1059. package/python-runtime/python/lib/python3.12/site-packages/cryptography/hazmat/decrepit/__init__.py +5 -0
  1060. package/python-runtime/python/lib/python3.12/site-packages/cryptography/hazmat/decrepit/ciphers/__init__.py +5 -0
  1061. package/python-runtime/python/lib/python3.12/site-packages/cryptography/hazmat/decrepit/ciphers/algorithms.py +145 -0
  1062. package/python-runtime/python/lib/python3.12/site-packages/cryptography/hazmat/decrepit/ciphers/modes.py +53 -0
  1063. package/python-runtime/python/lib/python3.12/site-packages/cryptography/hazmat/primitives/__init__.py +5 -0
  1064. package/python-runtime/python/lib/python3.12/site-packages/cryptography/hazmat/primitives/_asymmetric.py +19 -0
  1065. package/python-runtime/python/lib/python3.12/site-packages/cryptography/hazmat/primitives/_cipheralgorithm.py +60 -0
  1066. package/python-runtime/python/lib/python3.12/site-packages/cryptography/hazmat/primitives/_modes.py +105 -0
  1067. package/python-runtime/python/lib/python3.12/site-packages/cryptography/hazmat/primitives/_serialization.py +136 -0
  1068. package/python-runtime/python/lib/python3.12/site-packages/cryptography/hazmat/primitives/asymmetric/__init__.py +5 -0
  1069. package/python-runtime/python/lib/python3.12/site-packages/cryptography/hazmat/primitives/asymmetric/dh.py +253 -0
  1070. package/python-runtime/python/lib/python3.12/site-packages/cryptography/hazmat/primitives/asymmetric/dsa.py +179 -0
  1071. package/python-runtime/python/lib/python3.12/site-packages/cryptography/hazmat/primitives/asymmetric/ec.py +369 -0
  1072. package/python-runtime/python/lib/python3.12/site-packages/cryptography/hazmat/primitives/asymmetric/ed25519.py +116 -0
  1073. package/python-runtime/python/lib/python3.12/site-packages/cryptography/hazmat/primitives/asymmetric/ed448.py +143 -0
  1074. package/python-runtime/python/lib/python3.12/site-packages/cryptography/hazmat/primitives/asymmetric/mldsa.py +505 -0
  1075. package/python-runtime/python/lib/python3.12/site-packages/cryptography/hazmat/primitives/asymmetric/mlkem.py +278 -0
  1076. package/python-runtime/python/lib/python3.12/site-packages/cryptography/hazmat/primitives/asymmetric/padding.py +141 -0
  1077. package/python-runtime/python/lib/python3.12/site-packages/cryptography/hazmat/primitives/asymmetric/rsa.py +295 -0
  1078. package/python-runtime/python/lib/python3.12/site-packages/cryptography/hazmat/primitives/asymmetric/types.py +94 -0
  1079. package/python-runtime/python/lib/python3.12/site-packages/cryptography/hazmat/primitives/asymmetric/utils.py +28 -0
  1080. package/python-runtime/python/lib/python3.12/site-packages/cryptography/hazmat/primitives/asymmetric/x25519.py +134 -0
  1081. package/python-runtime/python/lib/python3.12/site-packages/cryptography/hazmat/primitives/asymmetric/x448.py +137 -0
  1082. package/python-runtime/python/lib/python3.12/site-packages/cryptography/hazmat/primitives/ciphers/__init__.py +27 -0
  1083. package/python-runtime/python/lib/python3.12/site-packages/cryptography/hazmat/primitives/ciphers/aead.py +23 -0
  1084. package/python-runtime/python/lib/python3.12/site-packages/cryptography/hazmat/primitives/ciphers/algorithms.py +138 -0
  1085. package/python-runtime/python/lib/python3.12/site-packages/cryptography/hazmat/primitives/ciphers/base.py +146 -0
  1086. package/python-runtime/python/lib/python3.12/site-packages/cryptography/hazmat/primitives/ciphers/modes.py +192 -0
  1087. package/python-runtime/python/lib/python3.12/site-packages/cryptography/hazmat/primitives/cmac.py +10 -0
  1088. package/python-runtime/python/lib/python3.12/site-packages/cryptography/hazmat/primitives/constant_time.py +14 -0
  1089. package/python-runtime/python/lib/python3.12/site-packages/cryptography/hazmat/primitives/hashes.py +357 -0
  1090. package/python-runtime/python/lib/python3.12/site-packages/cryptography/hazmat/primitives/hmac.py +13 -0
  1091. package/python-runtime/python/lib/python3.12/site-packages/cryptography/hazmat/primitives/hpke.py +27 -0
  1092. package/python-runtime/python/lib/python3.12/site-packages/cryptography/hazmat/primitives/kdf/__init__.py +32 -0
  1093. package/python-runtime/python/lib/python3.12/site-packages/cryptography/hazmat/primitives/kdf/argon2.py +17 -0
  1094. package/python-runtime/python/lib/python3.12/site-packages/cryptography/hazmat/primitives/kdf/concatkdf.py +16 -0
  1095. package/python-runtime/python/lib/python3.12/site-packages/cryptography/hazmat/primitives/kdf/hkdf.py +16 -0
  1096. package/python-runtime/python/lib/python3.12/site-packages/cryptography/hazmat/primitives/kdf/kbkdf.py +26 -0
  1097. package/python-runtime/python/lib/python3.12/site-packages/cryptography/hazmat/primitives/kdf/pbkdf2.py +13 -0
  1098. package/python-runtime/python/lib/python3.12/site-packages/cryptography/hazmat/primitives/kdf/scrypt.py +19 -0
  1099. package/python-runtime/python/lib/python3.12/site-packages/cryptography/hazmat/primitives/kdf/x963kdf.py +13 -0
  1100. package/python-runtime/python/lib/python3.12/site-packages/cryptography/hazmat/primitives/keywrap.py +25 -0
  1101. package/python-runtime/python/lib/python3.12/site-packages/cryptography/hazmat/primitives/padding.py +69 -0
  1102. package/python-runtime/python/lib/python3.12/site-packages/cryptography/hazmat/primitives/poly1305.py +11 -0
  1103. package/python-runtime/python/lib/python3.12/site-packages/cryptography/hazmat/primitives/serialization/__init__.py +85 -0
  1104. package/python-runtime/python/lib/python3.12/site-packages/cryptography/hazmat/primitives/serialization/base.py +16 -0
  1105. package/python-runtime/python/lib/python3.12/site-packages/cryptography/hazmat/primitives/serialization/pkcs12.py +176 -0
  1106. package/python-runtime/python/lib/python3.12/site-packages/cryptography/hazmat/primitives/serialization/pkcs7.py +412 -0
  1107. package/python-runtime/python/lib/python3.12/site-packages/cryptography/hazmat/primitives/serialization/ssh.py +1615 -0
  1108. package/python-runtime/python/lib/python3.12/site-packages/cryptography/hazmat/primitives/twofactor/__init__.py +9 -0
  1109. package/python-runtime/python/lib/python3.12/site-packages/cryptography/hazmat/primitives/twofactor/hotp.py +101 -0
  1110. package/python-runtime/python/lib/python3.12/site-packages/cryptography/hazmat/primitives/twofactor/totp.py +56 -0
  1111. package/python-runtime/python/lib/python3.12/site-packages/cryptography/py.typed +0 -0
  1112. package/python-runtime/python/lib/python3.12/site-packages/cryptography/utils.py +136 -0
  1113. package/python-runtime/python/lib/python3.12/site-packages/cryptography/x509/__init__.py +270 -0
  1114. package/python-runtime/python/lib/python3.12/site-packages/cryptography/x509/base.py +834 -0
  1115. package/python-runtime/python/lib/python3.12/site-packages/cryptography/x509/certificate_transparency.py +35 -0
  1116. package/python-runtime/python/lib/python3.12/site-packages/cryptography/x509/extensions.py +2533 -0
  1117. package/python-runtime/python/lib/python3.12/site-packages/cryptography/x509/general_name.py +281 -0
  1118. package/python-runtime/python/lib/python3.12/site-packages/cryptography/x509/name.py +489 -0
  1119. package/python-runtime/python/lib/python3.12/site-packages/cryptography/x509/ocsp.py +379 -0
  1120. package/python-runtime/python/lib/python3.12/site-packages/cryptography/x509/oid.py +37 -0
  1121. package/python-runtime/python/lib/python3.12/site-packages/cryptography/x509/verification.py +34 -0
  1122. package/python-runtime/python/lib/python3.12/site-packages/cryptography-50.0.2.dist-info/INSTALLER +1 -0
  1123. package/python-runtime/python/lib/python3.12/site-packages/cryptography-50.0.2.dist-info/METADATA +111 -0
  1124. package/python-runtime/python/lib/python3.12/site-packages/cryptography-50.0.2.dist-info/RECORD +199 -0
  1125. package/python-runtime/python/lib/python3.12/site-packages/cryptography-50.0.2.dist-info/WHEEL +4 -0
  1126. package/python-runtime/python/lib/python3.12/site-packages/dotenv/__init__.py +51 -0
  1127. package/python-runtime/python/lib/python3.12/site-packages/dotenv/__main__.py +6 -0
  1128. package/python-runtime/python/lib/python3.12/site-packages/dotenv/cli.py +246 -0
  1129. package/python-runtime/python/lib/python3.12/site-packages/dotenv/ipython.py +50 -0
  1130. package/python-runtime/python/lib/python3.12/site-packages/dotenv/main.py +487 -0
  1131. package/python-runtime/python/lib/python3.12/site-packages/dotenv/parser.py +191 -0
  1132. package/python-runtime/python/lib/python3.12/site-packages/dotenv/py.typed +1 -0
  1133. package/python-runtime/python/lib/python3.12/site-packages/dotenv/variables.py +86 -0
  1134. package/python-runtime/python/lib/python3.12/site-packages/dotenv/version.py +1 -0
  1135. package/python-runtime/python/lib/python3.12/site-packages/h11/__init__.py +62 -0
  1136. package/python-runtime/python/lib/python3.12/site-packages/h11/_abnf.py +132 -0
  1137. package/python-runtime/python/lib/python3.12/site-packages/h11/_connection.py +659 -0
  1138. package/python-runtime/python/lib/python3.12/site-packages/h11/_events.py +369 -0
  1139. package/python-runtime/python/lib/python3.12/site-packages/h11/_headers.py +282 -0
  1140. package/python-runtime/python/lib/python3.12/site-packages/h11/_readers.py +250 -0
  1141. package/python-runtime/python/lib/python3.12/site-packages/h11/_receivebuffer.py +153 -0
  1142. package/python-runtime/python/lib/python3.12/site-packages/h11/_state.py +365 -0
  1143. package/python-runtime/python/lib/python3.12/site-packages/h11/_util.py +135 -0
  1144. package/python-runtime/python/lib/python3.12/site-packages/h11/_version.py +16 -0
  1145. package/python-runtime/python/lib/python3.12/site-packages/h11/_writers.py +145 -0
  1146. package/python-runtime/python/lib/python3.12/site-packages/h11/py.typed +1 -0
  1147. package/python-runtime/python/lib/python3.12/site-packages/h11-0.16.0.dist-info/INSTALLER +1 -0
  1148. package/python-runtime/python/lib/python3.12/site-packages/h11-0.16.0.dist-info/METADATA +202 -0
  1149. package/python-runtime/python/lib/python3.12/site-packages/h11-0.16.0.dist-info/RECORD +29 -0
  1150. package/python-runtime/python/lib/python3.12/site-packages/h11-0.16.0.dist-info/WHEEL +5 -0
  1151. package/python-runtime/python/lib/python3.12/site-packages/httpcore/__init__.py +141 -0
  1152. package/python-runtime/python/lib/python3.12/site-packages/httpcore/_api.py +94 -0
  1153. package/python-runtime/python/lib/python3.12/site-packages/httpcore/_async/__init__.py +39 -0
  1154. package/python-runtime/python/lib/python3.12/site-packages/httpcore/_async/connection.py +222 -0
  1155. package/python-runtime/python/lib/python3.12/site-packages/httpcore/_async/connection_pool.py +420 -0
  1156. package/python-runtime/python/lib/python3.12/site-packages/httpcore/_async/http11.py +379 -0
  1157. package/python-runtime/python/lib/python3.12/site-packages/httpcore/_async/http2.py +592 -0
  1158. package/python-runtime/python/lib/python3.12/site-packages/httpcore/_async/http_proxy.py +367 -0
  1159. package/python-runtime/python/lib/python3.12/site-packages/httpcore/_async/interfaces.py +137 -0
  1160. package/python-runtime/python/lib/python3.12/site-packages/httpcore/_async/socks_proxy.py +341 -0
  1161. package/python-runtime/python/lib/python3.12/site-packages/httpcore/_backends/__init__.py +0 -0
  1162. package/python-runtime/python/lib/python3.12/site-packages/httpcore/_backends/anyio.py +146 -0
  1163. package/python-runtime/python/lib/python3.12/site-packages/httpcore/_backends/auto.py +52 -0
  1164. package/python-runtime/python/lib/python3.12/site-packages/httpcore/_backends/base.py +101 -0
  1165. package/python-runtime/python/lib/python3.12/site-packages/httpcore/_backends/mock.py +143 -0
  1166. package/python-runtime/python/lib/python3.12/site-packages/httpcore/_backends/sync.py +241 -0
  1167. package/python-runtime/python/lib/python3.12/site-packages/httpcore/_backends/trio.py +159 -0
  1168. package/python-runtime/python/lib/python3.12/site-packages/httpcore/_exceptions.py +81 -0
  1169. package/python-runtime/python/lib/python3.12/site-packages/httpcore/_models.py +516 -0
  1170. package/python-runtime/python/lib/python3.12/site-packages/httpcore/_ssl.py +9 -0
  1171. package/python-runtime/python/lib/python3.12/site-packages/httpcore/_sync/__init__.py +39 -0
  1172. package/python-runtime/python/lib/python3.12/site-packages/httpcore/_sync/connection.py +222 -0
  1173. package/python-runtime/python/lib/python3.12/site-packages/httpcore/_sync/connection_pool.py +420 -0
  1174. package/python-runtime/python/lib/python3.12/site-packages/httpcore/_sync/http11.py +379 -0
  1175. package/python-runtime/python/lib/python3.12/site-packages/httpcore/_sync/http2.py +592 -0
  1176. package/python-runtime/python/lib/python3.12/site-packages/httpcore/_sync/http_proxy.py +367 -0
  1177. package/python-runtime/python/lib/python3.12/site-packages/httpcore/_sync/interfaces.py +137 -0
  1178. package/python-runtime/python/lib/python3.12/site-packages/httpcore/_sync/socks_proxy.py +341 -0
  1179. package/python-runtime/python/lib/python3.12/site-packages/httpcore/_synchronization.py +318 -0
  1180. package/python-runtime/python/lib/python3.12/site-packages/httpcore/_trace.py +107 -0
  1181. package/python-runtime/python/lib/python3.12/site-packages/httpcore/_utils.py +37 -0
  1182. package/python-runtime/python/lib/python3.12/site-packages/httpcore/py.typed +0 -0
  1183. package/python-runtime/python/lib/python3.12/site-packages/httpcore-1.0.9.dist-info/INSTALLER +1 -0
  1184. package/python-runtime/python/lib/python3.12/site-packages/httpcore-1.0.9.dist-info/METADATA +625 -0
  1185. package/python-runtime/python/lib/python3.12/site-packages/httpcore-1.0.9.dist-info/RECORD +68 -0
  1186. package/python-runtime/python/lib/python3.12/site-packages/httpcore-1.0.9.dist-info/WHEEL +4 -0
  1187. package/python-runtime/python/lib/python3.12/site-packages/httpx/__init__.py +105 -0
  1188. package/python-runtime/python/lib/python3.12/site-packages/httpx/__version__.py +3 -0
  1189. package/python-runtime/python/lib/python3.12/site-packages/httpx/_api.py +438 -0
  1190. package/python-runtime/python/lib/python3.12/site-packages/httpx/_auth.py +348 -0
  1191. package/python-runtime/python/lib/python3.12/site-packages/httpx/_client.py +2019 -0
  1192. package/python-runtime/python/lib/python3.12/site-packages/httpx/_config.py +248 -0
  1193. package/python-runtime/python/lib/python3.12/site-packages/httpx/_content.py +240 -0
  1194. package/python-runtime/python/lib/python3.12/site-packages/httpx/_decoders.py +393 -0
  1195. package/python-runtime/python/lib/python3.12/site-packages/httpx/_exceptions.py +379 -0
  1196. package/python-runtime/python/lib/python3.12/site-packages/httpx/_main.py +506 -0
  1197. package/python-runtime/python/lib/python3.12/site-packages/httpx/_models.py +1277 -0
  1198. package/python-runtime/python/lib/python3.12/site-packages/httpx/_multipart.py +300 -0
  1199. package/python-runtime/python/lib/python3.12/site-packages/httpx/_status_codes.py +162 -0
  1200. package/python-runtime/python/lib/python3.12/site-packages/httpx/_transports/__init__.py +15 -0
  1201. package/python-runtime/python/lib/python3.12/site-packages/httpx/_transports/asgi.py +187 -0
  1202. package/python-runtime/python/lib/python3.12/site-packages/httpx/_transports/base.py +86 -0
  1203. package/python-runtime/python/lib/python3.12/site-packages/httpx/_transports/default.py +406 -0
  1204. package/python-runtime/python/lib/python3.12/site-packages/httpx/_transports/mock.py +43 -0
  1205. package/python-runtime/python/lib/python3.12/site-packages/httpx/_transports/wsgi.py +149 -0
  1206. package/python-runtime/python/lib/python3.12/site-packages/httpx/_types.py +114 -0
  1207. package/python-runtime/python/lib/python3.12/site-packages/httpx/_urlparse.py +527 -0
  1208. package/python-runtime/python/lib/python3.12/site-packages/httpx/_urls.py +641 -0
  1209. package/python-runtime/python/lib/python3.12/site-packages/httpx/_utils.py +242 -0
  1210. package/python-runtime/python/lib/python3.12/site-packages/httpx/py.typed +0 -0
  1211. package/python-runtime/python/lib/python3.12/site-packages/httpx-0.28.1.dist-info/INSTALLER +1 -0
  1212. package/python-runtime/python/lib/python3.12/site-packages/httpx-0.28.1.dist-info/METADATA +203 -0
  1213. package/python-runtime/python/lib/python3.12/site-packages/httpx-0.28.1.dist-info/RECORD +54 -0
  1214. package/python-runtime/python/lib/python3.12/site-packages/httpx-0.28.1.dist-info/WHEEL +4 -0
  1215. package/python-runtime/python/lib/python3.12/site-packages/httpx-0.28.1.dist-info/entry_points.txt +2 -0
  1216. package/python-runtime/python/lib/python3.12/site-packages/httpx_sse/__init__.py +14 -0
  1217. package/python-runtime/python/lib/python3.12/site-packages/httpx_sse/_api.py +93 -0
  1218. package/python-runtime/python/lib/python3.12/site-packages/httpx_sse/_decoders.py +139 -0
  1219. package/python-runtime/python/lib/python3.12/site-packages/httpx_sse/_exceptions.py +5 -0
  1220. package/python-runtime/python/lib/python3.12/site-packages/httpx_sse/_models.py +54 -0
  1221. package/python-runtime/python/lib/python3.12/site-packages/httpx_sse/py.typed +0 -0
  1222. package/python-runtime/python/lib/python3.12/site-packages/httpx_sse-0.4.3.dist-info/INSTALLER +1 -0
  1223. package/python-runtime/python/lib/python3.12/site-packages/httpx_sse-0.4.3.dist-info/METADATA +351 -0
  1224. package/python-runtime/python/lib/python3.12/site-packages/httpx_sse-0.4.3.dist-info/RECORD +17 -0
  1225. package/python-runtime/python/lib/python3.12/site-packages/httpx_sse-0.4.3.dist-info/WHEEL +5 -0
  1226. package/python-runtime/python/lib/python3.12/site-packages/idna/__init__.py +47 -0
  1227. package/python-runtime/python/lib/python3.12/site-packages/idna/__main__.py +6 -0
  1228. package/python-runtime/python/lib/python3.12/site-packages/idna/cli.py +132 -0
  1229. package/python-runtime/python/lib/python3.12/site-packages/idna/codec.py +225 -0
  1230. package/python-runtime/python/lib/python3.12/site-packages/idna/compat.py +43 -0
  1231. package/python-runtime/python/lib/python3.12/site-packages/idna/core.py +863 -0
  1232. package/python-runtime/python/lib/python3.12/site-packages/idna/idnadata.py +1933 -0
  1233. package/python-runtime/python/lib/python3.12/site-packages/idna/intranges.py +55 -0
  1234. package/python-runtime/python/lib/python3.12/site-packages/idna/package_data.py +1 -0
  1235. package/python-runtime/python/lib/python3.12/site-packages/idna/py.typed +0 -0
  1236. package/python-runtime/python/lib/python3.12/site-packages/idna/uts46data.py +17117 -0
  1237. package/python-runtime/python/lib/python3.12/site-packages/idna-3.20.dist-info/INSTALLER +1 -0
  1238. package/python-runtime/python/lib/python3.12/site-packages/idna-3.20.dist-info/METADATA +176 -0
  1239. package/python-runtime/python/lib/python3.12/site-packages/idna-3.20.dist-info/RECORD +28 -0
  1240. package/python-runtime/python/lib/python3.12/site-packages/idna-3.20.dist-info/WHEEL +4 -0
  1241. package/python-runtime/python/lib/python3.12/site-packages/idna-3.20.dist-info/entry_points.txt +3 -0
  1242. package/python-runtime/python/lib/python3.12/site-packages/jsonschema/__init__.py +120 -0
  1243. package/python-runtime/python/lib/python3.12/site-packages/jsonschema/__main__.py +6 -0
  1244. package/python-runtime/python/lib/python3.12/site-packages/jsonschema/_format.py +546 -0
  1245. package/python-runtime/python/lib/python3.12/site-packages/jsonschema/_keywords.py +449 -0
  1246. package/python-runtime/python/lib/python3.12/site-packages/jsonschema/_legacy_keywords.py +449 -0
  1247. package/python-runtime/python/lib/python3.12/site-packages/jsonschema/_types.py +204 -0
  1248. package/python-runtime/python/lib/python3.12/site-packages/jsonschema/_typing.py +29 -0
  1249. package/python-runtime/python/lib/python3.12/site-packages/jsonschema/_utils.py +355 -0
  1250. package/python-runtime/python/lib/python3.12/site-packages/jsonschema/benchmarks/__init__.py +5 -0
  1251. package/python-runtime/python/lib/python3.12/site-packages/jsonschema/benchmarks/const_vs_enum.py +30 -0
  1252. package/python-runtime/python/lib/python3.12/site-packages/jsonschema/benchmarks/contains.py +28 -0
  1253. package/python-runtime/python/lib/python3.12/site-packages/jsonschema/benchmarks/import_benchmark.py +31 -0
  1254. package/python-runtime/python/lib/python3.12/site-packages/jsonschema/benchmarks/issue232/issue.json +2653 -0
  1255. package/python-runtime/python/lib/python3.12/site-packages/jsonschema/benchmarks/issue232.py +25 -0
  1256. package/python-runtime/python/lib/python3.12/site-packages/jsonschema/benchmarks/json_schema_test_suite.py +12 -0
  1257. package/python-runtime/python/lib/python3.12/site-packages/jsonschema/benchmarks/nested_schemas.py +56 -0
  1258. package/python-runtime/python/lib/python3.12/site-packages/jsonschema/benchmarks/subcomponents.py +42 -0
  1259. package/python-runtime/python/lib/python3.12/site-packages/jsonschema/benchmarks/unused_registry.py +35 -0
  1260. package/python-runtime/python/lib/python3.12/site-packages/jsonschema/benchmarks/useless_applicator_schemas.py +106 -0
  1261. package/python-runtime/python/lib/python3.12/site-packages/jsonschema/benchmarks/useless_keywords.py +32 -0
  1262. package/python-runtime/python/lib/python3.12/site-packages/jsonschema/benchmarks/validator_creation.py +14 -0
  1263. package/python-runtime/python/lib/python3.12/site-packages/jsonschema/cli.py +292 -0
  1264. package/python-runtime/python/lib/python3.12/site-packages/jsonschema/exceptions.py +490 -0
  1265. package/python-runtime/python/lib/python3.12/site-packages/jsonschema/protocols.py +230 -0
  1266. package/python-runtime/python/lib/python3.12/site-packages/jsonschema/validators.py +1410 -0
  1267. package/python-runtime/python/lib/python3.12/site-packages/jsonschema-4.26.0.dist-info/INSTALLER +1 -0
  1268. package/python-runtime/python/lib/python3.12/site-packages/jsonschema-4.26.0.dist-info/METADATA +170 -0
  1269. package/python-runtime/python/lib/python3.12/site-packages/jsonschema-4.26.0.dist-info/RECORD +82 -0
  1270. package/python-runtime/python/lib/python3.12/site-packages/jsonschema-4.26.0.dist-info/WHEEL +4 -0
  1271. package/python-runtime/python/lib/python3.12/site-packages/jsonschema-4.26.0.dist-info/entry_points.txt +2 -0
  1272. package/python-runtime/python/lib/python3.12/site-packages/jsonschema_specifications/__init__.py +12 -0
  1273. package/python-runtime/python/lib/python3.12/site-packages/jsonschema_specifications/_core.py +38 -0
  1274. package/python-runtime/python/lib/python3.12/site-packages/jsonschema_specifications/schemas/draft201909/metaschema.json +42 -0
  1275. package/python-runtime/python/lib/python3.12/site-packages/jsonschema_specifications/schemas/draft201909/vocabularies/applicator +56 -0
  1276. package/python-runtime/python/lib/python3.12/site-packages/jsonschema_specifications/schemas/draft201909/vocabularies/content +17 -0
  1277. package/python-runtime/python/lib/python3.12/site-packages/jsonschema_specifications/schemas/draft201909/vocabularies/core +57 -0
  1278. package/python-runtime/python/lib/python3.12/site-packages/jsonschema_specifications/schemas/draft201909/vocabularies/format +14 -0
  1279. package/python-runtime/python/lib/python3.12/site-packages/jsonschema_specifications/schemas/draft201909/vocabularies/meta-data +37 -0
  1280. package/python-runtime/python/lib/python3.12/site-packages/jsonschema_specifications/schemas/draft201909/vocabularies/validation +98 -0
  1281. package/python-runtime/python/lib/python3.12/site-packages/jsonschema_specifications/schemas/draft202012/metaschema.json +58 -0
  1282. package/python-runtime/python/lib/python3.12/site-packages/jsonschema_specifications/schemas/draft202012/vocabularies/applicator +48 -0
  1283. package/python-runtime/python/lib/python3.12/site-packages/jsonschema_specifications/schemas/draft202012/vocabularies/content +17 -0
  1284. package/python-runtime/python/lib/python3.12/site-packages/jsonschema_specifications/schemas/draft202012/vocabularies/core +51 -0
  1285. package/python-runtime/python/lib/python3.12/site-packages/jsonschema_specifications/schemas/draft202012/vocabularies/format-annotation +14 -0
  1286. package/python-runtime/python/lib/python3.12/site-packages/jsonschema_specifications/schemas/draft202012/vocabularies/format-assertion +14 -0
  1287. package/python-runtime/python/lib/python3.12/site-packages/jsonschema_specifications/schemas/draft202012/vocabularies/meta-data +37 -0
  1288. package/python-runtime/python/lib/python3.12/site-packages/jsonschema_specifications/schemas/draft202012/vocabularies/unevaluated +15 -0
  1289. package/python-runtime/python/lib/python3.12/site-packages/jsonschema_specifications/schemas/draft202012/vocabularies/validation +98 -0
  1290. package/python-runtime/python/lib/python3.12/site-packages/jsonschema_specifications/schemas/draft3/metaschema.json +172 -0
  1291. package/python-runtime/python/lib/python3.12/site-packages/jsonschema_specifications/schemas/draft4/metaschema.json +149 -0
  1292. package/python-runtime/python/lib/python3.12/site-packages/jsonschema_specifications/schemas/draft6/metaschema.json +153 -0
  1293. package/python-runtime/python/lib/python3.12/site-packages/jsonschema_specifications/schemas/draft7/metaschema.json +166 -0
  1294. package/python-runtime/python/lib/python3.12/site-packages/jsonschema_specifications-2025.9.1.dist-info/INSTALLER +1 -0
  1295. package/python-runtime/python/lib/python3.12/site-packages/jsonschema_specifications-2025.9.1.dist-info/METADATA +54 -0
  1296. package/python-runtime/python/lib/python3.12/site-packages/jsonschema_specifications-2025.9.1.dist-info/RECORD +33 -0
  1297. package/python-runtime/python/lib/python3.12/site-packages/jsonschema_specifications-2025.9.1.dist-info/WHEEL +4 -0
  1298. package/python-runtime/python/lib/python3.12/site-packages/jwt/__init__.py +78 -0
  1299. package/python-runtime/python/lib/python3.12/site-packages/jwt/algorithms.py +1121 -0
  1300. package/python-runtime/python/lib/python3.12/site-packages/jwt/api_jwk.py +196 -0
  1301. package/python-runtime/python/lib/python3.12/site-packages/jwt/api_jws.py +485 -0
  1302. package/python-runtime/python/lib/python3.12/site-packages/jwt/api_jwt.py +595 -0
  1303. package/python-runtime/python/lib/python3.12/site-packages/jwt/exceptions.py +113 -0
  1304. package/python-runtime/python/lib/python3.12/site-packages/jwt/help.py +66 -0
  1305. package/python-runtime/python/lib/python3.12/site-packages/jwt/jwk_set_cache.py +47 -0
  1306. package/python-runtime/python/lib/python3.12/site-packages/jwt/jwks_client.py +333 -0
  1307. package/python-runtime/python/lib/python3.12/site-packages/jwt/py.typed +0 -0
  1308. package/python-runtime/python/lib/python3.12/site-packages/jwt/types.py +69 -0
  1309. package/python-runtime/python/lib/python3.12/site-packages/jwt/utils.py +146 -0
  1310. package/python-runtime/python/lib/python3.12/site-packages/jwt/warnings.py +11 -0
  1311. package/python-runtime/python/lib/python3.12/site-packages/mcp/__init__.py +135 -0
  1312. package/python-runtime/python/lib/python3.12/site-packages/mcp/cli/__init__.py +6 -0
  1313. package/python-runtime/python/lib/python3.12/site-packages/mcp/cli/claude.py +148 -0
  1314. package/python-runtime/python/lib/python3.12/site-packages/mcp/cli/cli.py +488 -0
  1315. package/python-runtime/python/lib/python3.12/site-packages/mcp/client/__init__.py +0 -0
  1316. package/python-runtime/python/lib/python3.12/site-packages/mcp/client/__main__.py +85 -0
  1317. package/python-runtime/python/lib/python3.12/site-packages/mcp/client/auth/__init__.py +21 -0
  1318. package/python-runtime/python/lib/python3.12/site-packages/mcp/client/auth/exceptions.py +10 -0
  1319. package/python-runtime/python/lib/python3.12/site-packages/mcp/client/auth/extensions/__init__.py +0 -0
  1320. package/python-runtime/python/lib/python3.12/site-packages/mcp/client/auth/extensions/client_credentials.py +567 -0
  1321. package/python-runtime/python/lib/python3.12/site-packages/mcp/client/auth/oauth2.py +682 -0
  1322. package/python-runtime/python/lib/python3.12/site-packages/mcp/client/auth/utils.py +395 -0
  1323. package/python-runtime/python/lib/python3.12/site-packages/mcp/client/experimental/__init__.py +9 -0
  1324. package/python-runtime/python/lib/python3.12/site-packages/mcp/client/experimental/task_handlers.py +290 -0
  1325. package/python-runtime/python/lib/python3.12/site-packages/mcp/client/experimental/tasks.py +224 -0
  1326. package/python-runtime/python/lib/python3.12/site-packages/mcp/client/session.py +640 -0
  1327. package/python-runtime/python/lib/python3.12/site-packages/mcp/client/session_group.py +447 -0
  1328. package/python-runtime/python/lib/python3.12/site-packages/mcp/client/sse.py +177 -0
  1329. package/python-runtime/python/lib/python3.12/site-packages/mcp/client/stdio/__init__.py +278 -0
  1330. package/python-runtime/python/lib/python3.12/site-packages/mcp/client/streamable_http.py +747 -0
  1331. package/python-runtime/python/lib/python3.12/site-packages/mcp/client/websocket.py +94 -0
  1332. package/python-runtime/python/lib/python3.12/site-packages/mcp/os/__init__.py +1 -0
  1333. package/python-runtime/python/lib/python3.12/site-packages/mcp/os/posix/__init__.py +1 -0
  1334. package/python-runtime/python/lib/python3.12/site-packages/mcp/os/posix/utilities.py +60 -0
  1335. package/python-runtime/python/lib/python3.12/site-packages/mcp/os/win32/__init__.py +1 -0
  1336. package/python-runtime/python/lib/python3.12/site-packages/mcp/os/win32/utilities.py +338 -0
  1337. package/python-runtime/python/lib/python3.12/site-packages/mcp/py.typed +0 -0
  1338. package/python-runtime/python/lib/python3.12/site-packages/mcp/server/__init__.py +5 -0
  1339. package/python-runtime/python/lib/python3.12/site-packages/mcp/server/__main__.py +50 -0
  1340. package/python-runtime/python/lib/python3.12/site-packages/mcp/server/auth/__init__.py +3 -0
  1341. package/python-runtime/python/lib/python3.12/site-packages/mcp/server/auth/errors.py +5 -0
  1342. package/python-runtime/python/lib/python3.12/site-packages/mcp/server/auth/handlers/__init__.py +3 -0
  1343. package/python-runtime/python/lib/python3.12/site-packages/mcp/server/auth/handlers/authorize.py +224 -0
  1344. package/python-runtime/python/lib/python3.12/site-packages/mcp/server/auth/handlers/metadata.py +29 -0
  1345. package/python-runtime/python/lib/python3.12/site-packages/mcp/server/auth/handlers/register.py +136 -0
  1346. package/python-runtime/python/lib/python3.12/site-packages/mcp/server/auth/handlers/revoke.py +91 -0
  1347. package/python-runtime/python/lib/python3.12/site-packages/mcp/server/auth/handlers/token.py +241 -0
  1348. package/python-runtime/python/lib/python3.12/site-packages/mcp/server/auth/json_response.py +10 -0
  1349. package/python-runtime/python/lib/python3.12/site-packages/mcp/server/auth/middleware/__init__.py +3 -0
  1350. package/python-runtime/python/lib/python3.12/site-packages/mcp/server/auth/middleware/auth_context.py +48 -0
  1351. package/python-runtime/python/lib/python3.12/site-packages/mcp/server/auth/middleware/bearer_auth.py +173 -0
  1352. package/python-runtime/python/lib/python3.12/site-packages/mcp/server/auth/middleware/client_auth.py +115 -0
  1353. package/python-runtime/python/lib/python3.12/site-packages/mcp/server/auth/provider.py +314 -0
  1354. package/python-runtime/python/lib/python3.12/site-packages/mcp/server/auth/routes.py +254 -0
  1355. package/python-runtime/python/lib/python3.12/site-packages/mcp/server/auth/settings.py +56 -0
  1356. package/python-runtime/python/lib/python3.12/site-packages/mcp/server/elicitation.py +190 -0
  1357. package/python-runtime/python/lib/python3.12/site-packages/mcp/server/experimental/__init__.py +12 -0
  1358. package/python-runtime/python/lib/python3.12/site-packages/mcp/server/experimental/request_context.py +285 -0
  1359. package/python-runtime/python/lib/python3.12/site-packages/mcp/server/experimental/session_features.py +226 -0
  1360. package/python-runtime/python/lib/python3.12/site-packages/mcp/server/experimental/task_context.py +614 -0
  1361. package/python-runtime/python/lib/python3.12/site-packages/mcp/server/experimental/task_result_handler.py +243 -0
  1362. package/python-runtime/python/lib/python3.12/site-packages/mcp/server/experimental/task_scope.py +75 -0
  1363. package/python-runtime/python/lib/python3.12/site-packages/mcp/server/experimental/task_support.py +128 -0
  1364. package/python-runtime/python/lib/python3.12/site-packages/mcp/server/fastmcp/__init__.py +11 -0
  1365. package/python-runtime/python/lib/python3.12/site-packages/mcp/server/fastmcp/exceptions.py +21 -0
  1366. package/python-runtime/python/lib/python3.12/site-packages/mcp/server/fastmcp/prompts/__init__.py +4 -0
  1367. package/python-runtime/python/lib/python3.12/site-packages/mcp/server/fastmcp/prompts/base.py +183 -0
  1368. package/python-runtime/python/lib/python3.12/site-packages/mcp/server/fastmcp/prompts/manager.py +60 -0
  1369. package/python-runtime/python/lib/python3.12/site-packages/mcp/server/fastmcp/resources/__init__.py +23 -0
  1370. package/python-runtime/python/lib/python3.12/site-packages/mcp/server/fastmcp/resources/base.py +50 -0
  1371. package/python-runtime/python/lib/python3.12/site-packages/mcp/server/fastmcp/resources/resource_manager.py +115 -0
  1372. package/python-runtime/python/lib/python3.12/site-packages/mcp/server/fastmcp/resources/templates.py +122 -0
  1373. package/python-runtime/python/lib/python3.12/site-packages/mcp/server/fastmcp/resources/types.py +203 -0
  1374. package/python-runtime/python/lib/python3.12/site-packages/mcp/server/fastmcp/server.py +1390 -0
  1375. package/python-runtime/python/lib/python3.12/site-packages/mcp/server/fastmcp/tools/__init__.py +4 -0
  1376. package/python-runtime/python/lib/python3.12/site-packages/mcp/server/fastmcp/tools/base.py +126 -0
  1377. package/python-runtime/python/lib/python3.12/site-packages/mcp/server/fastmcp/tools/tool_manager.py +93 -0
  1378. package/python-runtime/python/lib/python3.12/site-packages/mcp/server/fastmcp/utilities/__init__.py +1 -0
  1379. package/python-runtime/python/lib/python3.12/site-packages/mcp/server/fastmcp/utilities/context_injection.py +68 -0
  1380. package/python-runtime/python/lib/python3.12/site-packages/mcp/server/fastmcp/utilities/func_metadata.py +560 -0
  1381. package/python-runtime/python/lib/python3.12/site-packages/mcp/server/fastmcp/utilities/logging.py +43 -0
  1382. package/python-runtime/python/lib/python3.12/site-packages/mcp/server/fastmcp/utilities/types.py +101 -0
  1383. package/python-runtime/python/lib/python3.12/site-packages/mcp/server/lowlevel/__init__.py +3 -0
  1384. package/python-runtime/python/lib/python3.12/site-packages/mcp/server/lowlevel/experimental.py +342 -0
  1385. package/python-runtime/python/lib/python3.12/site-packages/mcp/server/lowlevel/func_inspection.py +54 -0
  1386. package/python-runtime/python/lib/python3.12/site-packages/mcp/server/lowlevel/helper_types.py +11 -0
  1387. package/python-runtime/python/lib/python3.12/site-packages/mcp/server/lowlevel/server.py +830 -0
  1388. package/python-runtime/python/lib/python3.12/site-packages/mcp/server/models.py +20 -0
  1389. package/python-runtime/python/lib/python3.12/site-packages/mcp/server/session.py +701 -0
  1390. package/python-runtime/python/lib/python3.12/site-packages/mcp/server/sse.py +299 -0
  1391. package/python-runtime/python/lib/python3.12/site-packages/mcp/server/stdio.py +88 -0
  1392. package/python-runtime/python/lib/python3.12/site-packages/mcp/server/streamable_http.py +1131 -0
  1393. package/python-runtime/python/lib/python3.12/site-packages/mcp/server/streamable_http_manager.py +425 -0
  1394. package/python-runtime/python/lib/python3.12/site-packages/mcp/server/transport_security.py +194 -0
  1395. package/python-runtime/python/lib/python3.12/site-packages/mcp/server/validation.py +104 -0
  1396. package/python-runtime/python/lib/python3.12/site-packages/mcp/server/websocket.py +89 -0
  1397. package/python-runtime/python/lib/python3.12/site-packages/mcp/shared/__init__.py +0 -0
  1398. package/python-runtime/python/lib/python3.12/site-packages/mcp/shared/_httpx_utils.py +219 -0
  1399. package/python-runtime/python/lib/python3.12/site-packages/mcp/shared/auth.py +180 -0
  1400. package/python-runtime/python/lib/python3.12/site-packages/mcp/shared/auth_utils.py +80 -0
  1401. package/python-runtime/python/lib/python3.12/site-packages/mcp/shared/context.py +32 -0
  1402. package/python-runtime/python/lib/python3.12/site-packages/mcp/shared/exceptions.py +71 -0
  1403. package/python-runtime/python/lib/python3.12/site-packages/mcp/shared/experimental/__init__.py +7 -0
  1404. package/python-runtime/python/lib/python3.12/site-packages/mcp/shared/experimental/tasks/__init__.py +12 -0
  1405. package/python-runtime/python/lib/python3.12/site-packages/mcp/shared/experimental/tasks/capabilities.py +115 -0
  1406. package/python-runtime/python/lib/python3.12/site-packages/mcp/shared/experimental/tasks/context.py +101 -0
  1407. package/python-runtime/python/lib/python3.12/site-packages/mcp/shared/experimental/tasks/helpers.py +181 -0
  1408. package/python-runtime/python/lib/python3.12/site-packages/mcp/shared/experimental/tasks/in_memory_task_store.py +219 -0
  1409. package/python-runtime/python/lib/python3.12/site-packages/mcp/shared/experimental/tasks/message_queue.py +241 -0
  1410. package/python-runtime/python/lib/python3.12/site-packages/mcp/shared/experimental/tasks/polling.py +45 -0
  1411. package/python-runtime/python/lib/python3.12/site-packages/mcp/shared/experimental/tasks/resolver.py +60 -0
  1412. package/python-runtime/python/lib/python3.12/site-packages/mcp/shared/experimental/tasks/store.py +156 -0
  1413. package/python-runtime/python/lib/python3.12/site-packages/mcp/shared/memory.py +98 -0
  1414. package/python-runtime/python/lib/python3.12/site-packages/mcp/shared/message.py +50 -0
  1415. package/python-runtime/python/lib/python3.12/site-packages/mcp/shared/metadata_utils.py +45 -0
  1416. package/python-runtime/python/lib/python3.12/site-packages/mcp/shared/progress.py +58 -0
  1417. package/python-runtime/python/lib/python3.12/site-packages/mcp/shared/response_router.py +63 -0
  1418. package/python-runtime/python/lib/python3.12/site-packages/mcp/shared/session.py +552 -0
  1419. package/python-runtime/python/lib/python3.12/site-packages/mcp/shared/tool_name_validation.py +129 -0
  1420. package/python-runtime/python/lib/python3.12/site-packages/mcp/shared/version.py +3 -0
  1421. package/python-runtime/python/lib/python3.12/site-packages/mcp/types.py +1999 -0
  1422. package/python-runtime/python/lib/python3.12/site-packages/mcp-1.30.0.dist-info/INSTALLER +1 -0
  1423. package/python-runtime/python/lib/python3.12/site-packages/mcp-1.30.0.dist-info/METADATA +239 -0
  1424. package/python-runtime/python/lib/python3.12/site-packages/mcp-1.30.0.dist-info/RECORD +228 -0
  1425. package/python-runtime/python/lib/python3.12/site-packages/mcp-1.30.0.dist-info/WHEEL +4 -0
  1426. package/python-runtime/python/lib/python3.12/site-packages/mcp-1.30.0.dist-info/entry_points.txt +2 -0
  1427. package/python-runtime/python/lib/python3.12/site-packages/multipart/__init__.py +38 -0
  1428. package/python-runtime/python/lib/python3.12/site-packages/multipart/decoders.py +1 -0
  1429. package/python-runtime/python/lib/python3.12/site-packages/multipart/exceptions.py +1 -0
  1430. package/python-runtime/python/lib/python3.12/site-packages/multipart/multipart.py +1 -0
  1431. package/python-runtime/python/lib/python3.12/site-packages/pillow-13.0.0.dist-info/INSTALLER +1 -0
  1432. package/python-runtime/python/lib/python3.12/site-packages/pillow-13.0.0.dist-info/METADATA +182 -0
  1433. package/python-runtime/python/lib/python3.12/site-packages/pillow-13.0.0.dist-info/RECORD +236 -0
  1434. package/python-runtime/python/lib/python3.12/site-packages/pillow-13.0.0.dist-info/WHEEL +6 -0
  1435. package/python-runtime/python/lib/python3.12/site-packages/pycparser/__init__.py +98 -0
  1436. package/python-runtime/python/lib/python3.12/site-packages/pycparser/_ast_gen.py +385 -0
  1437. package/python-runtime/python/lib/python3.12/site-packages/pycparser/_c_ast.cfg +268 -0
  1438. package/python-runtime/python/lib/python3.12/site-packages/pycparser/ast_transforms.py +201 -0
  1439. package/python-runtime/python/lib/python3.12/site-packages/pycparser/c_ast.py +1670 -0
  1440. package/python-runtime/python/lib/python3.12/site-packages/pycparser/c_generator.py +866 -0
  1441. package/python-runtime/python/lib/python3.12/site-packages/pycparser/c_lexer.py +861 -0
  1442. package/python-runtime/python/lib/python3.12/site-packages/pycparser/c_parser.py +2759 -0
  1443. package/python-runtime/python/lib/python3.12/site-packages/pycparser-3.12.dist-info/INSTALLER +1 -0
  1444. package/python-runtime/python/lib/python3.12/site-packages/pycparser-3.12.dist-info/METADATA +286 -0
  1445. package/python-runtime/python/lib/python3.12/site-packages/pycparser-3.12.dist-info/RECORD +21 -0
  1446. package/python-runtime/python/lib/python3.12/site-packages/pycparser-3.12.dist-info/WHEEL +5 -0
  1447. package/python-runtime/python/lib/python3.12/site-packages/pydantic/__init__.py +461 -0
  1448. package/python-runtime/python/lib/python3.12/site-packages/pydantic/_internal/__init__.py +0 -0
  1449. package/python-runtime/python/lib/python3.12/site-packages/pydantic/_internal/_config.py +408 -0
  1450. package/python-runtime/python/lib/python3.12/site-packages/pydantic/_internal/_contextlib.py +84 -0
  1451. package/python-runtime/python/lib/python3.12/site-packages/pydantic/_internal/_core_metadata.py +97 -0
  1452. package/python-runtime/python/lib/python3.12/site-packages/pydantic/_internal/_core_utils.py +156 -0
  1453. package/python-runtime/python/lib/python3.12/site-packages/pydantic/_internal/_dataclasses.py +327 -0
  1454. package/python-runtime/python/lib/python3.12/site-packages/pydantic/_internal/_decorators.py +906 -0
  1455. package/python-runtime/python/lib/python3.12/site-packages/pydantic/_internal/_decorators_v1.py +174 -0
  1456. package/python-runtime/python/lib/python3.12/site-packages/pydantic/_internal/_discriminated_union.py +510 -0
  1457. package/python-runtime/python/lib/python3.12/site-packages/pydantic/_internal/_docs_extraction.py +128 -0
  1458. package/python-runtime/python/lib/python3.12/site-packages/pydantic/_internal/_fields.py +910 -0
  1459. package/python-runtime/python/lib/python3.12/site-packages/pydantic/_internal/_forward_ref.py +23 -0
  1460. package/python-runtime/python/lib/python3.12/site-packages/pydantic/_internal/_generate_schema.py +3053 -0
  1461. package/python-runtime/python/lib/python3.12/site-packages/pydantic/_internal/_generics.py +556 -0
  1462. package/python-runtime/python/lib/python3.12/site-packages/pydantic/_internal/_git.py +27 -0
  1463. package/python-runtime/python/lib/python3.12/site-packages/pydantic/_internal/_import_utils.py +20 -0
  1464. package/python-runtime/python/lib/python3.12/site-packages/pydantic/_internal/_known_annotated_metadata.py +412 -0
  1465. package/python-runtime/python/lib/python3.12/site-packages/pydantic/_internal/_mock_val_ser.py +241 -0
  1466. package/python-runtime/python/lib/python3.12/site-packages/pydantic/_internal/_model_construction.py +833 -0
  1467. package/python-runtime/python/lib/python3.12/site-packages/pydantic/_internal/_namespace_utils.py +300 -0
  1468. package/python-runtime/python/lib/python3.12/site-packages/pydantic/_internal/_repr.py +122 -0
  1469. package/python-runtime/python/lib/python3.12/site-packages/pydantic/_internal/_schema_gather.py +49 -0
  1470. package/python-runtime/python/lib/python3.12/site-packages/pydantic/_internal/_schema_generation_shared.py +126 -0
  1471. package/python-runtime/python/lib/python3.12/site-packages/pydantic/_internal/_serializers.py +59 -0
  1472. package/python-runtime/python/lib/python3.12/site-packages/pydantic/_internal/_signature.py +193 -0
  1473. package/python-runtime/python/lib/python3.12/site-packages/pydantic/_internal/_type_refs.py +128 -0
  1474. package/python-runtime/python/lib/python3.12/site-packages/pydantic/_internal/_typing_extra.py +506 -0
  1475. package/python-runtime/python/lib/python3.12/site-packages/pydantic/_internal/_utils.py +433 -0
  1476. package/python-runtime/python/lib/python3.12/site-packages/pydantic/_internal/_validate_call.py +141 -0
  1477. package/python-runtime/python/lib/python3.12/site-packages/pydantic/_internal/_validators.py +541 -0
  1478. package/python-runtime/python/lib/python3.12/site-packages/pydantic/_migration.py +317 -0
  1479. package/python-runtime/python/lib/python3.12/site-packages/pydantic/alias_generators.py +62 -0
  1480. package/python-runtime/python/lib/python3.12/site-packages/pydantic/aliases.py +136 -0
  1481. package/python-runtime/python/lib/python3.12/site-packages/pydantic/annotated_handlers.py +123 -0
  1482. package/python-runtime/python/lib/python3.12/site-packages/pydantic/class_validators.py +5 -0
  1483. package/python-runtime/python/lib/python3.12/site-packages/pydantic/color.py +605 -0
  1484. package/python-runtime/python/lib/python3.12/site-packages/pydantic/config.py +1295 -0
  1485. package/python-runtime/python/lib/python3.12/site-packages/pydantic/dataclasses.py +385 -0
  1486. package/python-runtime/python/lib/python3.12/site-packages/pydantic/datetime_parse.py +5 -0
  1487. package/python-runtime/python/lib/python3.12/site-packages/pydantic/decorator.py +5 -0
  1488. package/python-runtime/python/lib/python3.12/site-packages/pydantic/deprecated/__init__.py +0 -0
  1489. package/python-runtime/python/lib/python3.12/site-packages/pydantic/deprecated/class_validators.py +257 -0
  1490. package/python-runtime/python/lib/python3.12/site-packages/pydantic/deprecated/config.py +72 -0
  1491. package/python-runtime/python/lib/python3.12/site-packages/pydantic/deprecated/copy_internals.py +224 -0
  1492. package/python-runtime/python/lib/python3.12/site-packages/pydantic/deprecated/decorator.py +286 -0
  1493. package/python-runtime/python/lib/python3.12/site-packages/pydantic/deprecated/json.py +142 -0
  1494. package/python-runtime/python/lib/python3.12/site-packages/pydantic/deprecated/parse.py +81 -0
  1495. package/python-runtime/python/lib/python3.12/site-packages/pydantic/deprecated/tools.py +104 -0
  1496. package/python-runtime/python/lib/python3.12/site-packages/pydantic/env_settings.py +5 -0
  1497. package/python-runtime/python/lib/python3.12/site-packages/pydantic/error_wrappers.py +5 -0
  1498. package/python-runtime/python/lib/python3.12/site-packages/pydantic/errors.py +185 -0
  1499. package/python-runtime/python/lib/python3.12/site-packages/pydantic/experimental/__init__.py +1 -0
  1500. package/python-runtime/python/lib/python3.12/site-packages/pydantic/experimental/arguments_schema.py +44 -0
  1501. package/python-runtime/python/lib/python3.12/site-packages/pydantic/experimental/missing_sentinel.py +29 -0
  1502. package/python-runtime/python/lib/python3.12/site-packages/pydantic/experimental/pipeline.py +684 -0
  1503. package/python-runtime/python/lib/python3.12/site-packages/pydantic/fields.py +2065 -0
  1504. package/python-runtime/python/lib/python3.12/site-packages/pydantic/functional_serializers.py +461 -0
  1505. package/python-runtime/python/lib/python3.12/site-packages/pydantic/functional_validators.py +920 -0
  1506. package/python-runtime/python/lib/python3.12/site-packages/pydantic/generics.py +5 -0
  1507. package/python-runtime/python/lib/python3.12/site-packages/pydantic/json.py +5 -0
  1508. package/python-runtime/python/lib/python3.12/site-packages/pydantic/json_schema.py +3281 -0
  1509. package/python-runtime/python/lib/python3.12/site-packages/pydantic/main.py +1947 -0
  1510. package/python-runtime/python/lib/python3.12/site-packages/pydantic/mypy.py +1469 -0
  1511. package/python-runtime/python/lib/python3.12/site-packages/pydantic/networks.py +1417 -0
  1512. package/python-runtime/python/lib/python3.12/site-packages/pydantic/parse.py +5 -0
  1513. package/python-runtime/python/lib/python3.12/site-packages/pydantic/plugin/__init__.py +190 -0
  1514. package/python-runtime/python/lib/python3.12/site-packages/pydantic/plugin/_loader.py +56 -0
  1515. package/python-runtime/python/lib/python3.12/site-packages/pydantic/plugin/_schema_validator.py +152 -0
  1516. package/python-runtime/python/lib/python3.12/site-packages/pydantic/py.typed +0 -0
  1517. package/python-runtime/python/lib/python3.12/site-packages/pydantic/root_model.py +189 -0
  1518. package/python-runtime/python/lib/python3.12/site-packages/pydantic/schema.py +5 -0
  1519. package/python-runtime/python/lib/python3.12/site-packages/pydantic/tools.py +5 -0
  1520. package/python-runtime/python/lib/python3.12/site-packages/pydantic/type_adapter.py +780 -0
  1521. package/python-runtime/python/lib/python3.12/site-packages/pydantic/types.py +3405 -0
  1522. package/python-runtime/python/lib/python3.12/site-packages/pydantic/typing.py +5 -0
  1523. package/python-runtime/python/lib/python3.12/site-packages/pydantic/utils.py +5 -0
  1524. package/python-runtime/python/lib/python3.12/site-packages/pydantic/v1/__init__.py +131 -0
  1525. package/python-runtime/python/lib/python3.12/site-packages/pydantic/v1/_hypothesis_plugin.py +391 -0
  1526. package/python-runtime/python/lib/python3.12/site-packages/pydantic/v1/annotated_types.py +72 -0
  1527. package/python-runtime/python/lib/python3.12/site-packages/pydantic/v1/class_validators.py +361 -0
  1528. package/python-runtime/python/lib/python3.12/site-packages/pydantic/v1/color.py +494 -0
  1529. package/python-runtime/python/lib/python3.12/site-packages/pydantic/v1/config.py +191 -0
  1530. package/python-runtime/python/lib/python3.12/site-packages/pydantic/v1/dataclasses.py +503 -0
  1531. package/python-runtime/python/lib/python3.12/site-packages/pydantic/v1/datetime_parse.py +248 -0
  1532. package/python-runtime/python/lib/python3.12/site-packages/pydantic/v1/decorator.py +264 -0
  1533. package/python-runtime/python/lib/python3.12/site-packages/pydantic/v1/env_settings.py +350 -0
  1534. package/python-runtime/python/lib/python3.12/site-packages/pydantic/v1/error_wrappers.py +161 -0
  1535. package/python-runtime/python/lib/python3.12/site-packages/pydantic/v1/errors.py +646 -0
  1536. package/python-runtime/python/lib/python3.12/site-packages/pydantic/v1/fields.py +1253 -0
  1537. package/python-runtime/python/lib/python3.12/site-packages/pydantic/v1/generics.py +400 -0
  1538. package/python-runtime/python/lib/python3.12/site-packages/pydantic/v1/json.py +112 -0
  1539. package/python-runtime/python/lib/python3.12/site-packages/pydantic/v1/main.py +1130 -0
  1540. package/python-runtime/python/lib/python3.12/site-packages/pydantic/v1/mypy.py +950 -0
  1541. package/python-runtime/python/lib/python3.12/site-packages/pydantic/v1/networks.py +747 -0
  1542. package/python-runtime/python/lib/python3.12/site-packages/pydantic/v1/parse.py +66 -0
  1543. package/python-runtime/python/lib/python3.12/site-packages/pydantic/v1/py.typed +0 -0
  1544. package/python-runtime/python/lib/python3.12/site-packages/pydantic/v1/schema.py +1163 -0
  1545. package/python-runtime/python/lib/python3.12/site-packages/pydantic/v1/tools.py +92 -0
  1546. package/python-runtime/python/lib/python3.12/site-packages/pydantic/v1/types.py +1213 -0
  1547. package/python-runtime/python/lib/python3.12/site-packages/pydantic/v1/typing.py +627 -0
  1548. package/python-runtime/python/lib/python3.12/site-packages/pydantic/v1/utils.py +807 -0
  1549. package/python-runtime/python/lib/python3.12/site-packages/pydantic/v1/validators.py +768 -0
  1550. package/python-runtime/python/lib/python3.12/site-packages/pydantic/v1/version.py +38 -0
  1551. package/python-runtime/python/lib/python3.12/site-packages/pydantic/validate_call_decorator.py +121 -0
  1552. package/python-runtime/python/lib/python3.12/site-packages/pydantic/validators.py +5 -0
  1553. package/python-runtime/python/lib/python3.12/site-packages/pydantic/version.py +113 -0
  1554. package/python-runtime/python/lib/python3.12/site-packages/pydantic/warnings.py +130 -0
  1555. package/python-runtime/python/lib/python3.12/site-packages/pydantic-2.14.3.dist-info/INSTALLER +1 -0
  1556. package/python-runtime/python/lib/python3.12/site-packages/pydantic-2.14.3.dist-info/METADATA +1646 -0
  1557. package/python-runtime/python/lib/python3.12/site-packages/pydantic-2.14.3.dist-info/RECORD +219 -0
  1558. package/python-runtime/python/lib/python3.12/site-packages/pydantic-2.14.3.dist-info/WHEEL +4 -0
  1559. package/python-runtime/python/lib/python3.12/site-packages/pydantic_core/__init__.py +194 -0
  1560. package/python-runtime/python/lib/python3.12/site-packages/pydantic_core/_pydantic_core/__init__.pyi +1114 -0
  1561. package/python-runtime/python/lib/python3.12/site-packages/pydantic_core/_pydantic_core/_schema_gather.pyi +34 -0
  1562. package/python-runtime/python/lib/python3.12/site-packages/pydantic_core/_pydantic_core.cpython-312-darwin.so +0 -0
  1563. package/python-runtime/python/lib/python3.12/site-packages/pydantic_core/core_schema.py +5093 -0
  1564. package/python-runtime/python/lib/python3.12/site-packages/pydantic_core/py.typed +0 -0
  1565. package/python-runtime/python/lib/python3.12/site-packages/pydantic_core-2.50.4.dist-info/INSTALLER +1 -0
  1566. package/python-runtime/python/lib/python3.12/site-packages/pydantic_core-2.50.4.dist-info/METADATA +172 -0
  1567. package/python-runtime/python/lib/python3.12/site-packages/pydantic_core-2.50.4.dist-info/RECORD +14 -0
  1568. package/python-runtime/python/lib/python3.12/site-packages/pydantic_core-2.50.4.dist-info/WHEEL +4 -0
  1569. package/python-runtime/python/lib/python3.12/site-packages/pydantic_settings/__init__.py +74 -0
  1570. package/python-runtime/python/lib/python3.12/site-packages/pydantic_settings/exceptions.py +10 -0
  1571. package/python-runtime/python/lib/python3.12/site-packages/pydantic_settings/main.py +1133 -0
  1572. package/python-runtime/python/lib/python3.12/site-packages/pydantic_settings/py.typed +0 -0
  1573. package/python-runtime/python/lib/python3.12/site-packages/pydantic_settings/sources/__init__.py +91 -0
  1574. package/python-runtime/python/lib/python3.12/site-packages/pydantic_settings/sources/base.py +767 -0
  1575. package/python-runtime/python/lib/python3.12/site-packages/pydantic_settings/sources/providers/__init__.py +48 -0
  1576. package/python-runtime/python/lib/python3.12/site-packages/pydantic_settings/sources/providers/aws.py +158 -0
  1577. package/python-runtime/python/lib/python3.12/site-packages/pydantic_settings/sources/providers/azure.py +246 -0
  1578. package/python-runtime/python/lib/python3.12/site-packages/pydantic_settings/sources/providers/cli.py +1942 -0
  1579. package/python-runtime/python/lib/python3.12/site-packages/pydantic_settings/sources/providers/dotenv.py +226 -0
  1580. package/python-runtime/python/lib/python3.12/site-packages/pydantic_settings/sources/providers/env.py +423 -0
  1581. package/python-runtime/python/lib/python3.12/site-packages/pydantic_settings/sources/providers/gcp.py +365 -0
  1582. package/python-runtime/python/lib/python3.12/site-packages/pydantic_settings/sources/providers/json.py +61 -0
  1583. package/python-runtime/python/lib/python3.12/site-packages/pydantic_settings/sources/providers/nested_secrets.py +220 -0
  1584. package/python-runtime/python/lib/python3.12/site-packages/pydantic_settings/sources/providers/pyproject.py +64 -0
  1585. package/python-runtime/python/lib/python3.12/site-packages/pydantic_settings/sources/providers/secrets.py +146 -0
  1586. package/python-runtime/python/lib/python3.12/site-packages/pydantic_settings/sources/providers/toml.py +72 -0
  1587. package/python-runtime/python/lib/python3.12/site-packages/pydantic_settings/sources/providers/yaml.py +147 -0
  1588. package/python-runtime/python/lib/python3.12/site-packages/pydantic_settings/sources/types.py +109 -0
  1589. package/python-runtime/python/lib/python3.12/site-packages/pydantic_settings/sources/utils.py +515 -0
  1590. package/python-runtime/python/lib/python3.12/site-packages/pydantic_settings/utils.py +46 -0
  1591. package/python-runtime/python/lib/python3.12/site-packages/pydantic_settings/version.py +1 -0
  1592. package/python-runtime/python/lib/python3.12/site-packages/pydantic_settings-2.16.2.dist-info/INSTALLER +1 -0
  1593. package/python-runtime/python/lib/python3.12/site-packages/pydantic_settings-2.16.2.dist-info/METADATA +72 -0
  1594. package/python-runtime/python/lib/python3.12/site-packages/pydantic_settings-2.16.2.dist-info/RECORD +50 -0
  1595. package/python-runtime/python/lib/python3.12/site-packages/pydantic_settings-2.16.2.dist-info/WHEEL +4 -0
  1596. package/python-runtime/python/lib/python3.12/site-packages/pyjwt-2.15.1.dist-info/INSTALLER +1 -0
  1597. package/python-runtime/python/lib/python3.12/site-packages/pyjwt-2.15.1.dist-info/METADATA +94 -0
  1598. package/python-runtime/python/lib/python3.12/site-packages/pyjwt-2.15.1.dist-info/RECORD +32 -0
  1599. package/python-runtime/python/lib/python3.12/site-packages/pyjwt-2.15.1.dist-info/WHEEL +5 -0
  1600. package/python-runtime/python/lib/python3.12/site-packages/python_dotenv-1.2.4.dist-info/INSTALLER +1 -0
  1601. package/python-runtime/python/lib/python3.12/site-packages/python_dotenv-1.2.4.dist-info/METADATA +835 -0
  1602. package/python-runtime/python/lib/python3.12/site-packages/python_dotenv-1.2.4.dist-info/RECORD +25 -0
  1603. package/python-runtime/python/lib/python3.12/site-packages/python_dotenv-1.2.4.dist-info/WHEEL +5 -0
  1604. package/python-runtime/python/lib/python3.12/site-packages/python_dotenv-1.2.4.dist-info/entry_points.txt +2 -0
  1605. package/python-runtime/python/lib/python3.12/site-packages/python_multipart/__init__.py +35 -0
  1606. package/python-runtime/python/lib/python3.12/site-packages/python_multipart/decoders.py +185 -0
  1607. package/python-runtime/python/lib/python3.12/site-packages/python_multipart/exceptions.py +34 -0
  1608. package/python-runtime/python/lib/python3.12/site-packages/python_multipart/multipart.py +2005 -0
  1609. package/python-runtime/python/lib/python3.12/site-packages/python_multipart/py.typed +0 -0
  1610. package/python-runtime/python/lib/python3.12/site-packages/python_multipart-0.0.33.dist-info/INSTALLER +1 -0
  1611. package/python-runtime/python/lib/python3.12/site-packages/python_multipart-0.0.33.dist-info/METADATA +179 -0
  1612. package/python-runtime/python/lib/python3.12/site-packages/python_multipart-0.0.33.dist-info/RECORD +22 -0
  1613. package/python-runtime/python/lib/python3.12/site-packages/python_multipart-0.0.33.dist-info/WHEEL +4 -0
  1614. package/python-runtime/python/lib/python3.12/site-packages/referencing/__init__.py +7 -0
  1615. package/python-runtime/python/lib/python3.12/site-packages/referencing/_attrs.py +31 -0
  1616. package/python-runtime/python/lib/python3.12/site-packages/referencing/_attrs.pyi +21 -0
  1617. package/python-runtime/python/lib/python3.12/site-packages/referencing/_core.py +739 -0
  1618. package/python-runtime/python/lib/python3.12/site-packages/referencing/exceptions.py +165 -0
  1619. package/python-runtime/python/lib/python3.12/site-packages/referencing/jsonschema.py +642 -0
  1620. package/python-runtime/python/lib/python3.12/site-packages/referencing/py.typed +0 -0
  1621. package/python-runtime/python/lib/python3.12/site-packages/referencing/retrieval.py +94 -0
  1622. package/python-runtime/python/lib/python3.12/site-packages/referencing/typing.py +61 -0
  1623. package/python-runtime/python/lib/python3.12/site-packages/referencing-0.37.0.dist-info/INSTALLER +1 -0
  1624. package/python-runtime/python/lib/python3.12/site-packages/referencing-0.37.0.dist-info/METADATA +64 -0
  1625. package/python-runtime/python/lib/python3.12/site-packages/referencing-0.37.0.dist-info/RECORD +33 -0
  1626. package/python-runtime/python/lib/python3.12/site-packages/referencing-0.37.0.dist-info/WHEEL +4 -0
  1627. package/python-runtime/python/lib/python3.12/site-packages/rpds/__init__.py +5 -0
  1628. package/python-runtime/python/lib/python3.12/site-packages/rpds/__init__.pyi +79 -0
  1629. package/python-runtime/python/lib/python3.12/site-packages/rpds/py.typed +0 -0
  1630. package/python-runtime/python/lib/python3.12/site-packages/rpds/rpds.cpython-312-darwin.so +0 -0
  1631. package/python-runtime/python/lib/python3.12/site-packages/rpds_py-2026.9.1.dist-info/INSTALLER +1 -0
  1632. package/python-runtime/python/lib/python3.12/site-packages/rpds_py-2026.9.1.dist-info/METADATA +99 -0
  1633. package/python-runtime/python/lib/python3.12/site-packages/rpds_py-2026.9.1.dist-info/RECORD +11 -0
  1634. package/python-runtime/python/lib/python3.12/site-packages/rpds_py-2026.9.1.dist-info/WHEEL +4 -0
  1635. package/python-runtime/python/lib/python3.12/site-packages/socksio/__init__.py +46 -0
  1636. package/python-runtime/python/lib/python3.12/site-packages/socksio/_types.py +3 -0
  1637. package/python-runtime/python/lib/python3.12/site-packages/socksio/compat.py +86 -0
  1638. package/python-runtime/python/lib/python3.12/site-packages/socksio/exceptions.py +6 -0
  1639. package/python-runtime/python/lib/python3.12/site-packages/socksio/py.typed +0 -0
  1640. package/python-runtime/python/lib/python3.12/site-packages/socksio/socks4.py +253 -0
  1641. package/python-runtime/python/lib/python3.12/site-packages/socksio/socks5.py +399 -0
  1642. package/python-runtime/python/lib/python3.12/site-packages/socksio/utils.py +95 -0
  1643. package/python-runtime/python/lib/python3.12/site-packages/socksio-1.0.0.dist-info/INSTALLER +1 -0
  1644. package/python-runtime/python/lib/python3.12/site-packages/socksio-1.0.0.dist-info/METADATA +182 -0
  1645. package/python-runtime/python/lib/python3.12/site-packages/socksio-1.0.0.dist-info/RECORD +20 -0
  1646. package/python-runtime/python/lib/python3.12/site-packages/socksio-1.0.0.dist-info/WHEEL +4 -0
  1647. package/python-runtime/python/lib/python3.12/site-packages/sse_starlette/__init__.py +5 -0
  1648. package/python-runtime/python/lib/python3.12/site-packages/sse_starlette/_utils.py +36 -0
  1649. package/python-runtime/python/lib/python3.12/site-packages/sse_starlette/event.py +96 -0
  1650. package/python-runtime/python/lib/python3.12/site-packages/sse_starlette/py.typed +0 -0
  1651. package/python-runtime/python/lib/python3.12/site-packages/sse_starlette/sse.py +602 -0
  1652. package/python-runtime/python/lib/python3.12/site-packages/sse_starlette-3.7.0.dist-info/INSTALLER +1 -0
  1653. package/python-runtime/python/lib/python3.12/site-packages/sse_starlette-3.7.0.dist-info/METADATA +493 -0
  1654. package/python-runtime/python/lib/python3.12/site-packages/sse_starlette-3.7.0.dist-info/RECORD +16 -0
  1655. package/python-runtime/python/lib/python3.12/site-packages/sse_starlette-3.7.0.dist-info/WHEEL +5 -0
  1656. package/python-runtime/python/lib/python3.12/site-packages/starlette/__init__.py +1 -0
  1657. package/python-runtime/python/lib/python3.12/site-packages/starlette/_exception_handler.py +67 -0
  1658. package/python-runtime/python/lib/python3.12/site-packages/starlette/_utils.py +152 -0
  1659. package/python-runtime/python/lib/python3.12/site-packages/starlette/applications.py +124 -0
  1660. package/python-runtime/python/lib/python3.12/site-packages/starlette/authentication.py +157 -0
  1661. package/python-runtime/python/lib/python3.12/site-packages/starlette/background.py +36 -0
  1662. package/python-runtime/python/lib/python3.12/site-packages/starlette/concurrency.py +59 -0
  1663. package/python-runtime/python/lib/python3.12/site-packages/starlette/config.py +142 -0
  1664. package/python-runtime/python/lib/python3.12/site-packages/starlette/convertors.py +89 -0
  1665. package/python-runtime/python/lib/python3.12/site-packages/starlette/datastructures.py +717 -0
  1666. package/python-runtime/python/lib/python3.12/site-packages/starlette/endpoints.py +128 -0
  1667. package/python-runtime/python/lib/python3.12/site-packages/starlette/exceptions.py +43 -0
  1668. package/python-runtime/python/lib/python3.12/site-packages/starlette/formparsers.py +289 -0
  1669. package/python-runtime/python/lib/python3.12/site-packages/starlette/middleware/__init__.py +37 -0
  1670. package/python-runtime/python/lib/python3.12/site-packages/starlette/middleware/authentication.py +52 -0
  1671. package/python-runtime/python/lib/python3.12/site-packages/starlette/middleware/base.py +254 -0
  1672. package/python-runtime/python/lib/python3.12/site-packages/starlette/middleware/body_limit.py +132 -0
  1673. package/python-runtime/python/lib/python3.12/site-packages/starlette/middleware/cors.py +177 -0
  1674. package/python-runtime/python/lib/python3.12/site-packages/starlette/middleware/errors.py +259 -0
  1675. package/python-runtime/python/lib/python3.12/site-packages/starlette/middleware/exceptions.py +73 -0
  1676. package/python-runtime/python/lib/python3.12/site-packages/starlette/middleware/gzip.py +230 -0
  1677. package/python-runtime/python/lib/python3.12/site-packages/starlette/middleware/httpsredirect.py +22 -0
  1678. package/python-runtime/python/lib/python3.12/site-packages/starlette/middleware/opentelemetry.py +126 -0
  1679. package/python-runtime/python/lib/python3.12/site-packages/starlette/middleware/sessions.py +139 -0
  1680. package/python-runtime/python/lib/python3.12/site-packages/starlette/middleware/trustedhost.py +66 -0
  1681. package/python-runtime/python/lib/python3.12/site-packages/starlette/middleware/wsgi.py +157 -0
  1682. package/python-runtime/python/lib/python3.12/site-packages/starlette/py.typed +0 -0
  1683. package/python-runtime/python/lib/python3.12/site-packages/starlette/requests.py +357 -0
  1684. package/python-runtime/python/lib/python3.12/site-packages/starlette/responses.py +616 -0
  1685. package/python-runtime/python/lib/python3.12/site-packages/starlette/routing.py +772 -0
  1686. package/python-runtime/python/lib/python3.12/site-packages/starlette/schemas.py +152 -0
  1687. package/python-runtime/python/lib/python3.12/site-packages/starlette/staticfiles.py +231 -0
  1688. package/python-runtime/python/lib/python3.12/site-packages/starlette/status.py +211 -0
  1689. package/python-runtime/python/lib/python3.12/site-packages/starlette/templating.py +156 -0
  1690. package/python-runtime/python/lib/python3.12/site-packages/starlette/testclient.py +624 -0
  1691. package/python-runtime/python/lib/python3.12/site-packages/starlette/types.py +26 -0
  1692. package/python-runtime/python/lib/python3.12/site-packages/starlette/websockets.py +202 -0
  1693. package/python-runtime/python/lib/python3.12/site-packages/starlette-1.10.0.dist-info/INSTALLER +1 -0
  1694. package/python-runtime/python/lib/python3.12/site-packages/starlette-1.10.0.dist-info/METADATA +181 -0
  1695. package/python-runtime/python/lib/python3.12/site-packages/starlette-1.10.0.dist-info/RECORD +78 -0
  1696. package/python-runtime/python/lib/python3.12/site-packages/starlette-1.10.0.dist-info/WHEEL +4 -0
  1697. package/python-runtime/python/lib/python3.12/site-packages/steerable_agent_harness/__init__.py +49 -0
  1698. package/python-runtime/python/lib/python3.12/site-packages/steerable_agent_harness/budget.py +70 -0
  1699. package/python-runtime/python/lib/python3.12/site-packages/steerable_agent_harness/completion.py +13 -0
  1700. package/python-runtime/python/lib/python3.12/site-packages/steerable_agent_harness/generated.py +250 -0
  1701. package/python-runtime/python/lib/python3.12/site-packages/steerable_agent_harness/policy.py +35 -0
  1702. package/python-runtime/python/lib/python3.12/site-packages/steerable_agent_harness/retry.py +21 -0
  1703. package/python-runtime/python/lib/python3.12/site-packages/steerable_agent_harness/safety.py +170 -0
  1704. package/python-runtime/python/lib/python3.12/site-packages/steerable_agent_harness/tracing.py +138 -0
  1705. package/python-runtime/python/lib/python3.12/site-packages/steerable_agent_harness-0.9.0.dist-info/INSTALLER +1 -0
  1706. package/python-runtime/python/lib/python3.12/site-packages/steerable_agent_harness-0.9.0.dist-info/METADATA +13 -0
  1707. package/python-runtime/python/lib/python3.12/site-packages/steerable_agent_harness-0.9.0.dist-info/RECORD +23 -0
  1708. package/python-runtime/python/lib/python3.12/site-packages/steerable_agent_harness-0.9.0.dist-info/WHEEL +5 -0
  1709. package/python-runtime/python/lib/python3.12/site-packages/steerable_agent_protocol/__init__.py +1 -0
  1710. package/python-runtime/python/lib/python3.12/site-packages/steerable_agent_protocol/generated.py +250 -0
  1711. package/python-runtime/python/lib/python3.12/site-packages/steerable_agent_protocol-0.9.0.dist-info/INSTALLER +1 -0
  1712. package/python-runtime/python/lib/python3.12/site-packages/steerable_agent_protocol-0.9.0.dist-info/METADATA +12 -0
  1713. package/python-runtime/python/lib/python3.12/site-packages/steerable_agent_protocol-0.9.0.dist-info/RECORD +11 -0
  1714. package/python-runtime/python/lib/python3.12/site-packages/steerable_agent_protocol-0.9.0.dist-info/WHEEL +5 -0
  1715. package/python-runtime/python/lib/python3.12/site-packages/steerable_agent_runtime/__init__.py +529 -0
  1716. package/python-runtime/python/lib/python3.12/site-packages/steerable_agent_runtime/antihallucination.py +644 -0
  1717. package/python-runtime/python/lib/python3.12/site-packages/steerable_agent_runtime/approval.py +730 -0
  1718. package/python-runtime/python/lib/python3.12/site-packages/steerable_agent_runtime/approval_policy.py +243 -0
  1719. package/python-runtime/python/lib/python3.12/site-packages/steerable_agent_runtime/ask_user.py +324 -0
  1720. package/python-runtime/python/lib/python3.12/site-packages/steerable_agent_runtime/branch.py +419 -0
  1721. package/python-runtime/python/lib/python3.12/site-packages/steerable_agent_runtime/cache_control.py +254 -0
  1722. package/python-runtime/python/lib/python3.12/site-packages/steerable_agent_runtime/calibration.py +318 -0
  1723. package/python-runtime/python/lib/python3.12/site-packages/steerable_agent_runtime/compaction.py +737 -0
  1724. package/python-runtime/python/lib/python3.12/site-packages/steerable_agent_runtime/compaction_policy.py +97 -0
  1725. package/python-runtime/python/lib/python3.12/site-packages/steerable_agent_runtime/config.py +225 -0
  1726. package/python-runtime/python/lib/python3.12/site-packages/steerable_agent_runtime/default.harness.json +32 -0
  1727. package/python-runtime/python/lib/python3.12/site-packages/steerable_agent_runtime/default.harness.yaml +38 -0
  1728. package/python-runtime/python/lib/python3.12/site-packages/steerable_agent_runtime/delegation_gate.py +100 -0
  1729. package/python-runtime/python/lib/python3.12/site-packages/steerable_agent_runtime/errors.py +58 -0
  1730. package/python-runtime/python/lib/python3.12/site-packages/steerable_agent_runtime/gateway_catalog.py +397 -0
  1731. package/python-runtime/python/lib/python3.12/site-packages/steerable_agent_runtime/handoff.py +147 -0
  1732. package/python-runtime/python/lib/python3.12/site-packages/steerable_agent_runtime/harness.py +922 -0
  1733. package/python-runtime/python/lib/python3.12/site-packages/steerable_agent_runtime/harness_spec.py +339 -0
  1734. package/python-runtime/python/lib/python3.12/site-packages/steerable_agent_runtime/history.py +962 -0
  1735. package/python-runtime/python/lib/python3.12/site-packages/steerable_agent_runtime/hooks.py +541 -0
  1736. package/python-runtime/python/lib/python3.12/site-packages/steerable_agent_runtime/llm/__init__.py +204 -0
  1737. package/python-runtime/python/lib/python3.12/site-packages/steerable_agent_runtime/llm/anthropic_native.py +392 -0
  1738. package/python-runtime/python/lib/python3.12/site-packages/steerable_agent_runtime/llm/compat.py +316 -0
  1739. package/python-runtime/python/lib/python3.12/site-packages/steerable_agent_runtime/llm/errors.py +207 -0
  1740. package/python-runtime/python/lib/python3.12/site-packages/steerable_agent_runtime/llm/google_genai.py +454 -0
  1741. package/python-runtime/python/lib/python3.12/site-packages/steerable_agent_runtime/llm/openai_compat.py +769 -0
  1742. package/python-runtime/python/lib/python3.12/site-packages/steerable_agent_runtime/llm/openai_responses.py +554 -0
  1743. package/python-runtime/python/lib/python3.12/site-packages/steerable_agent_runtime/llm/parts.py +69 -0
  1744. package/python-runtime/python/lib/python3.12/site-packages/steerable_agent_runtime/llm/presets.py +259 -0
  1745. package/python-runtime/python/lib/python3.12/site-packages/steerable_agent_runtime/llm/system_proxy.py +309 -0
  1746. package/python-runtime/python/lib/python3.12/site-packages/steerable_agent_runtime/loop.py +1040 -0
  1747. package/python-runtime/python/lib/python3.12/site-packages/steerable_agent_runtime/maintenance.py +238 -0
  1748. package/python-runtime/python/lib/python3.12/site-packages/steerable_agent_runtime/mcp.py +673 -0
  1749. package/python-runtime/python/lib/python3.12/site-packages/steerable_agent_runtime/mcp_server.py +319 -0
  1750. package/python-runtime/python/lib/python3.12/site-packages/steerable_agent_runtime/model_catalog.py +7742 -0
  1751. package/python-runtime/python/lib/python3.12/site-packages/steerable_agent_runtime/model_info.py +472 -0
  1752. package/python-runtime/python/lib/python3.12/site-packages/steerable_agent_runtime/model_resolve.py +271 -0
  1753. package/python-runtime/python/lib/python3.12/site-packages/steerable_agent_runtime/native_bridge.py +1034 -0
  1754. package/python-runtime/python/lib/python3.12/site-packages/steerable_agent_runtime/observation_aging.py +196 -0
  1755. package/python-runtime/python/lib/python3.12/site-packages/steerable_agent_runtime/orchestration.py +462 -0
  1756. package/python-runtime/python/lib/python3.12/site-packages/steerable_agent_runtime/otel.py +384 -0
  1757. package/python-runtime/python/lib/python3.12/site-packages/steerable_agent_runtime/plugins.py +487 -0
  1758. package/python-runtime/python/lib/python3.12/site-packages/steerable_agent_runtime/pool.py +438 -0
  1759. package/python-runtime/python/lib/python3.12/site-packages/steerable_agent_runtime/pricing.py +88 -0
  1760. package/python-runtime/python/lib/python3.12/site-packages/steerable_agent_runtime/pseudo.py +713 -0
  1761. package/python-runtime/python/lib/python3.12/site-packages/steerable_agent_runtime/recording.py +454 -0
  1762. package/python-runtime/python/lib/python3.12/site-packages/steerable_agent_runtime/reminders.py +339 -0
  1763. package/python-runtime/python/lib/python3.12/site-packages/steerable_agent_runtime/replay.py +222 -0
  1764. package/python-runtime/python/lib/python3.12/site-packages/steerable_agent_runtime/resume.py +343 -0
  1765. package/python-runtime/python/lib/python3.12/site-packages/steerable_agent_runtime/retry.py +163 -0
  1766. package/python-runtime/python/lib/python3.12/site-packages/steerable_agent_runtime/sandboxed.py +201 -0
  1767. package/python-runtime/python/lib/python3.12/site-packages/steerable_agent_runtime/skills.py +730 -0
  1768. package/python-runtime/python/lib/python3.12/site-packages/steerable_agent_runtime/spill.py +127 -0
  1769. package/python-runtime/python/lib/python3.12/site-packages/steerable_agent_runtime/storage/__init__.py +138 -0
  1770. package/python-runtime/python/lib/python3.12/site-packages/steerable_agent_runtime/storage/in_memory.py +215 -0
  1771. package/python-runtime/python/lib/python3.12/site-packages/steerable_agent_runtime/storage/sqlalchemy_store.py +472 -0
  1772. package/python-runtime/python/lib/python3.12/site-packages/steerable_agent_runtime/storage/sqlite_store.py +497 -0
  1773. package/python-runtime/python/lib/python3.12/site-packages/steerable_agent_runtime/storage/write_lease.py +173 -0
  1774. package/python-runtime/python/lib/python3.12/site-packages/steerable_agent_runtime/subagent.py +564 -0
  1775. package/python-runtime/python/lib/python3.12/site-packages/steerable_agent_runtime/todo.py +348 -0
  1776. package/python-runtime/python/lib/python3.12/site-packages/steerable_agent_runtime/tokens.py +162 -0
  1777. package/python-runtime/python/lib/python3.12/site-packages/steerable_agent_runtime/tool_presentation.py +132 -0
  1778. package/python-runtime/python/lib/python3.12/site-packages/steerable_agent_runtime/tool_schema.py +124 -0
  1779. package/python-runtime/python/lib/python3.12/site-packages/steerable_agent_runtime/tool_search.py +177 -0
  1780. package/python-runtime/python/lib/python3.12/site-packages/steerable_agent_runtime/tools.py +457 -0
  1781. package/python-runtime/python/lib/python3.12/site-packages/steerable_agent_runtime/tracing.py +285 -0
  1782. package/python-runtime/python/lib/python3.12/site-packages/steerable_agent_runtime/transport/__init__.py +39 -0
  1783. package/python-runtime/python/lib/python3.12/site-packages/steerable_agent_runtime/transport/fastapi_sse.py +116 -0
  1784. package/python-runtime/python/lib/python3.12/site-packages/steerable_agent_runtime/transport/stdio_jsonrpc.py +431 -0
  1785. package/python-runtime/python/lib/python3.12/site-packages/steerable_agent_runtime/world_state.py +345 -0
  1786. package/python-runtime/python/lib/python3.12/site-packages/steerable_agent_runtime-0.9.0.dist-info/INSTALLER +1 -0
  1787. package/python-runtime/python/lib/python3.12/site-packages/steerable_agent_runtime-0.9.0.dist-info/METADATA +72 -0
  1788. package/python-runtime/python/lib/python3.12/site-packages/steerable_agent_runtime-0.9.0.dist-info/RECORD +147 -0
  1789. package/python-runtime/python/lib/python3.12/site-packages/steerable_agent_runtime-0.9.0.dist-info/WHEEL +5 -0
  1790. package/python-runtime/python/lib/python3.12/site-packages/steerable_agent_runtime_native/__init__.py +5 -0
  1791. package/python-runtime/python/lib/python3.12/site-packages/steerable_agent_runtime_native/steerable_agent_runtime_native.abi3.so +0 -0
  1792. package/python-runtime/python/lib/python3.12/site-packages/steerable_agent_runtime_native-1.0.7.dist-info/INSTALLER +1 -0
  1793. package/python-runtime/python/lib/python3.12/site-packages/steerable_agent_runtime_native-1.0.7.dist-info/METADATA +7 -0
  1794. package/python-runtime/python/lib/python3.12/site-packages/steerable_agent_runtime_native-1.0.7.dist-info/RECORD +9 -0
  1795. package/python-runtime/python/lib/python3.12/site-packages/steerable_agent_runtime_native-1.0.7.dist-info/WHEEL +4 -0
  1796. package/python-runtime/python/lib/python3.12/site-packages/steerable_sidecar/__init__.py +28 -0
  1797. package/python-runtime/python/lib/python3.12/site-packages/steerable_sidecar/__main__.py +119 -0
  1798. package/python-runtime/python/lib/python3.12/site-packages/steerable_sidecar/_version.py +14 -0
  1799. package/python-runtime/python/lib/python3.12/site-packages/steerable_sidecar/acp_adapter.py +890 -0
  1800. package/python-runtime/python/lib/python3.12/site-packages/steerable_sidecar/acp_fs.py +64 -0
  1801. package/python-runtime/python/lib/python3.12/site-packages/steerable_sidecar/acp_terminal.py +147 -0
  1802. package/python-runtime/python/lib/python3.12/site-packages/steerable_sidecar/ag_ui.py +223 -0
  1803. package/python-runtime/python/lib/python3.12/site-packages/steerable_sidecar/delivery.py +2933 -0
  1804. package/python-runtime/python/lib/python3.12/site-packages/steerable_sidecar/display.py +308 -0
  1805. package/python-runtime/python/lib/python3.12/site-packages/steerable_sidecar/egress_ask.py +183 -0
  1806. package/python-runtime/python/lib/python3.12/site-packages/steerable_sidecar/file_edit.py +251 -0
  1807. package/python-runtime/python/lib/python3.12/site-packages/steerable_sidecar/headless.py +760 -0
  1808. package/python-runtime/python/lib/python3.12/site-packages/steerable_sidecar/host_spawn.py +137 -0
  1809. package/python-runtime/python/lib/python3.12/site-packages/steerable_sidecar/host_tools.py +255 -0
  1810. package/python-runtime/python/lib/python3.12/site-packages/steerable_sidecar/jpeg_ascii.py +314 -0
  1811. package/python-runtime/python/lib/python3.12/site-packages/steerable_sidecar/landlock.py +353 -0
  1812. package/python-runtime/python/lib/python3.12/site-packages/steerable_sidecar/landlock_run.py +35 -0
  1813. package/python-runtime/python/lib/python3.12/site-packages/steerable_sidecar/loop_limits.py +85 -0
  1814. package/python-runtime/python/lib/python3.12/site-packages/steerable_sidecar/multi_file_edit.py +109 -0
  1815. package/python-runtime/python/lib/python3.12/site-packages/steerable_sidecar/png_ascii.py +294 -0
  1816. package/python-runtime/python/lib/python3.12/site-packages/steerable_sidecar/ptc_js.py +986 -0
  1817. package/python-runtime/python/lib/python3.12/site-packages/steerable_sidecar/ptc_js_worker.cjs +579 -0
  1818. package/python-runtime/python/lib/python3.12/site-packages/steerable_sidecar/run_code.py +634 -0
  1819. package/python-runtime/python/lib/python3.12/site-packages/steerable_sidecar/run_code_driver.py +229 -0
  1820. package/python-runtime/python/lib/python3.12/site-packages/steerable_sidecar/sandbox.py +771 -0
  1821. package/python-runtime/python/lib/python3.12/site-packages/steerable_sidecar/search_tools.py +173 -0
  1822. package/python-runtime/python/lib/python3.12/site-packages/steerable_sidecar/shell_session.py +301 -0
  1823. package/python-runtime/python/lib/python3.12/site-packages/steerable_sidecar/sidecar.py +3785 -0
  1824. package/python-runtime/python/lib/python3.12/site-packages/steerable_sidecar/stream_chunks.py +115 -0
  1825. package/python-runtime/python/lib/python3.12/site-packages/steerable_sidecar/todo_tools.py +49 -0
  1826. package/python-runtime/python/lib/python3.12/site-packages/steerable_sidecar/tool_contract.json +352 -0
  1827. package/python-runtime/python/lib/python3.12/site-packages/steerable_sidecar/tool_contract.py +62 -0
  1828. package/python-runtime/python/lib/python3.12/site-packages/steerable_sidecar/web_tools.py +1375 -0
  1829. package/python-runtime/python/lib/python3.12/site-packages/steerable_sidecar/workspace_fs.py +71 -0
  1830. package/python-runtime/python/lib/python3.12/site-packages/steerable_sidecar/workspace_tools.py +1472 -0
  1831. package/python-runtime/python/lib/python3.12/site-packages/steerable_sidecar-0.9.0.dist-info/INSTALLER +1 -0
  1832. package/python-runtime/python/lib/python3.12/site-packages/steerable_sidecar-0.9.0.dist-info/METADATA +58 -0
  1833. package/python-runtime/python/lib/python3.12/site-packages/steerable_sidecar-0.9.0.dist-info/RECORD +79 -0
  1834. package/python-runtime/python/lib/python3.12/site-packages/steerable_sidecar-0.9.0.dist-info/WHEEL +5 -0
  1835. package/python-runtime/python/lib/python3.12/site-packages/steerable_sidecar-0.9.0.dist-info/entry_points.txt +4 -0
  1836. package/python-runtime/python/lib/python3.12/site-packages/typing_extensions-4.16.0.dist-info/INSTALLER +1 -0
  1837. package/python-runtime/python/lib/python3.12/site-packages/typing_extensions-4.16.0.dist-info/METADATA +73 -0
  1838. package/python-runtime/python/lib/python3.12/site-packages/typing_extensions-4.16.0.dist-info/RECORD +7 -0
  1839. package/python-runtime/python/lib/python3.12/site-packages/typing_extensions-4.16.0.dist-info/WHEEL +4 -0
  1840. package/python-runtime/python/lib/python3.12/site-packages/typing_extensions.py +4422 -0
  1841. package/python-runtime/python/lib/python3.12/site-packages/typing_inspection/__init__.py +0 -0
  1842. package/python-runtime/python/lib/python3.12/site-packages/typing_inspection/introspection.py +604 -0
  1843. package/python-runtime/python/lib/python3.12/site-packages/typing_inspection/py.typed +0 -0
  1844. package/python-runtime/python/lib/python3.12/site-packages/typing_inspection/typing_objects.py +620 -0
  1845. package/python-runtime/python/lib/python3.12/site-packages/typing_inspection/typing_objects.pyi +421 -0
  1846. package/python-runtime/python/lib/python3.12/site-packages/typing_inspection-0.4.5.dist-info/INSTALLER +1 -0
  1847. package/python-runtime/python/lib/python3.12/site-packages/typing_inspection-0.4.5.dist-info/METADATA +49 -0
  1848. package/python-runtime/python/lib/python3.12/site-packages/typing_inspection-0.4.5.dist-info/RECORD +13 -0
  1849. package/python-runtime/python/lib/python3.12/site-packages/typing_inspection-0.4.5.dist-info/WHEEL +4 -0
  1850. package/python-runtime/python/lib/python3.12/site-packages/uvicorn/__init__.py +5 -0
  1851. package/python-runtime/python/lib/python3.12/site-packages/uvicorn/__main__.py +4 -0
  1852. package/python-runtime/python/lib/python3.12/site-packages/uvicorn/_ansi.py +29 -0
  1853. package/python-runtime/python/lib/python3.12/site-packages/uvicorn/_compat.py +91 -0
  1854. package/python-runtime/python/lib/python3.12/site-packages/uvicorn/_subprocess.py +84 -0
  1855. package/python-runtime/python/lib/python3.12/site-packages/uvicorn/_types.py +280 -0
  1856. package/python-runtime/python/lib/python3.12/site-packages/uvicorn/config.py +618 -0
  1857. package/python-runtime/python/lib/python3.12/site-packages/uvicorn/importer.py +34 -0
  1858. package/python-runtime/python/lib/python3.12/site-packages/uvicorn/lifespan/__init__.py +0 -0
  1859. package/python-runtime/python/lib/python3.12/site-packages/uvicorn/lifespan/off.py +17 -0
  1860. package/python-runtime/python/lib/python3.12/site-packages/uvicorn/lifespan/on.py +137 -0
  1861. package/python-runtime/python/lib/python3.12/site-packages/uvicorn/logging.py +117 -0
  1862. package/python-runtime/python/lib/python3.12/site-packages/uvicorn/loops/__init__.py +0 -0
  1863. package/python-runtime/python/lib/python3.12/site-packages/uvicorn/loops/asyncio.py +11 -0
  1864. package/python-runtime/python/lib/python3.12/site-packages/uvicorn/loops/auto.py +17 -0
  1865. package/python-runtime/python/lib/python3.12/site-packages/uvicorn/loops/uvloop.py +10 -0
  1866. package/python-runtime/python/lib/python3.12/site-packages/uvicorn/loops/zuvloop.py +10 -0
  1867. package/python-runtime/python/lib/python3.12/site-packages/uvicorn/main.py +656 -0
  1868. package/python-runtime/python/lib/python3.12/site-packages/uvicorn/middleware/__init__.py +0 -0
  1869. package/python-runtime/python/lib/python3.12/site-packages/uvicorn/middleware/asgi2.py +15 -0
  1870. package/python-runtime/python/lib/python3.12/site-packages/uvicorn/middleware/message_logger.py +87 -0
  1871. package/python-runtime/python/lib/python3.12/site-packages/uvicorn/middleware/proxy_headers.py +187 -0
  1872. package/python-runtime/python/lib/python3.12/site-packages/uvicorn/middleware/wsgi.py +199 -0
  1873. package/python-runtime/python/lib/python3.12/site-packages/uvicorn/protocols/__init__.py +0 -0
  1874. package/python-runtime/python/lib/python3.12/site-packages/uvicorn/protocols/http/__init__.py +0 -0
  1875. package/python-runtime/python/lib/python3.12/site-packages/uvicorn/protocols/http/auto.py +15 -0
  1876. package/python-runtime/python/lib/python3.12/site-packages/uvicorn/protocols/http/auto_zttp_impl.py +89 -0
  1877. package/python-runtime/python/lib/python3.12/site-packages/uvicorn/protocols/http/flow_control.py +54 -0
  1878. package/python-runtime/python/lib/python3.12/site-packages/uvicorn/protocols/http/h11_impl.py +540 -0
  1879. package/python-runtime/python/lib/python3.12/site-packages/uvicorn/protocols/http/httptools_impl.py +581 -0
  1880. package/python-runtime/python/lib/python3.12/site-packages/uvicorn/protocols/http/zttp_h2_impl.py +559 -0
  1881. package/python-runtime/python/lib/python3.12/site-packages/uvicorn/protocols/http/zttp_impl.py +537 -0
  1882. package/python-runtime/python/lib/python3.12/site-packages/uvicorn/protocols/utils.py +62 -0
  1883. package/python-runtime/python/lib/python3.12/site-packages/uvicorn/protocols/websockets/__init__.py +0 -0
  1884. package/python-runtime/python/lib/python3.12/site-packages/uvicorn/protocols/websockets/auto.py +21 -0
  1885. package/python-runtime/python/lib/python3.12/site-packages/uvicorn/protocols/websockets/websockets_impl.py +390 -0
  1886. package/python-runtime/python/lib/python3.12/site-packages/uvicorn/protocols/websockets/websockets_sansio_impl.py +556 -0
  1887. package/python-runtime/python/lib/python3.12/site-packages/uvicorn/protocols/websockets/wsproto_impl.py +500 -0
  1888. package/python-runtime/python/lib/python3.12/site-packages/uvicorn/py.typed +1 -0
  1889. package/python-runtime/python/lib/python3.12/site-packages/uvicorn/server.py +356 -0
  1890. package/python-runtime/python/lib/python3.12/site-packages/uvicorn/supervisors/__init__.py +16 -0
  1891. package/python-runtime/python/lib/python3.12/site-packages/uvicorn/supervisors/basereload.py +124 -0
  1892. package/python-runtime/python/lib/python3.12/site-packages/uvicorn/supervisors/multiprocess.py +282 -0
  1893. package/python-runtime/python/lib/python3.12/site-packages/uvicorn/supervisors/statreload.py +52 -0
  1894. package/python-runtime/python/lib/python3.12/site-packages/uvicorn/supervisors/watchfilesreload.py +86 -0
  1895. package/python-runtime/python/lib/python3.12/site-packages/uvicorn/workers.py +111 -0
  1896. package/python-runtime/python/lib/python3.12/site-packages/uvicorn-0.54.0.dist-info/INSTALLER +1 -0
  1897. package/python-runtime/python/lib/python3.12/site-packages/uvicorn-0.54.0.dist-info/METADATA +189 -0
  1898. package/python-runtime/python/lib/python3.12/site-packages/uvicorn-0.54.0.dist-info/RECORD +98 -0
  1899. package/python-runtime/python/lib/python3.12/site-packages/uvicorn-0.54.0.dist-info/WHEEL +4 -0
  1900. package/python-runtime/python/lib/python3.12/site-packages/uvicorn-0.54.0.dist-info/entry_points.txt +2 -0
  1901. package/python-runtime/python/lib/python3.12/site.py +693 -0
  1902. package/python-runtime/python/lib/python3.12/smtplib.py +1109 -0
  1903. package/python-runtime/python/lib/python3.12/sndhdr.py +271 -0
  1904. package/python-runtime/python/lib/python3.12/socket.py +983 -0
  1905. package/python-runtime/python/lib/python3.12/socketserver.py +863 -0
  1906. package/python-runtime/python/lib/python3.12/sqlite3/__init__.py +70 -0
  1907. package/python-runtime/python/lib/python3.12/sqlite3/__main__.py +127 -0
  1908. package/python-runtime/python/lib/python3.12/sqlite3/dbapi2.py +108 -0
  1909. package/python-runtime/python/lib/python3.12/sqlite3/dump.py +89 -0
  1910. package/python-runtime/python/lib/python3.12/sre_compile.py +7 -0
  1911. package/python-runtime/python/lib/python3.12/sre_constants.py +7 -0
  1912. package/python-runtime/python/lib/python3.12/sre_parse.py +7 -0
  1913. package/python-runtime/python/lib/python3.12/ssl.py +1488 -0
  1914. package/python-runtime/python/lib/python3.12/stat.py +195 -0
  1915. package/python-runtime/python/lib/python3.12/statistics.py +1454 -0
  1916. package/python-runtime/python/lib/python3.12/string.py +309 -0
  1917. package/python-runtime/python/lib/python3.12/stringprep.py +272 -0
  1918. package/python-runtime/python/lib/python3.12/struct.py +15 -0
  1919. package/python-runtime/python/lib/python3.12/subprocess.py +2216 -0
  1920. package/python-runtime/python/lib/python3.12/sunau.py +533 -0
  1921. package/python-runtime/python/lib/python3.12/symtable.py +362 -0
  1922. package/python-runtime/python/lib/python3.12/sysconfig.py +894 -0
  1923. package/python-runtime/python/lib/python3.12/tabnanny.py +340 -0
  1924. package/python-runtime/python/lib/python3.12/tarfile.py +3031 -0
  1925. package/python-runtime/python/lib/python3.12/telnetlib.py +680 -0
  1926. package/python-runtime/python/lib/python3.12/tempfile.py +956 -0
  1927. package/python-runtime/python/lib/python3.12/textwrap.py +491 -0
  1928. package/python-runtime/python/lib/python3.12/this.py +28 -0
  1929. package/python-runtime/python/lib/python3.12/threading.py +1708 -0
  1930. package/python-runtime/python/lib/python3.12/timeit.py +381 -0
  1931. package/python-runtime/python/lib/python3.12/token.py +143 -0
  1932. package/python-runtime/python/lib/python3.12/tokenize.py +594 -0
  1933. package/python-runtime/python/lib/python3.12/tomllib/__init__.py +10 -0
  1934. package/python-runtime/python/lib/python3.12/tomllib/_parser.py +691 -0
  1935. package/python-runtime/python/lib/python3.12/tomllib/_re.py +107 -0
  1936. package/python-runtime/python/lib/python3.12/tomllib/_types.py +10 -0
  1937. package/python-runtime/python/lib/python3.12/trace.py +748 -0
  1938. package/python-runtime/python/lib/python3.12/traceback.py +1187 -0
  1939. package/python-runtime/python/lib/python3.12/tracemalloc.py +560 -0
  1940. package/python-runtime/python/lib/python3.12/tty.py +73 -0
  1941. package/python-runtime/python/lib/python3.12/turtle.py +4207 -0
  1942. package/python-runtime/python/lib/python3.12/types.py +333 -0
  1943. package/python-runtime/python/lib/python3.12/typing.py +3494 -0
  1944. package/python-runtime/python/lib/python3.12/unittest/__init__.py +85 -0
  1945. package/python-runtime/python/lib/python3.12/unittest/__main__.py +18 -0
  1946. package/python-runtime/python/lib/python3.12/unittest/_log.py +86 -0
  1947. package/python-runtime/python/lib/python3.12/unittest/async_case.py +143 -0
  1948. package/python-runtime/python/lib/python3.12/unittest/case.py +1456 -0
  1949. package/python-runtime/python/lib/python3.12/unittest/loader.py +497 -0
  1950. package/python-runtime/python/lib/python3.12/unittest/main.py +291 -0
  1951. package/python-runtime/python/lib/python3.12/unittest/mock.py +3054 -0
  1952. package/python-runtime/python/lib/python3.12/unittest/result.py +256 -0
  1953. package/python-runtime/python/lib/python3.12/unittest/runner.py +292 -0
  1954. package/python-runtime/python/lib/python3.12/unittest/signals.py +71 -0
  1955. package/python-runtime/python/lib/python3.12/unittest/suite.py +379 -0
  1956. package/python-runtime/python/lib/python3.12/unittest/util.py +170 -0
  1957. package/python-runtime/python/lib/python3.12/urllib/__init__.py +0 -0
  1958. package/python-runtime/python/lib/python3.12/urllib/error.py +74 -0
  1959. package/python-runtime/python/lib/python3.12/urllib/parse.py +1262 -0
  1960. package/python-runtime/python/lib/python3.12/urllib/request.py +2816 -0
  1961. package/python-runtime/python/lib/python3.12/urllib/response.py +84 -0
  1962. package/python-runtime/python/lib/python3.12/urllib/robotparser.py +275 -0
  1963. package/python-runtime/python/lib/python3.12/uu.py +216 -0
  1964. package/python-runtime/python/lib/python3.12/uuid.py +793 -0
  1965. package/python-runtime/python/lib/python3.12/warnings.py +598 -0
  1966. package/python-runtime/python/lib/python3.12/wave.py +653 -0
  1967. package/python-runtime/python/lib/python3.12/weakref.py +674 -0
  1968. package/python-runtime/python/lib/python3.12/webbrowser.py +689 -0
  1969. package/python-runtime/python/lib/python3.12/xdrlib.py +242 -0
  1970. package/python-runtime/python/lib/python3.12/xml/__init__.py +20 -0
  1971. package/python-runtime/python/lib/python3.12/xml/dom/NodeFilter.py +27 -0
  1972. package/python-runtime/python/lib/python3.12/xml/dom/__init__.py +140 -0
  1973. package/python-runtime/python/lib/python3.12/xml/dom/domreg.py +99 -0
  1974. package/python-runtime/python/lib/python3.12/xml/dom/expatbuilder.py +962 -0
  1975. package/python-runtime/python/lib/python3.12/xml/dom/minicompat.py +109 -0
  1976. package/python-runtime/python/lib/python3.12/xml/dom/minidom.py +2008 -0
  1977. package/python-runtime/python/lib/python3.12/xml/dom/pulldom.py +336 -0
  1978. package/python-runtime/python/lib/python3.12/xml/dom/xmlbuilder.py +389 -0
  1979. package/python-runtime/python/lib/python3.12/xml/etree/ElementInclude.py +186 -0
  1980. package/python-runtime/python/lib/python3.12/xml/etree/ElementPath.py +423 -0
  1981. package/python-runtime/python/lib/python3.12/xml/etree/ElementTree.py +2085 -0
  1982. package/python-runtime/python/lib/python3.12/xml/etree/__init__.py +33 -0
  1983. package/python-runtime/python/lib/python3.12/xml/etree/cElementTree.py +3 -0
  1984. package/python-runtime/python/lib/python3.12/xml/parsers/__init__.py +8 -0
  1985. package/python-runtime/python/lib/python3.12/xml/parsers/expat.py +8 -0
  1986. package/python-runtime/python/lib/python3.12/xml/sax/__init__.py +94 -0
  1987. package/python-runtime/python/lib/python3.12/xml/sax/_exceptions.py +127 -0
  1988. package/python-runtime/python/lib/python3.12/xml/sax/expatreader.py +454 -0
  1989. package/python-runtime/python/lib/python3.12/xml/sax/handler.py +387 -0
  1990. package/python-runtime/python/lib/python3.12/xml/sax/saxutils.py +369 -0
  1991. package/python-runtime/python/lib/python3.12/xml/sax/xmlreader.py +378 -0
  1992. package/python-runtime/python/lib/python3.12/zipapp.py +206 -0
  1993. package/python-runtime/python/lib/python3.12/zipfile/__init__.py +2340 -0
  1994. package/python-runtime/python/lib/python3.12/zipfile/__main__.py +4 -0
  1995. package/python-runtime/python/lib/python3.12/zipfile/_path/__init__.py +412 -0
  1996. package/python-runtime/python/lib/python3.12/zipfile/_path/glob.py +53 -0
  1997. package/python-runtime/python/lib/python3.12/zipimport.py +712 -0
  1998. package/python-runtime/python/lib/python3.12/zoneinfo/__init__.py +31 -0
  1999. package/python-runtime/python/lib/python3.12/zoneinfo/_common.py +164 -0
  2000. package/python-runtime/python/lib/python3.12/zoneinfo/_tzpath.py +181 -0
  2001. package/python-runtime/python/lib/python3.12/zoneinfo/_zoneinfo.py +772 -0
  2002. package/python-runtime/python/lib/tcl9/9.0/http-2.10.1.tm +5475 -0
  2003. package/python-runtime/python/lib/tcl9/9.0/msgcat-1.7.1.tm +1349 -0
  2004. package/python-runtime/python/lib/tcl9/9.0/platform/shell-1.1.4.tm +241 -0
  2005. package/python-runtime/python/lib/tcl9/9.0/platform-1.1.0.tm +443 -0
  2006. package/python-runtime/python/lib/tcl9/9.0/tcltest-2.5.10.tm +3588 -0
  2007. package/python-runtime/python/lib/tcl9.0/auto.tcl +711 -0
  2008. package/python-runtime/python/lib/tcl9.0/clock.tcl +2110 -0
  2009. package/python-runtime/python/lib/tcl9.0/cookiejar0.2/cookiejar.tcl +746 -0
  2010. package/python-runtime/python/lib/tcl9.0/cookiejar0.2/idna.tcl +292 -0
  2011. package/python-runtime/python/lib/tcl9.0/cookiejar0.2/pkgIndex.tcl +3 -0
  2012. package/python-runtime/python/lib/tcl9.0/cookiejar0.2/public_suffix_list.dat.gz +0 -0
  2013. package/python-runtime/python/lib/tcl9.0/encoding/ascii.enc +20 -0
  2014. package/python-runtime/python/lib/tcl9.0/encoding/big5.enc +1516 -0
  2015. package/python-runtime/python/lib/tcl9.0/encoding/cns11643.enc +1584 -0
  2016. package/python-runtime/python/lib/tcl9.0/encoding/cp1250.enc +20 -0
  2017. package/python-runtime/python/lib/tcl9.0/encoding/cp1251.enc +20 -0
  2018. package/python-runtime/python/lib/tcl9.0/encoding/cp1252.enc +20 -0
  2019. package/python-runtime/python/lib/tcl9.0/encoding/cp1253.enc +20 -0
  2020. package/python-runtime/python/lib/tcl9.0/encoding/cp1254.enc +20 -0
  2021. package/python-runtime/python/lib/tcl9.0/encoding/cp1255.enc +20 -0
  2022. package/python-runtime/python/lib/tcl9.0/encoding/cp1256.enc +20 -0
  2023. package/python-runtime/python/lib/tcl9.0/encoding/cp1257.enc +20 -0
  2024. package/python-runtime/python/lib/tcl9.0/encoding/cp1258.enc +20 -0
  2025. package/python-runtime/python/lib/tcl9.0/encoding/cp165.enc +20 -0
  2026. package/python-runtime/python/lib/tcl9.0/encoding/cp437.enc +20 -0
  2027. package/python-runtime/python/lib/tcl9.0/encoding/cp737.enc +20 -0
  2028. package/python-runtime/python/lib/tcl9.0/encoding/cp775.enc +20 -0
  2029. package/python-runtime/python/lib/tcl9.0/encoding/cp850.enc +20 -0
  2030. package/python-runtime/python/lib/tcl9.0/encoding/cp852.enc +20 -0
  2031. package/python-runtime/python/lib/tcl9.0/encoding/cp855.enc +20 -0
  2032. package/python-runtime/python/lib/tcl9.0/encoding/cp857.enc +20 -0
  2033. package/python-runtime/python/lib/tcl9.0/encoding/cp860.enc +20 -0
  2034. package/python-runtime/python/lib/tcl9.0/encoding/cp861.enc +20 -0
  2035. package/python-runtime/python/lib/tcl9.0/encoding/cp862.enc +20 -0
  2036. package/python-runtime/python/lib/tcl9.0/encoding/cp863.enc +20 -0
  2037. package/python-runtime/python/lib/tcl9.0/encoding/cp864.enc +20 -0
  2038. package/python-runtime/python/lib/tcl9.0/encoding/cp865.enc +20 -0
  2039. package/python-runtime/python/lib/tcl9.0/encoding/cp866.enc +20 -0
  2040. package/python-runtime/python/lib/tcl9.0/encoding/cp869.enc +20 -0
  2041. package/python-runtime/python/lib/tcl9.0/encoding/cp874.enc +20 -0
  2042. package/python-runtime/python/lib/tcl9.0/encoding/cp932.enc +801 -0
  2043. package/python-runtime/python/lib/tcl9.0/encoding/cp936.enc +2162 -0
  2044. package/python-runtime/python/lib/tcl9.0/encoding/cp949.enc +2128 -0
  2045. package/python-runtime/python/lib/tcl9.0/encoding/cp950.enc +1499 -0
  2046. package/python-runtime/python/lib/tcl9.0/encoding/dingbats.enc +20 -0
  2047. package/python-runtime/python/lib/tcl9.0/encoding/ebcdic.enc +20 -0
  2048. package/python-runtime/python/lib/tcl9.0/encoding/euc-cn.enc +1397 -0
  2049. package/python-runtime/python/lib/tcl9.0/encoding/euc-jp.enc +1353 -0
  2050. package/python-runtime/python/lib/tcl9.0/encoding/euc-kr.enc +1533 -0
  2051. package/python-runtime/python/lib/tcl9.0/encoding/gb12345.enc +1414 -0
  2052. package/python-runtime/python/lib/tcl9.0/encoding/gb1988.enc +20 -0
  2053. package/python-runtime/python/lib/tcl9.0/encoding/gb2312-raw.enc +1380 -0
  2054. package/python-runtime/python/lib/tcl9.0/encoding/gb2312.enc +1397 -0
  2055. package/python-runtime/python/lib/tcl9.0/encoding/iso2022-jp.enc +12 -0
  2056. package/python-runtime/python/lib/tcl9.0/encoding/iso2022-kr.enc +7 -0
  2057. package/python-runtime/python/lib/tcl9.0/encoding/iso2022.enc +14 -0
  2058. package/python-runtime/python/lib/tcl9.0/encoding/iso8859-1.enc +20 -0
  2059. package/python-runtime/python/lib/tcl9.0/encoding/iso8859-10.enc +20 -0
  2060. package/python-runtime/python/lib/tcl9.0/encoding/iso8859-11.enc +20 -0
  2061. package/python-runtime/python/lib/tcl9.0/encoding/iso8859-13.enc +20 -0
  2062. package/python-runtime/python/lib/tcl9.0/encoding/iso8859-14.enc +20 -0
  2063. package/python-runtime/python/lib/tcl9.0/encoding/iso8859-15.enc +20 -0
  2064. package/python-runtime/python/lib/tcl9.0/encoding/iso8859-16.enc +20 -0
  2065. package/python-runtime/python/lib/tcl9.0/encoding/iso8859-2.enc +20 -0
  2066. package/python-runtime/python/lib/tcl9.0/encoding/iso8859-3.enc +20 -0
  2067. package/python-runtime/python/lib/tcl9.0/encoding/iso8859-4.enc +20 -0
  2068. package/python-runtime/python/lib/tcl9.0/encoding/iso8859-5.enc +20 -0
  2069. package/python-runtime/python/lib/tcl9.0/encoding/iso8859-6.enc +20 -0
  2070. package/python-runtime/python/lib/tcl9.0/encoding/iso8859-7.enc +20 -0
  2071. package/python-runtime/python/lib/tcl9.0/encoding/iso8859-8.enc +20 -0
  2072. package/python-runtime/python/lib/tcl9.0/encoding/iso8859-9.enc +20 -0
  2073. package/python-runtime/python/lib/tcl9.0/encoding/jis0201.enc +20 -0
  2074. package/python-runtime/python/lib/tcl9.0/encoding/jis0208.enc +1319 -0
  2075. package/python-runtime/python/lib/tcl9.0/encoding/jis0212.enc +1159 -0
  2076. package/python-runtime/python/lib/tcl9.0/encoding/koi8-r.enc +20 -0
  2077. package/python-runtime/python/lib/tcl9.0/encoding/koi8-ru.enc +20 -0
  2078. package/python-runtime/python/lib/tcl9.0/encoding/koi8-t.enc +20 -0
  2079. package/python-runtime/python/lib/tcl9.0/encoding/koi8-u.enc +20 -0
  2080. package/python-runtime/python/lib/tcl9.0/encoding/ksc5601.enc +1516 -0
  2081. package/python-runtime/python/lib/tcl9.0/encoding/macCentEuro.enc +20 -0
  2082. package/python-runtime/python/lib/tcl9.0/encoding/macCroatian.enc +20 -0
  2083. package/python-runtime/python/lib/tcl9.0/encoding/macCyrillic.enc +20 -0
  2084. package/python-runtime/python/lib/tcl9.0/encoding/macDingbats.enc +20 -0
  2085. package/python-runtime/python/lib/tcl9.0/encoding/macGreek.enc +20 -0
  2086. package/python-runtime/python/lib/tcl9.0/encoding/macIceland.enc +20 -0
  2087. package/python-runtime/python/lib/tcl9.0/encoding/macJapan.enc +785 -0
  2088. package/python-runtime/python/lib/tcl9.0/encoding/macRoman.enc +20 -0
  2089. package/python-runtime/python/lib/tcl9.0/encoding/macRomania.enc +20 -0
  2090. package/python-runtime/python/lib/tcl9.0/encoding/macThai.enc +20 -0
  2091. package/python-runtime/python/lib/tcl9.0/encoding/macTurkish.enc +20 -0
  2092. package/python-runtime/python/lib/tcl9.0/encoding/macUkraine.enc +20 -0
  2093. package/python-runtime/python/lib/tcl9.0/encoding/shiftjis.enc +690 -0
  2094. package/python-runtime/python/lib/tcl9.0/encoding/symbol.enc +20 -0
  2095. package/python-runtime/python/lib/tcl9.0/encoding/tis-620.enc +20 -0
  2096. package/python-runtime/python/lib/tcl9.0/foreachline.tcl +25 -0
  2097. package/python-runtime/python/lib/tcl9.0/history.tcl +335 -0
  2098. package/python-runtime/python/lib/tcl9.0/icu.tcl +145 -0
  2099. package/python-runtime/python/lib/tcl9.0/init.tcl +773 -0
  2100. package/python-runtime/python/lib/tcl9.0/install.tcl +275 -0
  2101. package/python-runtime/python/lib/tcl9.0/opt0.4/optparse.tcl +1069 -0
  2102. package/python-runtime/python/lib/tcl9.0/opt0.4/pkgIndex.tcl +12 -0
  2103. package/python-runtime/python/lib/tcl9.0/package.tcl +767 -0
  2104. package/python-runtime/python/lib/tcl9.0/parray.tcl +28 -0
  2105. package/python-runtime/python/lib/tcl9.0/readfile.tcl +23 -0
  2106. package/python-runtime/python/lib/tcl9.0/safe.tcl +1461 -0
  2107. package/python-runtime/python/lib/tcl9.0/tclAppInit.c +183 -0
  2108. package/python-runtime/python/lib/tcl9.0/tclIndex +112 -0
  2109. package/python-runtime/python/lib/tcl9.0/tm.tcl +378 -0
  2110. package/python-runtime/python/lib/tcl9.0/word.tcl +155 -0
  2111. package/python-runtime/python/lib/tcl9.0/writefile.tcl +37 -0
  2112. package/python-runtime/python/lib/thread3.0.4/libtcl9thread3.0.4.dylib +0 -0
  2113. package/python-runtime/python/lib/thread3.0.4/libthread3.0.4.dylib +0 -0
  2114. package/python-runtime/python/lib/thread3.0.4/pkgIndex.tcl +52 -0
  2115. package/python-runtime/python/lib/thread3.0.4/ttrace.tcl +943 -0
  2116. package/python-runtime/python/lib/tk9.0/bgerror.tcl +282 -0
  2117. package/python-runtime/python/lib/tk9.0/button.tcl +782 -0
  2118. package/python-runtime/python/lib/tk9.0/choosedir.tcl +310 -0
  2119. package/python-runtime/python/lib/tk9.0/clrpick.tcl +696 -0
  2120. package/python-runtime/python/lib/tk9.0/comdlg.tcl +322 -0
  2121. package/python-runtime/python/lib/tk9.0/console.tcl +1148 -0
  2122. package/python-runtime/python/lib/tk9.0/dialog.tcl +175 -0
  2123. package/python-runtime/python/lib/tk9.0/entry.tcl +720 -0
  2124. package/python-runtime/python/lib/tk9.0/focus.tcl +178 -0
  2125. package/python-runtime/python/lib/tk9.0/fontchooser.tcl +512 -0
  2126. package/python-runtime/python/lib/tk9.0/iconbadges.tcl +253 -0
  2127. package/python-runtime/python/lib/tk9.0/iconlist.tcl +705 -0
  2128. package/python-runtime/python/lib/tk9.0/icons.tcl +54 -0
  2129. package/python-runtime/python/lib/tk9.0/images/README +7 -0
  2130. package/python-runtime/python/lib/tk9.0/images/logo.eps +2091 -0
  2131. package/python-runtime/python/lib/tk9.0/images/logo100.gif +0 -0
  2132. package/python-runtime/python/lib/tk9.0/images/logo64.gif +0 -0
  2133. package/python-runtime/python/lib/tk9.0/images/logoLarge.gif +0 -0
  2134. package/python-runtime/python/lib/tk9.0/images/logoMed.gif +0 -0
  2135. package/python-runtime/python/lib/tk9.0/images/pwrdLogo.eps +1897 -0
  2136. package/python-runtime/python/lib/tk9.0/images/pwrdLogo100.gif +0 -0
  2137. package/python-runtime/python/lib/tk9.0/images/pwrdLogo150.gif +0 -0
  2138. package/python-runtime/python/lib/tk9.0/images/pwrdLogo175.gif +0 -0
  2139. package/python-runtime/python/lib/tk9.0/images/pwrdLogo200.gif +0 -0
  2140. package/python-runtime/python/lib/tk9.0/images/pwrdLogo75.gif +0 -0
  2141. package/python-runtime/python/lib/tk9.0/images/tai-ku.gif +0 -0
  2142. package/python-runtime/python/lib/tk9.0/listbox.tcl +522 -0
  2143. package/python-runtime/python/lib/tk9.0/megawidget.tcl +297 -0
  2144. package/python-runtime/python/lib/tk9.0/menu.tcl +1376 -0
  2145. package/python-runtime/python/lib/tk9.0/mkpsenc.tcl +1488 -0
  2146. package/python-runtime/python/lib/tk9.0/msgbox.tcl +454 -0
  2147. package/python-runtime/python/lib/tk9.0/optMenu.tcl +43 -0
  2148. package/python-runtime/python/lib/tk9.0/palette.tcl +283 -0
  2149. package/python-runtime/python/lib/tk9.0/panedwindow.tcl +194 -0
  2150. package/python-runtime/python/lib/tk9.0/pkgIndex.tcl +3 -0
  2151. package/python-runtime/python/lib/tk9.0/print.tcl +1460 -0
  2152. package/python-runtime/python/lib/tk9.0/safetk.tcl +262 -0
  2153. package/python-runtime/python/lib/tk9.0/scale.tcl +299 -0
  2154. package/python-runtime/python/lib/tk9.0/scaling.tcl +232 -0
  2155. package/python-runtime/python/lib/tk9.0/scrlbar.tcl +500 -0
  2156. package/python-runtime/python/lib/tk9.0/spinbox.tcl +580 -0
  2157. package/python-runtime/python/lib/tk9.0/systray.tcl +483 -0
  2158. package/python-runtime/python/lib/tk9.0/tclIndex +252 -0
  2159. package/python-runtime/python/lib/tk9.0/tearoff.tcl +155 -0
  2160. package/python-runtime/python/lib/tk9.0/text.tcl +1295 -0
  2161. package/python-runtime/python/lib/tk9.0/tk.tcl +853 -0
  2162. package/python-runtime/python/lib/tk9.0/tkAppInit.c +200 -0
  2163. package/python-runtime/python/lib/tk9.0/tkfbox.tcl +1251 -0
  2164. package/python-runtime/python/lib/tk9.0/ttk/altTheme.tcl +153 -0
  2165. package/python-runtime/python/lib/tk9.0/ttk/aquaTheme.tcl +178 -0
  2166. package/python-runtime/python/lib/tk9.0/ttk/button.tcl +83 -0
  2167. package/python-runtime/python/lib/tk9.0/ttk/clamTheme.tcl +196 -0
  2168. package/python-runtime/python/lib/tk9.0/ttk/classicTheme.tcl +145 -0
  2169. package/python-runtime/python/lib/tk9.0/ttk/combobox.tcl +555 -0
  2170. package/python-runtime/python/lib/tk9.0/ttk/cursors.tcl +205 -0
  2171. package/python-runtime/python/lib/tk9.0/ttk/defaults.tcl +231 -0
  2172. package/python-runtime/python/lib/tk9.0/ttk/entry.tcl +678 -0
  2173. package/python-runtime/python/lib/tk9.0/ttk/fonts.tcl +152 -0
  2174. package/python-runtime/python/lib/tk9.0/ttk/menubutton.tcl +237 -0
  2175. package/python-runtime/python/lib/tk9.0/ttk/notebook.tcl +255 -0
  2176. package/python-runtime/python/lib/tk9.0/ttk/panedwindow.tcl +89 -0
  2177. package/python-runtime/python/lib/tk9.0/ttk/progress.tcl +55 -0
  2178. package/python-runtime/python/lib/tk9.0/ttk/scale.tcl +94 -0
  2179. package/python-runtime/python/lib/tk9.0/ttk/scrollbar.tcl +119 -0
  2180. package/python-runtime/python/lib/tk9.0/ttk/sizegrip.tcl +102 -0
  2181. package/python-runtime/python/lib/tk9.0/ttk/spinbox.tcl +204 -0
  2182. package/python-runtime/python/lib/tk9.0/ttk/treeview.tcl +464 -0
  2183. package/python-runtime/python/lib/tk9.0/ttk/ttk.tcl +223 -0
  2184. package/python-runtime/python/lib/tk9.0/ttk/utils.tcl +317 -0
  2185. package/python-runtime/python/lib/tk9.0/ttk/vistaTheme.tcl +259 -0
  2186. package/python-runtime/python/lib/tk9.0/ttk/winTheme.tcl +119 -0
  2187. package/python-runtime/python/lib/tk9.0/ttk/xpTheme.tcl +95 -0
  2188. package/python-runtime/python/lib/tk9.0/xmfbox.tcl +982 -0
  2189. package/python-runtime/python/share/man/man1/python3.1 +630 -0
  2190. package/python-runtime/python/share/man/man1/python3.12.1 +630 -0
  2191. package/runtime.json +8768 -0
  2192. package/README.md +0 -3
@@ -0,0 +1,3281 @@
1
+ """!!! abstract "Usage Documentation"
2
+ [JSON Schema](../concepts/json_schema.md)
3
+
4
+ The `json_schema` module contains classes and functions to allow the way [JSON Schema](https://json-schema.org/)
5
+ is generated to be customized.
6
+
7
+ In general you shouldn't need to use this module directly; instead, you can use
8
+ [`BaseModel.model_json_schema`][pydantic.BaseModel.model_json_schema] and
9
+ [`TypeAdapter.json_schema`][pydantic.TypeAdapter.json_schema].
10
+ """
11
+
12
+ from __future__ import annotations as _annotations
13
+
14
+ import collections.abc
15
+ import dataclasses
16
+ import inspect
17
+ import math
18
+ import os
19
+ import re
20
+ import warnings
21
+ from collections import Counter, defaultdict
22
+ from collections.abc import Callable, Hashable, Iterable, Sequence
23
+ from copy import deepcopy
24
+ from enum import Enum
25
+ from re import Pattern
26
+ from typing import (
27
+ TYPE_CHECKING,
28
+ Annotated,
29
+ Any,
30
+ Literal,
31
+ NewType,
32
+ TypeAlias,
33
+ TypeVar,
34
+ cast,
35
+ overload,
36
+ )
37
+
38
+ import pydantic_core
39
+ from pydantic_core import MISSING, CoreSchema, PydanticOmit, core_schema, to_jsonable_python
40
+ from pydantic_core.core_schema import ComputedField
41
+ from typing_extensions import assert_never, deprecated, final
42
+ from typing_inspection.introspection import get_literal_values
43
+
44
+ from pydantic.warnings import PydanticDeprecatedSince26, PydanticDeprecatedSince29
45
+
46
+ from ._internal import (
47
+ _config,
48
+ _core_metadata,
49
+ _core_utils,
50
+ _decorators,
51
+ _mock_val_ser,
52
+ _schema_generation_shared,
53
+ _typing_extra,
54
+ )
55
+ from .annotated_handlers import GetJsonSchemaHandler
56
+ from .config import JsonDict, JsonValue
57
+ from .errors import PydanticInvalidForJsonSchema, PydanticUserError
58
+
59
+ if TYPE_CHECKING:
60
+ from . import ConfigDict
61
+ from ._internal._core_utils import CoreSchemaField, CoreSchemaOrField
62
+ from ._internal._dataclasses import PydanticDataclass
63
+ from ._internal._schema_generation_shared import GetJsonSchemaFunction
64
+ from .main import BaseModel
65
+
66
+
67
+ CoreSchemaOrFieldType = Literal[core_schema.CoreSchemaType, core_schema.CoreSchemaFieldType]
68
+ """
69
+ A type alias for defined schema types that represents a union of
70
+ `core_schema.CoreSchemaType` and
71
+ `core_schema.CoreSchemaFieldType`.
72
+ """
73
+
74
+ JsonSchemaValue = dict[str, Any]
75
+ """
76
+ A type alias for a JSON schema value. This is a dictionary of string keys to arbitrary JSON values.
77
+ """
78
+
79
+ JsonSchemaMode = Literal['validation', 'serialization']
80
+ """
81
+ A type alias that represents the mode of a JSON schema; either 'validation' or 'serialization'.
82
+
83
+ For some types, the inputs to validation differ from the outputs of serialization. For example,
84
+ computed fields will only be present when serializing, and should not be provided when
85
+ validating. This flag provides a way to indicate whether you want the JSON schema required
86
+ for validation inputs, or that will be matched by serialization outputs.
87
+ """
88
+
89
+ _MODE_TITLE_MAPPING: dict[JsonSchemaMode, str] = {'validation': 'Input', 'serialization': 'Output'}
90
+
91
+
92
+ JsonSchemaWarningKind = Literal['skipped-choice', 'non-serializable-default', 'skipped-discriminator']
93
+ """
94
+ A type alias representing the kinds of warnings that can be emitted during JSON schema generation.
95
+
96
+ See [`GenerateJsonSchema.render_warning_message`][pydantic.json_schema.GenerateJsonSchema.render_warning_message]
97
+ for more details.
98
+ """
99
+
100
+
101
+ class PydanticJsonSchemaWarning(UserWarning):
102
+ """This class is used to emit warnings produced during JSON schema generation.
103
+ See the [`GenerateJsonSchema.emit_warning`][pydantic.json_schema.GenerateJsonSchema.emit_warning] and
104
+ [`GenerateJsonSchema.render_warning_message`][pydantic.json_schema.GenerateJsonSchema.render_warning_message]
105
+ methods for more details; these can be overridden to control warning behavior.
106
+ """
107
+
108
+
109
+ NoDefault = object()
110
+ """A sentinel value used to indicate that no default value should be used when generating a JSON Schema
111
+ for a core schema with a default value.
112
+ """
113
+
114
+
115
+ # ##### JSON Schema Generation #####
116
+ DEFAULT_REF_TEMPLATE = '#/$defs/{model}'
117
+ """The default format string used to generate reference names."""
118
+
119
+ # There are three types of references relevant to building JSON schemas:
120
+ # 1. core_schema "ref" values; these are not exposed as part of the JSON schema
121
+ # * these might look like the fully qualified path of a model, its id, or something similar
122
+ CoreRef = NewType('CoreRef', str)
123
+ # 2. keys of the "definitions" object that will eventually go into the JSON schema
124
+ # * by default, these look like "MyModel", though may change in the presence of collisions
125
+ # * eventually, we may want to make it easier to modify the way these names are generated
126
+ DefsRef = NewType('DefsRef', str)
127
+ # 3. the values corresponding to the "$ref" key in the schema
128
+ # * By default, these look like "#/$defs/MyModel", as in {"$ref": "#/$defs/MyModel"}
129
+ JsonRef = NewType('JsonRef', str)
130
+
131
+ CoreModeRef = tuple[CoreRef, JsonSchemaMode]
132
+ JsonSchemaKeyT = TypeVar('JsonSchemaKeyT', bound=Hashable)
133
+
134
+ _PRIMITIVE_JSON_SCHEMA_TYPES = ('string', 'boolean', 'null', 'integer', 'number')
135
+
136
+
137
+ @dataclasses.dataclass(slots=True)
138
+ class _DefinitionsRemapping:
139
+ defs_remapping: dict[DefsRef, DefsRef]
140
+ json_remapping: dict[JsonRef, JsonRef]
141
+
142
+ @staticmethod
143
+ def from_prioritized_choices(
144
+ prioritized_choices: dict[DefsRef, list[DefsRef]],
145
+ defs_to_json: dict[DefsRef, JsonRef],
146
+ definitions: dict[DefsRef, JsonSchemaValue],
147
+ ) -> _DefinitionsRemapping:
148
+ """
149
+ This function should produce a remapping that replaces complex DefsRef with the simpler ones from the
150
+ prioritized_choices such that applying the name remapping would result in an equivalent JSON schema.
151
+ """
152
+ # We need to iteratively simplify the definitions until we reach a fixed point.
153
+ # The reason for this is that outer definitions may reference inner definitions that get simplified
154
+ # into an equivalent reference, and the outer definitions won't be equivalent until we've simplified
155
+ # the inner definitions.
156
+ copied_definitions = deepcopy(definitions)
157
+ definitions_schema = {'$defs': copied_definitions}
158
+ for _iter in range(100): # prevent an infinite loop in the case of a bug, 100 iterations should be enough
159
+ # For every possible remapped DefsRef, collect all schemas that DefsRef might be used for:
160
+ schemas_for_alternatives: dict[DefsRef, list[JsonSchemaValue]] = defaultdict(list)
161
+ for defs_ref in copied_definitions:
162
+ alternatives = prioritized_choices[defs_ref]
163
+ for alternative in alternatives:
164
+ schemas_for_alternatives[alternative].append(copied_definitions[defs_ref])
165
+
166
+ # Deduplicate the schemas for each alternative; the idea is that we only want to remap to a new DefsRef
167
+ # if it introduces no ambiguity, i.e., there is only one distinct schema for that DefsRef.
168
+ for defs_ref in schemas_for_alternatives:
169
+ schemas_for_alternatives[defs_ref] = _deduplicate_schemas(schemas_for_alternatives[defs_ref])
170
+
171
+ # Build the remapping
172
+ defs_remapping: dict[DefsRef, DefsRef] = {}
173
+ json_remapping: dict[JsonRef, JsonRef] = {}
174
+ for original_defs_ref in definitions:
175
+ alternatives = prioritized_choices[original_defs_ref]
176
+ # Pick the first alternative that has only one schema, since that means there is no collision
177
+ remapped_defs_ref = next(x for x in alternatives if len(schemas_for_alternatives[x]) == 1)
178
+ defs_remapping[original_defs_ref] = remapped_defs_ref
179
+
180
+ # Map all alternatives after the remapped one to the remapped one
181
+ # This ensures that intermediate simplifications are also remapped
182
+ remapped_index = alternatives.index(remapped_defs_ref)
183
+ for alt in alternatives[remapped_index:]:
184
+ json_remapping[defs_to_json[alt]] = defs_to_json[remapped_defs_ref]
185
+ remapping = _DefinitionsRemapping(defs_remapping, json_remapping)
186
+ new_definitions_schema = remapping.remap_json_schema({'$defs': copied_definitions})
187
+ if definitions_schema == new_definitions_schema:
188
+ # We've reached the fixed point
189
+ return remapping
190
+ definitions_schema = new_definitions_schema
191
+
192
+ raise PydanticInvalidForJsonSchema('Failed to simplify the JSON schema definitions')
193
+
194
+ def remap_defs_ref(self, ref: DefsRef) -> DefsRef:
195
+ return self.defs_remapping.get(ref, ref)
196
+
197
+ def remap_json_ref(self, ref: JsonRef) -> JsonRef:
198
+ return self.json_remapping.get(ref, ref)
199
+
200
+ def remap_json_schema(self, schema: Any) -> Any:
201
+ """
202
+ Recursively update the JSON schema replacing all $refs
203
+ """
204
+ if isinstance(schema, str):
205
+ # Note: this may not really be a JsonRef; we rely on having no collisions between JsonRefs and other strings
206
+ return self.remap_json_ref(JsonRef(schema))
207
+ elif isinstance(schema, list):
208
+ return [self.remap_json_schema(item) for item in schema]
209
+ elif isinstance(schema, dict):
210
+ for key, value in schema.items():
211
+ if key == '$ref' and isinstance(value, str):
212
+ schema['$ref'] = self.remap_json_ref(JsonRef(value))
213
+ elif key == '$defs':
214
+ schema['$defs'] = {
215
+ self.remap_defs_ref(DefsRef(key)): self.remap_json_schema(value)
216
+ for key, value in schema['$defs'].items()
217
+ }
218
+ else:
219
+ schema[key] = self.remap_json_schema(value)
220
+ return schema
221
+
222
+
223
+ class GenerateJsonSchema:
224
+ """!!! abstract "Usage Documentation"
225
+ [Customizing the JSON Schema Generation Process](../concepts/json_schema.md#customizing-the-json-schema-generation-process)
226
+
227
+ A class for generating JSON schemas.
228
+
229
+ This class generates JSON schemas based on configured parameters. The default schema dialect
230
+ is [https://json-schema.org/draft/2020-12/schema](https://json-schema.org/draft/2020-12/schema).
231
+ The class uses `by_alias` to configure how fields with
232
+ multiple names are handled and `ref_template` to format reference names.
233
+
234
+ Attributes:
235
+ schema_dialect: The JSON schema dialect used to generate the schema. See
236
+ [Declaring a Dialect](https://json-schema.org/understanding-json-schema/reference/schema.html#id4)
237
+ in the JSON Schema documentation for more information about dialects.
238
+ ignored_warning_kinds: Warnings to ignore when generating the schema. `self.render_warning_message` will
239
+ do nothing if its argument `kind` is in `ignored_warning_kinds`;
240
+ this value can be modified on subclasses to easily control which warnings are emitted.
241
+ by_alias: Whether to use field aliases when generating the schema.
242
+ ref_template: The format string used when generating reference names.
243
+ core_to_json_refs: A mapping of core refs to JSON refs.
244
+ core_to_defs_refs: A mapping of core refs to definition refs.
245
+ defs_to_core_refs: A mapping of definition refs to core refs.
246
+ json_to_defs_refs: A mapping of JSON refs to definition refs.
247
+ definitions: Definitions in the schema.
248
+
249
+ Args:
250
+ by_alias: Whether to use field aliases as keys in the generated JSON Schema. If `None` (the default),
251
+ aliases are used unless disabled by the configuration (i.e. `validate_by_alias=False` for validation
252
+ schemas). An explicit value takes precedence over the configuration.
253
+ ref_template: The format string to use when generating reference names.
254
+ union_format: The format to use when combining schemas from unions together. Can be one of:
255
+
256
+ - `'any_of'`: Use the [`anyOf`](https://json-schema.org/understanding-json-schema/reference/combining#anyOf)
257
+ keyword to combine schemas (the default).
258
+ - `'primitive_type_array'`: Use the [`type`](https://json-schema.org/understanding-json-schema/reference/type)
259
+ keyword as an array of strings, containing each type of the combination. If any of the schemas is not a primitive
260
+ type (`string`, `boolean`, `null`, `integer` or `number`) or contains constraints/metadata, falls back to
261
+ `any_of`.
262
+
263
+ Raises:
264
+ JsonSchemaError: If the instance of the class is inadvertently reused after generating a schema.
265
+ """
266
+
267
+ schema_dialect = 'https://json-schema.org/draft/2020-12/schema'
268
+
269
+ # `self.render_warning_message` will do nothing if its argument `kind` is in `ignored_warning_kinds`;
270
+ # this value can be modified on subclasses to easily control which warnings are emitted
271
+ ignored_warning_kinds: set[JsonSchemaWarningKind] = {'skipped-choice'}
272
+
273
+ def __init__(
274
+ self,
275
+ by_alias: bool | None = None,
276
+ ref_template: str = DEFAULT_REF_TEMPLATE,
277
+ union_format: Literal['any_of', 'primitive_type_array'] = 'any_of',
278
+ ) -> None:
279
+ # `None` means "not explicitly set": aliases are used, unless disabled by the config (e.g. `validate_by_alias`)
280
+ self._by_alias = by_alias
281
+ self.by_alias = by_alias is not False
282
+ self.ref_template = ref_template
283
+ self.union_format: Literal['any_of', 'primitive_type_array'] = union_format
284
+
285
+ self.core_to_json_refs: dict[CoreModeRef, JsonRef] = {}
286
+ self.core_to_defs_refs: dict[CoreModeRef, DefsRef] = {}
287
+ self.defs_to_core_refs: dict[DefsRef, CoreModeRef] = {}
288
+ self.json_to_defs_refs: dict[JsonRef, DefsRef] = {}
289
+
290
+ self.definitions: dict[DefsRef, JsonSchemaValue] = {}
291
+ self._config_wrapper_stack = _config.ConfigWrapperStack(_config.ConfigWrapper({}))
292
+
293
+ self._mode: JsonSchemaMode = 'validation'
294
+
295
+ # The following includes a mapping of a fully-unique defs ref choice to a list of preferred
296
+ # alternatives, which are generally simpler, such as only including the class name.
297
+ # At the end of schema generation, we use these to produce a JSON schema with more human-readable
298
+ # definitions, which would also work better in a generated OpenAPI client, etc.
299
+ self._prioritized_defsref_choices: dict[DefsRef, list[DefsRef]] = {}
300
+ self._collision_counter: dict[str, int] = defaultdict(int)
301
+ self._collision_index: dict[str, int] = {}
302
+
303
+ self._schema_type_to_method = self.build_schema_type_to_method()
304
+
305
+ # When we encounter definitions we need to try to build them immediately
306
+ # so that they are available schemas that reference them
307
+ # But it's possible that CoreSchema was never going to be used
308
+ # (e.g. because the CoreSchema that references short circuits is JSON schema generation without needing
309
+ # the reference) so instead of failing altogether if we can't build a definition we
310
+ # store the error raised and re-throw it if we end up needing that def
311
+ self._core_defs_invalid_for_json_schema: dict[DefsRef, PydanticInvalidForJsonSchema] = {}
312
+
313
+ # This changes to True after generating a schema, to prevent issues caused by accidental reuse
314
+ # of a single instance of a schema generator
315
+ self._used = False
316
+
317
+ @property
318
+ def _config(self) -> _config.ConfigWrapper:
319
+ return self._config_wrapper_stack.tail
320
+
321
+ @property
322
+ def mode(self) -> JsonSchemaMode:
323
+ if self._config.json_schema_mode_override is not None:
324
+ return self._config.json_schema_mode_override
325
+ else:
326
+ return self._mode
327
+
328
+ def build_schema_type_to_method(
329
+ self,
330
+ ) -> dict[CoreSchemaOrFieldType, Callable[[CoreSchemaOrField], JsonSchemaValue]]:
331
+ """Builds a dictionary mapping fields to methods for generating JSON schemas.
332
+
333
+ Returns:
334
+ A dictionary containing the mapping of `CoreSchemaOrFieldType` to a handler method.
335
+
336
+ Raises:
337
+ TypeError: If no method has been defined for generating a JSON schema for a given pydantic core schema type.
338
+ """
339
+ mapping: dict[CoreSchemaOrFieldType, Callable[[CoreSchemaOrField], JsonSchemaValue]] = {}
340
+ core_schema_types: list[CoreSchemaOrFieldType] = list(get_literal_values(CoreSchemaOrFieldType))
341
+ for key in core_schema_types:
342
+ method_name = f'{key.replace("-", "_")}_schema'
343
+ try:
344
+ mapping[key] = getattr(self, method_name)
345
+ except AttributeError as e: # pragma: no cover
346
+ if os.getenv('PYDANTIC_PRIVATE_ALLOW_UNHANDLED_SCHEMA_TYPES'):
347
+ continue
348
+ raise TypeError(
349
+ f'No method for generating JsonSchema for core_schema.type={key!r} '
350
+ f'(expected: {type(self).__name__}.{method_name})'
351
+ ) from e
352
+ return mapping
353
+
354
+ def generate_definitions(
355
+ self, inputs: Sequence[tuple[JsonSchemaKeyT, JsonSchemaMode, core_schema.CoreSchema]]
356
+ ) -> tuple[dict[tuple[JsonSchemaKeyT, JsonSchemaMode], JsonSchemaValue], dict[DefsRef, JsonSchemaValue]]:
357
+ """Generates JSON schema definitions from a list of core schemas, pairing the generated definitions with a
358
+ mapping that links the input keys to the definition references.
359
+
360
+ Args:
361
+ inputs: A sequence of tuples, where:
362
+
363
+ - The first element is a JSON schema key type.
364
+ - The second element is the JSON mode: either 'validation' or 'serialization'.
365
+ - The third element is a core schema.
366
+
367
+ Returns:
368
+ A tuple where:
369
+
370
+ - The first element is a dictionary whose keys are tuples of JSON schema key type and JSON mode, and
371
+ whose values are the JSON schema corresponding to that pair of inputs. (These schemas may have
372
+ JsonRef references to definitions that are defined in the second returned element.)
373
+ - The second element is a dictionary whose keys are definition references for the JSON schemas
374
+ from the first returned element, and whose values are the actual JSON schema definitions.
375
+
376
+ Raises:
377
+ PydanticUserError: Raised if the JSON schema generator has already been used to generate a JSON schema.
378
+ """
379
+ if self._used:
380
+ raise PydanticUserError(
381
+ 'This JSON schema generator has already been used to generate a JSON schema. '
382
+ f'You must create a new instance of {type(self).__name__} to generate a new JSON schema.',
383
+ code='json-schema-already-used',
384
+ )
385
+
386
+ for _, mode, schema in inputs:
387
+ self._mode = mode
388
+ self.generate_inner(schema)
389
+
390
+ definitions_remapping = self._build_definitions_remapping()
391
+
392
+ json_schemas_map: dict[tuple[JsonSchemaKeyT, JsonSchemaMode], DefsRef] = {}
393
+ for key, mode, schema in inputs:
394
+ self._mode = mode
395
+ json_schema = self.generate_inner(schema)
396
+ json_schemas_map[(key, mode)] = definitions_remapping.remap_json_schema(json_schema)
397
+
398
+ json_schema = {'$defs': self.definitions}
399
+ json_schema = definitions_remapping.remap_json_schema(json_schema)
400
+ self._used = True
401
+ return json_schemas_map, self.sort(json_schema['$defs']) # type: ignore
402
+
403
+ def generate(self, schema: CoreSchema, mode: JsonSchemaMode = 'validation') -> JsonSchemaValue:
404
+ """Generates a JSON schema for a specified schema in a specified mode.
405
+
406
+ Args:
407
+ schema: A Pydantic model.
408
+ mode: The mode in which to generate the schema. Defaults to 'validation'.
409
+
410
+ Returns:
411
+ A JSON schema representing the specified schema.
412
+
413
+ Raises:
414
+ PydanticUserError: If the JSON schema generator has already been used to generate a JSON schema.
415
+ """
416
+ self._mode = mode
417
+ if self._used:
418
+ raise PydanticUserError(
419
+ 'This JSON schema generator has already been used to generate a JSON schema. '
420
+ f'You must create a new instance of {type(self).__name__} to generate a new JSON schema.',
421
+ code='json-schema-already-used',
422
+ )
423
+
424
+ json_schema: JsonSchemaValue = self.generate_inner(schema)
425
+ json_ref_counts = self.get_json_ref_counts(json_schema)
426
+
427
+ ref = cast(JsonRef, json_schema.get('$ref'))
428
+ while ref is not None: # may need to unpack multiple levels
429
+ ref_json_schema = self.get_schema_from_definitions(ref)
430
+ if json_ref_counts[ref] == 1 and ref_json_schema is not None and len(json_schema) == 1:
431
+ # "Unpack" the ref since this is the only reference and there are no sibling keys
432
+ json_schema = ref_json_schema.copy() # copy to prevent recursive dict reference
433
+ json_ref_counts[ref] -= 1
434
+ ref = cast(JsonRef, json_schema.get('$ref'))
435
+ ref = None
436
+
437
+ self._garbage_collect_definitions(json_schema)
438
+ definitions_remapping = self._build_definitions_remapping()
439
+
440
+ if self.definitions:
441
+ json_schema['$defs'] = self.definitions
442
+
443
+ json_schema = definitions_remapping.remap_json_schema(json_schema)
444
+
445
+ # For now, we will not set the $schema key. However, if desired, this can be easily added by overriding
446
+ # this method and adding the following line after a call to super().generate(schema):
447
+ # json_schema['$schema'] = self.schema_dialect
448
+
449
+ self._used = True
450
+ return self.sort(json_schema)
451
+
452
+ def generate_inner(self, schema: CoreSchemaOrField) -> JsonSchemaValue: # noqa: C901
453
+ """Generates a JSON schema for a given core schema.
454
+
455
+ Args:
456
+ schema: The given core schema.
457
+
458
+ Returns:
459
+ The generated JSON schema.
460
+
461
+ TODO: the nested function definitions here seem like bad practice, I'd like to unpack these
462
+ in a future PR. It'd be great if we could shorten the call stack a bit for JSON schema generation,
463
+ and I think there's potential for that here.
464
+ """
465
+ # If a schema with the same CoreRef has been handled, just return a reference to it
466
+ # Note that this assumes that it will _never_ be the case that the same CoreRef is used
467
+ # on types that should have different JSON schemas
468
+ if 'ref' in schema:
469
+ core_ref = CoreRef(schema['ref']) # type: ignore[typeddict-item]
470
+ core_mode_ref = (core_ref, self.mode)
471
+ if core_mode_ref in self.core_to_defs_refs and self.core_to_defs_refs[core_mode_ref] in self.definitions:
472
+ return {'$ref': self.core_to_json_refs[core_mode_ref]}
473
+
474
+ def populate_defs(core_schema: CoreSchema, json_schema: JsonSchemaValue) -> JsonSchemaValue:
475
+ if 'ref' in core_schema:
476
+ core_ref = CoreRef(core_schema['ref']) # type: ignore[typeddict-item]
477
+ defs_ref, ref_json_schema = self.get_cache_defs_ref_schema(core_ref)
478
+ json_ref = JsonRef(ref_json_schema['$ref'])
479
+ # Replace the schema if it's not a reference to itself
480
+ # What we want to avoid is having the def be just a ref to itself
481
+ # which is what would happen if we blindly assigned any
482
+ if json_schema.get('$ref', None) != json_ref:
483
+ self.definitions[defs_ref] = json_schema
484
+ self._core_defs_invalid_for_json_schema.pop(defs_ref, None)
485
+ json_schema = ref_json_schema
486
+ return json_schema
487
+
488
+ def handler_func(schema_or_field: CoreSchemaOrField) -> JsonSchemaValue:
489
+ """Generate a JSON schema based on the input schema.
490
+
491
+ Args:
492
+ schema_or_field: The core schema to generate a JSON schema from.
493
+
494
+ Returns:
495
+ The generated JSON schema.
496
+
497
+ Raises:
498
+ TypeError: If an unexpected schema type is encountered.
499
+ """
500
+ # Generate the core-schema-type-specific bits of the schema generation:
501
+ json_schema: JsonSchemaValue | None = None
502
+ if self.mode == 'serialization' and 'serialization' in schema_or_field:
503
+ # In this case, we skip the JSON Schema generation of the schema
504
+ # and use the `'serialization'` schema instead (canonical example:
505
+ # `Annotated[int, PlainSerializer(str)]`).
506
+ ser_schema = schema_or_field['serialization'] # type: ignore
507
+ json_schema = self.ser_schema(ser_schema)
508
+
509
+ # It might be that the 'serialization'` is skipped depending on `when_used`.
510
+ # This is only relevant for `nullable` schemas though (possibly wrapped, e.g. when
511
+ # using a field serializer on a field with a default value), so we special case here.
512
+ if (
513
+ json_schema is not None
514
+ and ser_schema.get('when_used') in ('unless-none', 'json-unless-none')
515
+ and _is_nullable_schema(schema_or_field)
516
+ ):
517
+ json_schema = self.get_union_of_schemas([{'type': 'null'}, json_schema])
518
+ if json_schema is None:
519
+ if _core_utils.is_core_schema(schema_or_field) or _core_utils.is_core_schema_field(schema_or_field):
520
+ generate_for_schema_type = self._schema_type_to_method[schema_or_field['type']]
521
+ json_schema = generate_for_schema_type(schema_or_field)
522
+ else:
523
+ raise TypeError(f'Unexpected schema type: schema={schema_or_field}')
524
+ return json_schema
525
+
526
+ current_handler = _schema_generation_shared.GenerateJsonSchemaHandler(self, handler_func)
527
+
528
+ metadata = cast(_core_metadata.CoreMetadata, schema.get('metadata', {}))
529
+
530
+ # TODO: I dislike that we have to wrap these basic dict updates in callables, is there any way around this?
531
+
532
+ if js_updates := metadata.get('pydantic_js_updates'):
533
+
534
+ def js_updates_handler_func(
535
+ schema_or_field: CoreSchemaOrField,
536
+ current_handler: GetJsonSchemaHandler = current_handler,
537
+ ) -> JsonSchemaValue:
538
+ json_schema = {**current_handler(schema_or_field), **js_updates}
539
+ return json_schema
540
+
541
+ current_handler = _schema_generation_shared.GenerateJsonSchemaHandler(self, js_updates_handler_func)
542
+
543
+ if js_extra := metadata.get('pydantic_js_extra'):
544
+
545
+ def js_extra_handler_func(
546
+ schema_or_field: CoreSchemaOrField,
547
+ current_handler: GetJsonSchemaHandler = current_handler,
548
+ ) -> JsonSchemaValue:
549
+ json_schema = current_handler(schema_or_field)
550
+ if isinstance(js_extra, dict):
551
+ json_schema.update(to_jsonable_python(js_extra))
552
+ elif callable(js_extra):
553
+ # similar to typing issue in _update_class_schema when we're working with callable js extra
554
+ js_extra(json_schema) # type: ignore
555
+ return json_schema
556
+
557
+ current_handler = _schema_generation_shared.GenerateJsonSchemaHandler(self, js_extra_handler_func)
558
+
559
+ for js_modify_function in metadata.get('pydantic_js_functions', ()):
560
+
561
+ def new_handler_func(
562
+ schema_or_field: CoreSchemaOrField,
563
+ current_handler: GetJsonSchemaHandler = current_handler,
564
+ js_modify_function: GetJsonSchemaFunction = js_modify_function,
565
+ ) -> JsonSchemaValue:
566
+ json_schema = js_modify_function(schema_or_field, current_handler)
567
+ if _core_utils.is_core_schema(schema_or_field):
568
+ json_schema = populate_defs(schema_or_field, json_schema)
569
+ original_schema = current_handler.resolve_ref_schema(json_schema)
570
+ ref = json_schema.pop('$ref', None)
571
+ if ref and json_schema:
572
+ original_schema.update(json_schema)
573
+ return original_schema
574
+
575
+ current_handler = _schema_generation_shared.GenerateJsonSchemaHandler(self, new_handler_func)
576
+
577
+ for js_modify_function in metadata.get('pydantic_js_annotation_functions', ()):
578
+
579
+ def new_handler_func(
580
+ schema_or_field: CoreSchemaOrField,
581
+ current_handler: GetJsonSchemaHandler = current_handler,
582
+ js_modify_function: GetJsonSchemaFunction = js_modify_function,
583
+ ) -> JsonSchemaValue:
584
+ return js_modify_function(schema_or_field, current_handler)
585
+
586
+ current_handler = _schema_generation_shared.GenerateJsonSchemaHandler(self, new_handler_func)
587
+
588
+ json_schema = current_handler(schema)
589
+ if _core_utils.is_core_schema(schema):
590
+ json_schema = populate_defs(schema, json_schema)
591
+ return json_schema
592
+
593
+ def sort(self, value: JsonSchemaValue, parent_key: str | None = None) -> JsonSchemaValue:
594
+ """Override this method to customize the sorting of the JSON schema (e.g., don't sort at all, sort all keys unconditionally, etc.)
595
+
596
+ By default, alphabetically sort the keys in the JSON schema, skipping the 'properties' and 'default' keys to preserve field definition order.
597
+ This sort is recursive, so it will sort all nested dictionaries as well.
598
+ """
599
+ sorted_dict: dict[str, JsonSchemaValue] = {}
600
+ keys = value.keys()
601
+ if parent_key not in ('properties', 'default'):
602
+ keys = sorted(keys)
603
+ for key in keys:
604
+ sorted_dict[key] = self._sort_recursive(value[key], parent_key=key)
605
+ return sorted_dict
606
+
607
+ def _sort_recursive(self, value: Any, parent_key: str | None = None) -> Any:
608
+ """Recursively sort a JSON schema value."""
609
+ if isinstance(value, dict):
610
+ sorted_dict: dict[str, JsonSchemaValue] = {}
611
+ keys = value.keys()
612
+ if parent_key not in ('properties', 'default'):
613
+ keys = sorted(keys)
614
+ for key in keys:
615
+ sorted_dict[key] = self._sort_recursive(value[key], parent_key=key)
616
+ return sorted_dict
617
+ elif isinstance(value, list):
618
+ sorted_list: list[JsonSchemaValue] = [self._sort_recursive(item, parent_key) for item in value]
619
+ return sorted_list
620
+ else:
621
+ return value
622
+
623
+ # ### Schema generation methods
624
+
625
+ def invalid_schema(self, schema: core_schema.InvalidSchema) -> JsonSchemaValue:
626
+ """Placeholder - should never be called."""
627
+
628
+ raise RuntimeError('Cannot generate schema for invalid_schema. This is a bug! Please report it.')
629
+
630
+ def any_schema(self, schema: core_schema.AnySchema) -> JsonSchemaValue:
631
+ """Generates a JSON schema that matches any value.
632
+
633
+ Args:
634
+ schema: The core schema.
635
+
636
+ Returns:
637
+ The generated JSON schema.
638
+ """
639
+ return {}
640
+
641
+ def none_schema(self, schema: core_schema.NoneSchema) -> JsonSchemaValue:
642
+ """Generates a JSON schema that matches `None`.
643
+
644
+ Args:
645
+ schema: The core schema.
646
+
647
+ Returns:
648
+ The generated JSON schema.
649
+ """
650
+ return {'type': 'null'}
651
+
652
+ def bool_schema(self, schema: core_schema.BoolSchema) -> JsonSchemaValue:
653
+ """Generates a JSON schema that matches a bool value.
654
+
655
+ Args:
656
+ schema: The core schema.
657
+
658
+ Returns:
659
+ The generated JSON schema.
660
+ """
661
+ return {'type': 'boolean'}
662
+
663
+ def int_schema(self, schema: core_schema.IntSchema) -> JsonSchemaValue:
664
+ """Generates a JSON schema that matches an int value.
665
+
666
+ Args:
667
+ schema: The core schema.
668
+
669
+ Returns:
670
+ The generated JSON schema.
671
+ """
672
+ json_schema: dict[str, Any] = {'type': 'integer'}
673
+ self.update_with_validations(json_schema, schema, self.ValidationsMapping.numeric)
674
+ json_schema = {k: v for k, v in json_schema.items() if v not in {math.inf, -math.inf}}
675
+ return json_schema
676
+
677
+ def float_schema(self, schema: core_schema.FloatSchema) -> JsonSchemaValue:
678
+ """Generates a JSON schema that matches a float value.
679
+
680
+ Args:
681
+ schema: The core schema.
682
+
683
+ Returns:
684
+ The generated JSON schema.
685
+ """
686
+ json_schema: dict[str, Any] = {'type': 'number'}
687
+ self.update_with_validations(json_schema, schema, self.ValidationsMapping.numeric)
688
+ json_schema = {k: v for k, v in json_schema.items() if v not in {math.inf, -math.inf}}
689
+ return json_schema
690
+
691
+ def fraction_schema(self, schema: core_schema.FractionSchema) -> JsonSchemaValue:
692
+ """Generates a JSON schema that matches a fraction value.
693
+
694
+ Args:
695
+ schema: The core schema.
696
+
697
+ Returns:
698
+ The generated JSON schema.
699
+
700
+ """
701
+ json_schema: JsonSchemaValue = {'type': 'string', 'format': 'fraction'}
702
+ if self.mode == 'validation':
703
+ le = schema.get('le')
704
+ ge = schema.get('ge')
705
+ lt = schema.get('lt')
706
+ gt = schema.get('gt')
707
+ json_schema = {
708
+ 'anyOf': [
709
+ self.float_schema(
710
+ core_schema.float_schema(
711
+ le=None if le is None else float(le),
712
+ ge=None if ge is None else float(ge),
713
+ lt=None if lt is None else float(lt),
714
+ gt=None if gt is None else float(gt),
715
+ )
716
+ ),
717
+ json_schema,
718
+ ],
719
+ }
720
+ return json_schema
721
+
722
+ def decimal_schema(self, schema: core_schema.DecimalSchema) -> JsonSchemaValue:
723
+ """Generates a JSON schema that matches a decimal value.
724
+
725
+ Args:
726
+ schema: The core schema.
727
+
728
+ Returns:
729
+ The generated JSON schema.
730
+ """
731
+ str_schema = core_schema.str_schema()
732
+ pattern = self.get_decimal_pattern(schema)
733
+ if pattern is not None:
734
+ str_schema['pattern'] = pattern
735
+ json_schema = self.str_schema(str_schema)
736
+ if self.mode == 'validation':
737
+ multiple_of = schema.get('multiple_of')
738
+ le = schema.get('le')
739
+ ge = schema.get('ge')
740
+ lt = schema.get('lt')
741
+ gt = schema.get('gt')
742
+ json_schema = {
743
+ 'anyOf': [
744
+ self.float_schema(
745
+ core_schema.float_schema(
746
+ allow_inf_nan=schema.get('allow_inf_nan'),
747
+ multiple_of=None if multiple_of is None else float(multiple_of),
748
+ le=None if le is None else float(le),
749
+ ge=None if ge is None else float(ge),
750
+ lt=None if lt is None else float(lt),
751
+ gt=None if gt is None else float(gt),
752
+ )
753
+ ),
754
+ json_schema,
755
+ ],
756
+ }
757
+ return json_schema
758
+
759
+ def get_decimal_pattern(self, schema: core_schema.DecimalSchema) -> str | None:
760
+ """Get the regular expression pattern to apply to the string representation of a decimal.
761
+
762
+ By default, no pattern is applied (`None` is returned). Subclasses can override this method
763
+ to return a custom pattern, or [`build_decimal_pattern()`][pydantic.json_schema.GenerateJsonSchema.build_decimal_pattern]
764
+ can be used to get a pattern reflecting the `max_digits` and `decimal_places` constraints:
765
+
766
+ ```python
767
+ from pydantic.json_schema import GenerateJsonSchema
768
+
769
+ class MyGenerateJsonSchema(GenerateJsonSchema):
770
+ def get_decimal_pattern(self, schema):
771
+ return self.build_decimal_pattern(schema)
772
+ ```
773
+
774
+ Args:
775
+ schema: The core schema.
776
+
777
+ Returns:
778
+ The regular expression pattern, or `None` if no pattern should be applied.
779
+ """
780
+ return None
781
+
782
+ def build_decimal_pattern(self, schema: core_schema.DecimalSchema) -> str:
783
+ """Build a regular expression pattern for the string representation of a decimal.
784
+
785
+ The pattern takes into account the `max_digits` and `decimal_places` constraints, and the current
786
+ mode:
787
+
788
+ - In `'validation'` mode, the pattern accepts the string syntax understood by the [`Decimal`][decimal.Decimal]
789
+ constructor. The `max_digits` and `decimal_places` constraints are only reflected for strings
790
+ *without* an exponent: strings using an exponent are accepted as long as they are syntactically valid,
791
+ as the constraints can't be expressed with a regular expression in this case.
792
+ - In `'serialization'` mode, the pattern exactly describes the strings produced by pydantic
793
+ (i.e. by `str(decimal)`) for decimals satisfying the constraints,
794
+ including the ones using scientific notation (e.g. `'1E-7'`, `'1.5E+3'`).
795
+
796
+ In both modes, trailing zeros in the decimal part are not counted (e.g. `'1.10'` is accepted with
797
+ `decimal_places=1`), consistent with the validation behavior. If `allow_inf_nan` is enabled (on the
798
+ core schema or in the configuration), the string representations of infinity and NaN are also accepted.
799
+
800
+ Args:
801
+ schema: The core schema.
802
+
803
+ Returns:
804
+ The regular expression pattern.
805
+ """
806
+ max_digits = schema.get('max_digits')
807
+ decimal_places = schema.get('decimal_places')
808
+ allow_inf_nan = schema.get('allow_inf_nan')
809
+ if allow_inf_nan is None:
810
+ allow_inf_nan = self._config.config_dict.get('allow_inf_nan', False)
811
+ if self.mode == 'validation':
812
+ return _decimal_validation_pattern(max_digits, decimal_places, allow_inf_nan)
813
+ else:
814
+ return _decimal_serialization_pattern(max_digits, decimal_places, allow_inf_nan)
815
+
816
+ def str_schema(self, schema: core_schema.StringSchema) -> JsonSchemaValue:
817
+ """Generates a JSON schema that matches a string value.
818
+
819
+ Args:
820
+ schema: The core schema.
821
+
822
+ Returns:
823
+ The generated JSON schema.
824
+ """
825
+ json_schema: JsonSchemaValue = {'type': 'string'}
826
+ self.update_with_validations(json_schema, schema, self.ValidationsMapping.string)
827
+ if 'minLength' not in json_schema and self._config.str_min_length:
828
+ json_schema['minLength'] = self._config.str_min_length
829
+ if 'maxLength' not in json_schema and self._config.str_max_length is not None:
830
+ json_schema['maxLength'] = self._config.str_max_length
831
+ if isinstance(json_schema.get('pattern'), Pattern):
832
+ # TODO: should we add regex flags to the pattern?
833
+ json_schema['pattern'] = json_schema.get('pattern').pattern # type: ignore
834
+ return json_schema
835
+
836
+ def bytes_schema(self, schema: core_schema.BytesSchema) -> JsonSchemaValue:
837
+ """Generates a JSON schema that matches a bytes value.
838
+
839
+ Args:
840
+ schema: The core schema.
841
+
842
+ Returns:
843
+ The generated JSON schema.
844
+ """
845
+ json_schema = {'type': 'string', 'format': 'base64url' if self._config.ser_json_bytes == 'base64' else 'binary'}
846
+ self.update_with_validations(json_schema, schema, self.ValidationsMapping.bytes)
847
+ return json_schema
848
+
849
+ def date_schema(self, schema: core_schema.DateSchema) -> JsonSchemaValue:
850
+ """Generates a JSON schema that matches a date value.
851
+
852
+ Args:
853
+ schema: The core schema.
854
+
855
+ Returns:
856
+ The generated JSON schema.
857
+ """
858
+ return self._common_temporal_schema('date', self._config.ser_json_temporal)
859
+
860
+ def time_schema(self, schema: core_schema.TimeSchema) -> JsonSchemaValue:
861
+ """Generates a JSON schema that matches a time value.
862
+
863
+ Args:
864
+ schema: The core schema.
865
+
866
+ Returns:
867
+ The generated JSON schema.
868
+ """
869
+ return self._common_temporal_schema('time', self._config.ser_json_temporal)
870
+
871
+ def datetime_schema(self, schema: core_schema.DatetimeSchema) -> JsonSchemaValue:
872
+ """Generates a JSON schema that matches a datetime value.
873
+
874
+ Args:
875
+ schema: The core schema.
876
+
877
+ Returns:
878
+ The generated JSON schema.
879
+ """
880
+ return self._common_temporal_schema('date-time', self._config.ser_json_temporal)
881
+
882
+ def timedelta_schema(self, schema: core_schema.TimedeltaSchema) -> JsonSchemaValue:
883
+ """Generates a JSON schema that matches a timedelta value.
884
+
885
+ Args:
886
+ schema: The core schema.
887
+
888
+ Returns:
889
+ The generated JSON schema.
890
+ """
891
+ if 'ser_json_temporal' in self._config.config_dict:
892
+ temporal_format = self._config.ser_json_temporal
893
+ else:
894
+ # `ser_json_temporal` supersedes `ser_json_timedelta`, which only applies when the former isn't
895
+ # explicitly set.
896
+ temporal_format = 'seconds' if self._config.ser_json_timedelta == 'float' else 'iso8601'
897
+ return self._common_temporal_schema('duration', temporal_format)
898
+
899
+ def _common_temporal_schema(
900
+ self, format: str, temporal_format: Literal['iso8601', 'seconds', 'milliseconds']
901
+ ) -> JsonSchemaValue:
902
+ if self.mode == 'serialization' and temporal_format != 'iso8601':
903
+ # Both `'seconds'` and `'milliseconds'` serialize to a number:
904
+ return {'type': 'number'}
905
+ return {'type': 'string', 'format': format}
906
+
907
+ def literal_schema(self, schema: core_schema.LiteralSchema) -> JsonSchemaValue:
908
+ """Generates a JSON schema that matches a literal value.
909
+
910
+ Args:
911
+ schema: The core schema.
912
+
913
+ Returns:
914
+ The generated JSON schema.
915
+ """
916
+ expected = [to_jsonable_python(v.value if isinstance(v, Enum) else v) for v in schema['expected']]
917
+
918
+ result: dict[str, Any] = {}
919
+ if len(expected) == 1:
920
+ result['const'] = expected[0]
921
+ else:
922
+ result['enum'] = expected
923
+
924
+ types = {type(e) for e in expected}
925
+ if types == {str}:
926
+ result['type'] = 'string'
927
+ elif types == {int}:
928
+ result['type'] = 'integer'
929
+ elif types == {float}:
930
+ result['type'] = 'number'
931
+ elif types == {bool}:
932
+ result['type'] = 'boolean'
933
+ elif types == {list}:
934
+ result['type'] = 'array'
935
+ elif types == {type(None)}:
936
+ result['type'] = 'null'
937
+ return result
938
+
939
+ def missing_sentinel_schema(self, schema: core_schema.MissingSentinelSchema) -> JsonSchemaValue:
940
+ """Generates a JSON schema that matches a schema that allows the `MISSING` sentinel value.
941
+
942
+ Args:
943
+ schema: The core schema.
944
+
945
+ Returns:
946
+ The generated JSON schema.
947
+ """
948
+ inner_schema = schema.get('schema')
949
+ if inner_schema is None:
950
+ raise PydanticOmit
951
+ return self.generate_inner(inner_schema)
952
+
953
+ def ellipsis_schema(self, schema: core_schema.EllipsisSchema) -> JsonSchemaValue:
954
+ """Handles JSON schema generation for a core schema that checks if a value is the [`Ellipsis`][] literal.
955
+
956
+ Unless overridden in a subclass, this raises an error.
957
+
958
+ Args:
959
+ schema: The core schema.
960
+
961
+ Returns:
962
+ The generated JSON schema.
963
+ """
964
+ return self.handle_invalid_for_json_schema(schema, 'core_schema.EllipsisSchema')
965
+
966
+ def enum_schema(self, schema: core_schema.EnumSchema) -> JsonSchemaValue:
967
+ """Generates a JSON schema that matches an Enum value.
968
+
969
+ Args:
970
+ schema: The core schema.
971
+
972
+ Returns:
973
+ The generated JSON schema.
974
+ """
975
+ enum_type = schema['cls']
976
+ description = None if not enum_type.__doc__ else inspect.cleandoc(enum_type.__doc__)
977
+ if (
978
+ description == 'An enumeration.'
979
+ ): # This is the default value provided by enum.EnumMeta.__new__; don't use it
980
+ description = None
981
+ result: dict[str, Any] = {'title': enum_type.__name__, 'description': description}
982
+ result = {k: v for k, v in result.items() if v is not None}
983
+
984
+ expected = [to_jsonable_python(v.value) for v in schema['members']]
985
+
986
+ result['enum'] = expected
987
+
988
+ types = {type(e) for e in expected}
989
+ if isinstance(enum_type, str) or types == {str}:
990
+ result['type'] = 'string'
991
+ elif isinstance(enum_type, int) or types == {int}:
992
+ result['type'] = 'integer'
993
+ elif isinstance(enum_type, float) or types == {float}:
994
+ result['type'] = 'number'
995
+ elif types == {bool}:
996
+ result['type'] = 'boolean'
997
+ elif types == {list}:
998
+ result['type'] = 'array'
999
+
1000
+ return result
1001
+
1002
+ def is_instance_schema(self, schema: core_schema.IsInstanceSchema) -> JsonSchemaValue:
1003
+ """Handles JSON schema generation for a core schema that checks if a value is an instance of a class.
1004
+
1005
+ Unless overridden in a subclass, this raises an error.
1006
+
1007
+ Args:
1008
+ schema: The core schema.
1009
+
1010
+ Returns:
1011
+ The generated JSON schema.
1012
+ """
1013
+ return self.handle_invalid_for_json_schema(schema, f'core_schema.IsInstanceSchema ({schema["cls"]})')
1014
+
1015
+ def is_subclass_schema(self, schema: core_schema.IsSubclassSchema) -> JsonSchemaValue:
1016
+ """Handles JSON schema generation for a core schema that checks if a value is a subclass of a class.
1017
+
1018
+ For backwards compatibility with v1, this does not raise an error, but can be overridden to change this.
1019
+
1020
+ Args:
1021
+ schema: The core schema.
1022
+
1023
+ Returns:
1024
+ The generated JSON schema.
1025
+ """
1026
+ # Note: This is for compatibility with V1; you can override if you want different behavior.
1027
+ return {}
1028
+
1029
+ def callable_schema(self, schema: core_schema.CallableSchema) -> JsonSchemaValue:
1030
+ """Generates a JSON schema that matches a callable value.
1031
+
1032
+ Unless overridden in a subclass, this raises an error.
1033
+
1034
+ Args:
1035
+ schema: The core schema.
1036
+
1037
+ Returns:
1038
+ The generated JSON schema.
1039
+ """
1040
+ return self.handle_invalid_for_json_schema(schema, 'core_schema.CallableSchema')
1041
+
1042
+ def list_schema(self, schema: core_schema.ListSchema) -> JsonSchemaValue:
1043
+ """Returns a schema that matches a list schema.
1044
+
1045
+ Args:
1046
+ schema: The core schema.
1047
+
1048
+ Returns:
1049
+ The generated JSON schema.
1050
+ """
1051
+ items_schema = {} if 'items_schema' not in schema else self.generate_inner(schema['items_schema'])
1052
+ json_schema = {'type': 'array', 'items': items_schema}
1053
+ self.update_with_validations(json_schema, schema, self.ValidationsMapping.array)
1054
+ return json_schema
1055
+
1056
+ def deque_schema(self, schema: core_schema.DequeSchema) -> JsonSchemaValue:
1057
+ """Returns a schema that matches a deque schema.
1058
+
1059
+ Args:
1060
+ schema: The core schema.
1061
+
1062
+ Returns:
1063
+ The generated JSON schema.
1064
+ """
1065
+ items_schema = {} if 'items_schema' not in schema else self.generate_inner(schema['items_schema'])
1066
+ json_schema = {'type': 'array', 'items': items_schema}
1067
+ self.update_with_validations(json_schema, schema, self.ValidationsMapping.array)
1068
+ return json_schema
1069
+
1070
+ @deprecated('`tuple_positional_schema` is deprecated. Use `tuple_schema` instead.', category=None)
1071
+ @final
1072
+ def tuple_positional_schema(self, schema: core_schema.TupleSchema) -> JsonSchemaValue:
1073
+ """Replaced by `tuple_schema`."""
1074
+ warnings.warn(
1075
+ '`tuple_positional_schema` is deprecated. Use `tuple_schema` instead.',
1076
+ PydanticDeprecatedSince26,
1077
+ stacklevel=2,
1078
+ )
1079
+ return self.tuple_schema(schema)
1080
+
1081
+ @deprecated('`tuple_variable_schema` is deprecated. Use `tuple_schema` instead.', category=None)
1082
+ @final
1083
+ def tuple_variable_schema(self, schema: core_schema.TupleSchema) -> JsonSchemaValue:
1084
+ """Replaced by `tuple_schema`."""
1085
+ warnings.warn(
1086
+ '`tuple_variable_schema` is deprecated. Use `tuple_schema` instead.',
1087
+ PydanticDeprecatedSince26,
1088
+ stacklevel=2,
1089
+ )
1090
+ return self.tuple_schema(schema)
1091
+
1092
+ def tuple_schema(self, schema: core_schema.TupleSchema) -> JsonSchemaValue:
1093
+ """Generates a JSON schema that matches a tuple schema e.g. `tuple[int,
1094
+ str, bool]` or `tuple[int, ...]`.
1095
+
1096
+ Args:
1097
+ schema: The core schema.
1098
+
1099
+ Returns:
1100
+ The generated JSON schema.
1101
+ """
1102
+ json_schema: JsonSchemaValue = {'type': 'array'}
1103
+ if 'variadic_item_index' in schema:
1104
+ variadic_item_index = schema['variadic_item_index']
1105
+ if variadic_item_index > 0:
1106
+ json_schema['minItems'] = variadic_item_index
1107
+ json_schema['prefixItems'] = [
1108
+ self.generate_inner(item) for item in schema['items_schema'][:variadic_item_index]
1109
+ ]
1110
+ if variadic_item_index + 1 == len(schema['items_schema']):
1111
+ # if the variadic item is the last item, then represent it faithfully
1112
+ json_schema['items'] = self.generate_inner(schema['items_schema'][variadic_item_index])
1113
+ else:
1114
+ # otherwise, 'items' represents the schema for the variadic
1115
+ # item plus the suffix, so just allow anything for simplicity
1116
+ # for now
1117
+ json_schema['items'] = True
1118
+ else:
1119
+ prefixItems = [self.generate_inner(item) for item in schema['items_schema']]
1120
+ if prefixItems:
1121
+ json_schema['prefixItems'] = prefixItems
1122
+ json_schema['minItems'] = len(prefixItems)
1123
+ json_schema['maxItems'] = len(prefixItems)
1124
+ self.update_with_validations(json_schema, schema, self.ValidationsMapping.array)
1125
+ return json_schema
1126
+
1127
+ def set_schema(self, schema: core_schema.SetSchema) -> JsonSchemaValue:
1128
+ """Generates a JSON schema that matches a set schema.
1129
+
1130
+ Args:
1131
+ schema: The core schema.
1132
+
1133
+ Returns:
1134
+ The generated JSON schema.
1135
+ """
1136
+ return self._common_set_schema(schema)
1137
+
1138
+ def frozenset_schema(self, schema: core_schema.FrozenSetSchema) -> JsonSchemaValue:
1139
+ """Generates a JSON schema that matches a frozenset schema.
1140
+
1141
+ Args:
1142
+ schema: The core schema.
1143
+
1144
+ Returns:
1145
+ The generated JSON schema.
1146
+ """
1147
+ return self._common_set_schema(schema)
1148
+
1149
+ def _common_set_schema(self, schema: core_schema.SetSchema | core_schema.FrozenSetSchema) -> JsonSchemaValue:
1150
+ items_schema = {} if 'items_schema' not in schema else self.generate_inner(schema['items_schema'])
1151
+ json_schema = {'type': 'array', 'uniqueItems': True, 'items': items_schema}
1152
+ self.update_with_validations(json_schema, schema, self.ValidationsMapping.array)
1153
+ return json_schema
1154
+
1155
+ def generator_schema(self, schema: core_schema.GeneratorSchema) -> JsonSchemaValue:
1156
+ """Returns a JSON schema that represents the provided GeneratorSchema.
1157
+
1158
+ Args:
1159
+ schema: The schema.
1160
+
1161
+ Returns:
1162
+ The generated JSON schema.
1163
+ """
1164
+ items_schema = {} if 'items_schema' not in schema else self.generate_inner(schema['items_schema'])
1165
+ json_schema = {'type': 'array', 'items': items_schema}
1166
+ self.update_with_validations(json_schema, schema, self.ValidationsMapping.array)
1167
+ return json_schema
1168
+
1169
+ def dict_schema(self, schema: core_schema.DictSchema) -> JsonSchemaValue:
1170
+ """Generates a JSON schema that matches a dict schema.
1171
+
1172
+ Args:
1173
+ schema: The core schema.
1174
+
1175
+ Returns:
1176
+ The generated JSON schema.
1177
+ """
1178
+ return self._common_dict_schema(schema)
1179
+
1180
+ def frozendict_schema(self, schema: core_schema.FrozenDictSchema) -> JsonSchemaValue:
1181
+ """Generates a JSON schema that matches a frozendict schema.
1182
+
1183
+ Args:
1184
+ schema: The core schema.
1185
+
1186
+ Returns:
1187
+ The generated JSON schema.
1188
+ """
1189
+ return self._common_dict_schema(schema)
1190
+
1191
+ def ordered_dict_schema(self, schema: core_schema.OrderedDictSchema) -> JsonSchemaValue:
1192
+ """Generates a JSON schema that matches an `OrderedDict` schema.
1193
+
1194
+ Args:
1195
+ schema: The core schema.
1196
+
1197
+ Returns:
1198
+ The generated JSON schema.
1199
+ """
1200
+ return self._common_dict_schema(schema)
1201
+
1202
+ def counter_schema(self, schema: core_schema.CounterSchema) -> JsonSchemaValue:
1203
+ """Generates a JSON schema that matches a `Counter` schema.
1204
+
1205
+ Args:
1206
+ schema: The core schema.
1207
+
1208
+ Returns:
1209
+ The generated JSON schema.
1210
+ """
1211
+ return self._common_dict_schema(schema)
1212
+
1213
+ def _common_dict_schema(
1214
+ self,
1215
+ schema: core_schema.DictSchema
1216
+ | core_schema.FrozenDictSchema
1217
+ | core_schema.OrderedDictSchema
1218
+ | core_schema.CounterSchema,
1219
+ ) -> JsonSchemaValue:
1220
+ json_schema: JsonSchemaValue = {'type': 'object'}
1221
+
1222
+ keys_schema = self.generate_inner(schema['keys_schema']).copy() if 'keys_schema' in schema else {}
1223
+ if '$ref' not in keys_schema:
1224
+ keys_pattern = keys_schema.pop('pattern', None)
1225
+ # Don't give a title to patternProperties/propertyNames:
1226
+ keys_schema.pop('title', None)
1227
+ else:
1228
+ # Here, we assume that if the keys schema is a definition reference,
1229
+ # it can't be a simple string core schema (and thus no pattern can exist).
1230
+ # However, this is only in practice (in theory, a definition reference core
1231
+ # schema could be generated for a simple string schema).
1232
+ # Note that we avoid calling `self.resolve_ref_schema`, as it might not exist yet.
1233
+ keys_pattern = None
1234
+
1235
+ values_schema = self.generate_inner(schema['values_schema']).copy() if 'values_schema' in schema else {}
1236
+ # don't give a title to additionalProperties:
1237
+ values_schema.pop('title', None)
1238
+
1239
+ if values_schema or keys_pattern is not None:
1240
+ if keys_pattern is None:
1241
+ json_schema['additionalProperties'] = values_schema
1242
+ else:
1243
+ json_schema['patternProperties'] = {keys_pattern: values_schema}
1244
+ else: # for `dict[str, Any]`, we allow any key and any value, since `str` is the default key type
1245
+ json_schema['additionalProperties'] = True
1246
+
1247
+ if (
1248
+ # The len check indicates that constraints are probably present:
1249
+ (keys_schema.get('type') == 'string' and len(keys_schema) > 1)
1250
+ # If this is a definition reference schema, it most likely has constraints:
1251
+ or '$ref' in keys_schema
1252
+ ):
1253
+ keys_schema.pop('type', None)
1254
+ json_schema['propertyNames'] = keys_schema
1255
+
1256
+ self.update_with_validations(json_schema, schema, self.ValidationsMapping.object)
1257
+ return json_schema
1258
+
1259
+ def function_before_schema(self, schema: core_schema.BeforeValidatorFunctionSchema) -> JsonSchemaValue:
1260
+ """Generates a JSON schema that matches a function-before schema.
1261
+
1262
+ Args:
1263
+ schema: The core schema.
1264
+
1265
+ Returns:
1266
+ The generated JSON schema.
1267
+ """
1268
+ if self.mode == 'validation' and (input_schema := schema.get('json_schema_input_schema')):
1269
+ return self.generate_inner(input_schema)
1270
+
1271
+ return self.generate_inner(schema['schema'])
1272
+
1273
+ def function_after_schema(self, schema: core_schema.AfterValidatorFunctionSchema) -> JsonSchemaValue:
1274
+ """Generates a JSON schema that matches a function-after schema.
1275
+
1276
+ Args:
1277
+ schema: The core schema.
1278
+
1279
+ Returns:
1280
+ The generated JSON schema.
1281
+ """
1282
+ return self.generate_inner(schema['schema'])
1283
+
1284
+ def function_plain_schema(self, schema: core_schema.PlainValidatorFunctionSchema) -> JsonSchemaValue:
1285
+ """Generates a JSON schema that matches a function-plain schema.
1286
+
1287
+ Args:
1288
+ schema: The core schema.
1289
+
1290
+ Returns:
1291
+ The generated JSON schema.
1292
+ """
1293
+ if self.mode == 'validation' and (input_schema := schema.get('json_schema_input_schema')):
1294
+ return self.generate_inner(input_schema)
1295
+
1296
+ return self.handle_invalid_for_json_schema(
1297
+ schema, f'core_schema.PlainValidatorFunctionSchema ({schema["function"]})'
1298
+ )
1299
+
1300
+ def function_wrap_schema(self, schema: core_schema.WrapValidatorFunctionSchema) -> JsonSchemaValue:
1301
+ """Generates a JSON schema that matches a function-wrap schema.
1302
+
1303
+ Args:
1304
+ schema: The core schema.
1305
+
1306
+ Returns:
1307
+ The generated JSON schema.
1308
+ """
1309
+ if self.mode == 'validation' and (input_schema := schema.get('json_schema_input_schema')):
1310
+ return self.generate_inner(input_schema)
1311
+
1312
+ return self.generate_inner(schema['schema'])
1313
+
1314
+ def default_schema(self, schema: core_schema.WithDefaultSchema) -> JsonSchemaValue:
1315
+ """Generates a JSON schema that matches a schema with a default value.
1316
+
1317
+ Args:
1318
+ schema: The core schema.
1319
+
1320
+ Returns:
1321
+ The generated JSON schema.
1322
+ """
1323
+ json_schema = self.generate_inner(schema['schema'])
1324
+
1325
+ default = self.get_default_value(schema)
1326
+ if default is NoDefault or default is MISSING:
1327
+ return json_schema
1328
+
1329
+ # we reflect the application of custom plain, no-info serializers to defaults for
1330
+ # JSON Schemas viewed in serialization mode:
1331
+ # TODO: improvements along with https://github.com/pydantic/pydantic/issues/8208
1332
+ if self.mode == 'serialization':
1333
+ # `_get_ser_schema_for_default_value()` is used to unpack potentially nested validator schemas:
1334
+ ser_schema = _get_ser_schema_for_default_value(schema['schema'])
1335
+ if (
1336
+ ser_schema is not None
1337
+ and (ser_func := ser_schema.get('function'))
1338
+ and not (default is None and ser_schema.get('when_used') in ('unless-none', 'json-unless-none'))
1339
+ ):
1340
+ try:
1341
+ default = ser_func(default) # type: ignore
1342
+ except Exception:
1343
+ # It might be that the provided default needs to be validated (read: parsed) first
1344
+ # (assuming `validate_default` is enabled). However, we can't perform
1345
+ # such validation during JSON Schema generation so we don't support
1346
+ # this pattern for now.
1347
+ # (One example is when using `foo: ByteSize = '1MB'`, which validates and
1348
+ # serializes as an int. In this case, `ser_func` is `int` and `int('1MB')` fails).
1349
+ self.emit_warning(
1350
+ 'non-serializable-default',
1351
+ f'Unable to serialize value {default!r} with the plain serializer; excluding default from JSON schema',
1352
+ )
1353
+ return json_schema
1354
+
1355
+ # Sort set/frozenset defaults to ensure deterministic JSON schema generation
1356
+ # We only sort if len > 1 because sets of size 0 or 1 are already deterministic
1357
+ if isinstance(default, collections.abc.Set) and len(default) > 1:
1358
+ try:
1359
+ default = sorted(default)
1360
+ except TypeError: # pragma: no cover
1361
+ # If items aren't comparable (e.g. mixed types), we can't sort them.
1362
+ pass
1363
+
1364
+ try:
1365
+ encoded_default = self.encode_default(default)
1366
+ except pydantic_core.PydanticSerializationError:
1367
+ self.emit_warning(
1368
+ 'non-serializable-default',
1369
+ f'Default value {default} is not JSON serializable; excluding default from JSON schema',
1370
+ )
1371
+ # Return the inner schema, as though there was no default
1372
+ return json_schema
1373
+
1374
+ json_schema['default'] = encoded_default
1375
+ return json_schema
1376
+
1377
+ def get_default_value(self, schema: core_schema.WithDefaultSchema) -> Any:
1378
+ """Get the default value to be used when generating a JSON Schema for a core schema with a default.
1379
+
1380
+ The default implementation is to use the statically defined default value. This method can be overridden
1381
+ if you want to make use of the default factory.
1382
+
1383
+ Args:
1384
+ schema: The `'with-default'` core schema.
1385
+
1386
+ Returns:
1387
+ The default value to use, or [`NoDefault`][pydantic.json_schema.NoDefault] if no default
1388
+ value is available.
1389
+ """
1390
+ return schema.get('default', NoDefault)
1391
+
1392
+ def nullable_schema(self, schema: core_schema.NullableSchema) -> JsonSchemaValue:
1393
+ """Generates a JSON schema that matches a schema that allows null values.
1394
+
1395
+ Args:
1396
+ schema: The core schema.
1397
+
1398
+ Returns:
1399
+ The generated JSON schema.
1400
+ """
1401
+ null_schema = {'type': 'null'}
1402
+ inner_json_schema = self.generate_inner(schema['schema'])
1403
+
1404
+ if inner_json_schema == null_schema:
1405
+ return null_schema
1406
+ else:
1407
+ return self.get_union_of_schemas([inner_json_schema, null_schema])
1408
+
1409
+ def union_schema(self, schema: core_schema.UnionSchema) -> JsonSchemaValue:
1410
+ """Generates a JSON schema that matches a schema that allows values matching any of the given schemas.
1411
+
1412
+ Args:
1413
+ schema: The core schema.
1414
+
1415
+ Returns:
1416
+ The generated JSON schema.
1417
+ """
1418
+ generated: list[JsonSchemaValue] = []
1419
+
1420
+ for choice in core_schema.iter_union_choices(schema):
1421
+ try:
1422
+ generated.append(self.generate_inner(choice))
1423
+ except PydanticOmit: # noqa: PERF203
1424
+ continue
1425
+ except PydanticInvalidForJsonSchema as exc:
1426
+ self.emit_warning('skipped-choice', exc.message)
1427
+ if len(generated) == 1:
1428
+ return generated[0]
1429
+ return self.get_union_of_schemas(generated)
1430
+
1431
+ def get_union_of_schemas(self, schemas: list[JsonSchemaValue]) -> JsonSchemaValue:
1432
+ """Returns the JSON Schema representation for the union of the provided JSON Schemas.
1433
+
1434
+ The result depends on the configured `'union_format'`.
1435
+
1436
+ Args:
1437
+ schemas: The list of JSON Schemas to be included in the union.
1438
+
1439
+ Returns:
1440
+ The JSON Schema representing the union of schemas.
1441
+ """
1442
+ if self.union_format == 'primitive_type_array':
1443
+ types: list[str] = []
1444
+ for schema in schemas:
1445
+ schema_types: list[str] | str | None = schema.get('type')
1446
+ if schema_types is None:
1447
+ # No type, meaning it can be a ref or an empty schema.
1448
+ break
1449
+ if not isinstance(schema_types, list):
1450
+ schema_types = [schema_types]
1451
+ if not all(t in _PRIMITIVE_JSON_SCHEMA_TYPES for t in schema_types):
1452
+ break
1453
+ if len(schema) != 1:
1454
+ # We only want to include types that don't have any constraints. For instance,
1455
+ # if `schemas = [{'type': 'string', 'maxLength': 3}, {'type': 'string', 'minLength': 5}]`,
1456
+ # we don't want to produce `{'type': 'string', 'maxLength': 3, 'minLength': 5}`.
1457
+ # Same if we have some metadata (e.g. `title`) on a specific union member, we want to preserve it.
1458
+ break
1459
+
1460
+ types.extend(schema_types)
1461
+ else:
1462
+ # If we got there, all the schemas where valid to be used with the `'primitive_type_array` format
1463
+ return {'type': list(dict.fromkeys(types))}
1464
+
1465
+ return self.get_flattened_anyof(schemas)
1466
+
1467
+ def tagged_union_schema(self, schema: core_schema.TaggedUnionSchema) -> JsonSchemaValue:
1468
+ """Generates a JSON schema that matches a schema that allows values matching any of the given schemas, where
1469
+ the schemas are tagged with a discriminator field that indicates which schema should be used to validate
1470
+ the value.
1471
+
1472
+ Args:
1473
+ schema: The core schema.
1474
+
1475
+ Returns:
1476
+ The generated JSON schema.
1477
+ """
1478
+ generated: dict[str, JsonSchemaValue] = {}
1479
+ for k, v in schema['choices'].items():
1480
+ if isinstance(k, Enum):
1481
+ k = k.value
1482
+ elif isinstance(k, bool):
1483
+ # Use the JSON representation so that the discriminator mapping
1484
+ # can be matched against the serialized payload value
1485
+ k = 'true' if k else 'false'
1486
+ elif k is None:
1487
+ k = 'null'
1488
+ try:
1489
+ # Use str(k) since keys must be strings for json; while not technically correct,
1490
+ # it's the closest that can be represented in valid JSON
1491
+ generated[str(k)] = self.generate_inner(v).copy()
1492
+ except PydanticOmit:
1493
+ continue
1494
+ except PydanticInvalidForJsonSchema as exc:
1495
+ self.emit_warning('skipped-choice', exc.message)
1496
+
1497
+ one_of_choices = _deduplicate_schemas(generated.values())
1498
+ json_schema: JsonSchemaValue = {'oneOf': one_of_choices}
1499
+
1500
+ # This reflects the v1 behavior; TODO: we should make it possible to exclude OpenAPI stuff from the JSON schema
1501
+ openapi_discriminator = self._extract_discriminator(schema, one_of_choices)
1502
+ if openapi_discriminator is not None:
1503
+ json_schema['discriminator'] = {
1504
+ 'propertyName': openapi_discriminator,
1505
+ 'mapping': {k: v.get('$ref', v) for k, v in generated.items()},
1506
+ }
1507
+
1508
+ return json_schema
1509
+
1510
+ def _extract_discriminator(
1511
+ self, schema: core_schema.TaggedUnionSchema, one_of_choices: list[JsonDict]
1512
+ ) -> str | None:
1513
+ """Extract a compatible OpenAPI discriminator from the schema and one_of choices that end up in the final
1514
+ schema."""
1515
+ openapi_discriminator: str | None = None
1516
+
1517
+ if isinstance(schema['discriminator'], str):
1518
+ return schema['discriminator']
1519
+
1520
+ if isinstance(schema['discriminator'], list):
1521
+ # If the discriminator is a single item list containing a string, that is equivalent to the string case
1522
+ if len(schema['discriminator']) == 1 and isinstance(schema['discriminator'][0], str):
1523
+ return schema['discriminator'][0]
1524
+ # When an alias is used that is different from the field name, the discriminator will be a list of single
1525
+ # str lists, one for the attribute and one for the actual alias. The logic here will work even if there is
1526
+ # more than one possible attribute, and looks for whether a single alias choice is present as a documented
1527
+ # property on all choices. If so, that property will be used as the OpenAPI discriminator.
1528
+ for alias_path in schema['discriminator']:
1529
+ if not isinstance(alias_path, list):
1530
+ break # this means that the discriminator is not a list of alias paths
1531
+ if len(alias_path) != 1:
1532
+ continue # this means that the "alias" does not represent a single field
1533
+ alias = alias_path[0]
1534
+ if not isinstance(alias, str):
1535
+ continue # this means that the "alias" does not represent a field
1536
+ alias_is_present_on_all_choices = True
1537
+ for choice in one_of_choices:
1538
+ try:
1539
+ choice = self.resolve_ref_schema(choice)
1540
+ except RuntimeError as exc:
1541
+ # TODO: fixme - this is a workaround for the fact that we can't always resolve refs
1542
+ # for tagged union choices at this point in the schema gen process, we might need to do
1543
+ # another pass at the end like we do for core schemas
1544
+ self.emit_warning('skipped-discriminator', str(exc))
1545
+ choice = {}
1546
+ properties = choice.get('properties', {})
1547
+ if not isinstance(properties, dict) or alias not in properties:
1548
+ alias_is_present_on_all_choices = False
1549
+ break
1550
+ if alias_is_present_on_all_choices:
1551
+ openapi_discriminator = alias
1552
+ break
1553
+ return openapi_discriminator
1554
+
1555
+ def chain_schema(self, schema: core_schema.ChainSchema) -> JsonSchemaValue:
1556
+ """Generates a JSON schema that matches a core_schema.ChainSchema.
1557
+
1558
+ When generating a schema for validation, we return the validation JSON schema for the first step in the chain.
1559
+ For serialization, we return the serialization JSON schema for the last step in the chain.
1560
+
1561
+ Args:
1562
+ schema: The core schema.
1563
+
1564
+ Returns:
1565
+ The generated JSON schema.
1566
+ """
1567
+ step_index = 0 if self.mode == 'validation' else -1 # use first step for validation, last for serialization
1568
+ return self.generate_inner(schema['steps'][step_index])
1569
+
1570
+ def lax_or_strict_schema(self, schema: core_schema.LaxOrStrictSchema) -> JsonSchemaValue:
1571
+ """Generates a JSON schema that matches a schema that allows values matching either the lax schema or the
1572
+ strict schema.
1573
+
1574
+ Args:
1575
+ schema: The core schema.
1576
+
1577
+ Returns:
1578
+ The generated JSON schema.
1579
+ """
1580
+ # TODO: Need to read the default value off of model config or whatever
1581
+ use_strict = schema.get('strict', False) # TODO: replace this default False
1582
+ # If your JSON schema fails to generate it is probably
1583
+ # because one of the following two branches failed.
1584
+ if use_strict:
1585
+ return self.generate_inner(schema['strict_schema'])
1586
+ else:
1587
+ return self.generate_inner(schema['lax_schema'])
1588
+
1589
+ def json_or_python_schema(self, schema: core_schema.JsonOrPythonSchema) -> JsonSchemaValue:
1590
+ """Generates a JSON schema that matches a schema that allows values matching either the JSON schema or the
1591
+ Python schema.
1592
+
1593
+ The JSON schema is used instead of the Python schema. If you want to use the Python schema, you should override
1594
+ this method.
1595
+
1596
+ Args:
1597
+ schema: The core schema.
1598
+
1599
+ Returns:
1600
+ The generated JSON schema.
1601
+ """
1602
+ return self.generate_inner(schema['json_schema'])
1603
+
1604
+ def typed_dict_schema(self, schema: core_schema.TypedDictSchema) -> JsonSchemaValue:
1605
+ """Generates a JSON schema that matches a schema that defines a typed dict.
1606
+
1607
+ Args:
1608
+ schema: The core schema.
1609
+
1610
+ Returns:
1611
+ The generated JSON schema.
1612
+ """
1613
+ total = schema.get('total', True)
1614
+ named_required_fields: list[tuple[str, bool, CoreSchemaField]] = [
1615
+ (name, self.field_is_required(field, total), field)
1616
+ for name, field in schema['fields'].items()
1617
+ if self.field_is_present(field)
1618
+ ]
1619
+ if self.mode == 'serialization':
1620
+ named_required_fields.extend(self._name_required_computed_fields(schema.get('computed_fields', [])))
1621
+ cls = schema.get('cls')
1622
+ config = _get_typed_dict_config(cls)
1623
+ with self._config_wrapper_stack.push(config):
1624
+ json_schema = self._named_required_fields_schema(named_required_fields)
1625
+
1626
+ # There's some duplication between `extra_behavior` and
1627
+ # the config's `extra`/core config's `extra_fields_behavior`.
1628
+ # However, it is common to manually create TypedDictSchemas,
1629
+ # where you don't necessarily have a class.
1630
+ # At runtime, `extra_behavior` takes priority over the config
1631
+ # for validation, so follow the same for the JSON Schema:
1632
+ if 'extras_schema' in schema and schema['extras_schema'] != core_schema.any_schema():
1633
+ allow_additional_props = self.generate_inner(schema['extras_schema'])
1634
+ else:
1635
+ allow_additional_props = True
1636
+
1637
+ if schema.get('extra_behavior') == 'forbid':
1638
+ json_schema['additionalProperties'] = False
1639
+ elif schema.get('extra_behavior') == 'allow':
1640
+ json_schema['additionalProperties'] = allow_additional_props
1641
+
1642
+ if cls is not None:
1643
+ # `_update_class_schema()` will not override
1644
+ # `additionalProperties` if already present:
1645
+ self._update_class_schema(json_schema, cls, config or {})
1646
+ elif 'additionalProperties' not in json_schema:
1647
+ extra = schema.get('config', {}).get('extra_fields_behavior')
1648
+ if extra == 'forbid':
1649
+ json_schema['additionalProperties'] = False
1650
+ elif extra == 'allow':
1651
+ json_schema['additionalProperties'] = allow_additional_props
1652
+
1653
+ return json_schema
1654
+
1655
+ @staticmethod
1656
+ def _name_required_computed_fields(
1657
+ computed_fields: list[ComputedField],
1658
+ ) -> list[tuple[str, bool, core_schema.ComputedField]]:
1659
+ return [
1660
+ (field['property_name'], field.get('serialization_exclude_if') is None, field) for field in computed_fields
1661
+ ]
1662
+
1663
+ def _named_required_fields_schema(
1664
+ self, named_required_fields: Sequence[tuple[str, bool, CoreSchemaField]]
1665
+ ) -> JsonSchemaValue:
1666
+ properties: dict[str, JsonSchemaValue] = {}
1667
+ required_fields: list[str] = []
1668
+ for name, required, field in named_required_fields:
1669
+ if self.by_alias:
1670
+ name = self._get_alias_name(field, name)
1671
+ try:
1672
+ field_json_schema = self.generate_inner(field).copy()
1673
+ except PydanticOmit:
1674
+ continue
1675
+ if 'title' not in field_json_schema and self.field_title_should_be_set(field):
1676
+ title = self.get_title_from_name(name)
1677
+ field_json_schema['title'] = title
1678
+ field_json_schema = self.handle_ref_overrides(field_json_schema)
1679
+ properties[name] = field_json_schema
1680
+ if required:
1681
+ required_fields.append(name)
1682
+
1683
+ json_schema = {'type': 'object', 'properties': properties}
1684
+ if required_fields:
1685
+ json_schema['required'] = required_fields
1686
+ return json_schema
1687
+
1688
+ def _get_alias_name(self, field: CoreSchemaField, name: str) -> str:
1689
+ if field['type'] == 'computed-field':
1690
+ alias: Any = field.get('alias', name)
1691
+ elif self.mode == 'validation':
1692
+ use_alias = self._config.validate_by_alias if self._by_alias is None else self._by_alias
1693
+ alias = field.get('validation_alias', name) if use_alias else name
1694
+ else:
1695
+ alias = field.get('serialization_alias', name)
1696
+ if isinstance(alias, str):
1697
+ name = alias
1698
+ elif isinstance(alias, list):
1699
+ alias = cast('list[str] | str', alias)
1700
+ for path in alias:
1701
+ if isinstance(path, list) and len(path) == 1 and isinstance(path[0], str):
1702
+ # Use the first valid single-item string path; the code that constructs the alias array
1703
+ # should ensure the first such item is what belongs in the JSON schema
1704
+ name = path[0]
1705
+ break
1706
+ else:
1707
+ assert_never(alias)
1708
+ return name
1709
+
1710
+ def typed_dict_field_schema(self, schema: core_schema.TypedDictField) -> JsonSchemaValue:
1711
+ """Generates a JSON schema that matches a schema that defines a typed dict field.
1712
+
1713
+ Args:
1714
+ schema: The core schema.
1715
+
1716
+ Returns:
1717
+ The generated JSON schema.
1718
+ """
1719
+ return self.generate_inner(schema['schema'])
1720
+
1721
+ def dataclass_field_schema(self, schema: core_schema.DataclassField) -> JsonSchemaValue:
1722
+ """Generates a JSON schema that matches a schema that defines a dataclass field.
1723
+
1724
+ Args:
1725
+ schema: The core schema.
1726
+
1727
+ Returns:
1728
+ The generated JSON schema.
1729
+ """
1730
+ return self.generate_inner(schema['schema'])
1731
+
1732
+ def model_field_schema(self, schema: core_schema.ModelField) -> JsonSchemaValue:
1733
+ """Generates a JSON schema that matches a schema that defines a model field.
1734
+
1735
+ Args:
1736
+ schema: The core schema.
1737
+
1738
+ Returns:
1739
+ The generated JSON schema.
1740
+ """
1741
+ return self.generate_inner(schema['schema'])
1742
+
1743
+ def computed_field_schema(self, schema: core_schema.ComputedField) -> JsonSchemaValue:
1744
+ """Generates a JSON schema that matches a schema that defines a computed field.
1745
+
1746
+ Args:
1747
+ schema: The core schema.
1748
+
1749
+ Returns:
1750
+ The generated JSON schema.
1751
+ """
1752
+ return self.generate_inner(schema['return_schema'])
1753
+
1754
+ def model_schema(self, schema: core_schema.ModelSchema) -> JsonSchemaValue:
1755
+ """Generates a JSON schema that matches a schema that defines a model.
1756
+
1757
+ Args:
1758
+ schema: The core schema.
1759
+
1760
+ Returns:
1761
+ The generated JSON schema.
1762
+ """
1763
+ # We do not use schema['model'].model_json_schema() here
1764
+ # because it could lead to inconsistent refs handling, etc.
1765
+ cls = cast('type[BaseModel]', schema['cls'])
1766
+ config = cls.model_config
1767
+
1768
+ with self._config_wrapper_stack.push(config):
1769
+ json_schema = self.generate_inner(schema['schema'])
1770
+
1771
+ self._update_class_schema(json_schema, cls, config)
1772
+
1773
+ return json_schema
1774
+
1775
+ def _update_class_schema(self, json_schema: JsonSchemaValue, cls: type[Any], config: ConfigDict) -> None:
1776
+ """Update json_schema with the following, extracted from `config` and `cls`:
1777
+
1778
+ * title
1779
+ * description
1780
+ * additional properties
1781
+ * json_schema_extra
1782
+ * deprecated
1783
+
1784
+ Done in place, hence there's no return value as the original json_schema is mutated.
1785
+ No ref resolving is involved here, as that's not appropriate for simple updates.
1786
+ """
1787
+ from ._internal._dataclasses import is_stdlib_dataclass
1788
+ from .main import BaseModel
1789
+
1790
+ if (config_title := config.get('title')) is not None:
1791
+ json_schema.setdefault('title', config_title)
1792
+ elif model_title_generator := config.get('model_title_generator'):
1793
+ title = model_title_generator(cls)
1794
+ if not isinstance(title, str):
1795
+ raise TypeError(f'model_title_generator {model_title_generator} must return str, not {title.__class__}')
1796
+ json_schema.setdefault('title', title)
1797
+ if 'title' not in json_schema:
1798
+ json_schema['title'] = cls.__name__
1799
+
1800
+ # BaseModel and dataclasses; don't use cls.__doc__ as it will contain the verbose class signature by default
1801
+ if cls is BaseModel:
1802
+ docstring = None
1803
+ elif is_stdlib_dataclass(cls): # For Pydantic dataclasses, we already handle this at class creation
1804
+ # The `dataclass` module generates a `__doc__` based on the `inspect.signature()`
1805
+ # result, which we don't want to use as a description. Such `__doc__` startswith
1806
+ # `cls.__name__(`, which could lead to mistakenly discarding it if for some reason
1807
+ # an explicitly set class docstring follows the same pattern, but this is unlikely
1808
+ # to happen.
1809
+ doc = cls.__doc__
1810
+ docstring = None if doc is None or doc.startswith(f'{cls.__name__}(') else doc
1811
+ else:
1812
+ docstring = cls.__doc__
1813
+
1814
+ if docstring:
1815
+ json_schema.setdefault('description', inspect.cleandoc(docstring))
1816
+
1817
+ extra = config.get('extra')
1818
+ if 'additionalProperties' not in json_schema: # This check is particularly important for `typed_dict_schema()`
1819
+ if extra == 'allow':
1820
+ json_schema['additionalProperties'] = True
1821
+ elif extra == 'forbid':
1822
+ json_schema['additionalProperties'] = False
1823
+
1824
+ json_schema_extra = config.get('json_schema_extra')
1825
+ if issubclass(cls, BaseModel) and cls.__pydantic_root_model__:
1826
+ root_json_schema_extra = cls.model_fields['root'].json_schema_extra
1827
+ if json_schema_extra and root_json_schema_extra:
1828
+ raise ValueError(
1829
+ '"model_config[\'json_schema_extra\']" and "Field.json_schema_extra" on "RootModel.root"'
1830
+ ' field must not be set simultaneously'
1831
+ )
1832
+ if root_json_schema_extra:
1833
+ json_schema_extra = root_json_schema_extra
1834
+
1835
+ if isinstance(json_schema_extra, (staticmethod, classmethod)):
1836
+ # In older versions of python, this is necessary to ensure staticmethod/classmethods are callable
1837
+ json_schema_extra = json_schema_extra.__get__(cls)
1838
+
1839
+ if isinstance(json_schema_extra, dict):
1840
+ json_schema.update(json_schema_extra)
1841
+ elif callable(json_schema_extra):
1842
+ if len(_typing_extra.signature_no_eval(json_schema_extra).parameters) > 1:
1843
+ json_schema_extra = cast(Callable[[JsonDict, type[Any]], None], json_schema_extra)
1844
+ json_schema_extra(json_schema, cls)
1845
+ else:
1846
+ json_schema_extra = cast(Callable[[JsonDict], None], json_schema_extra)
1847
+ json_schema_extra(json_schema)
1848
+ elif json_schema_extra is not None:
1849
+ raise ValueError(
1850
+ f"model_config['json_schema_extra']={json_schema_extra} should be a dict, callable, or None"
1851
+ )
1852
+
1853
+ if hasattr(cls, '__deprecated__'):
1854
+ json_schema['deprecated'] = True
1855
+
1856
+ def resolve_ref_schema(self, json_schema: JsonSchemaValue) -> JsonSchemaValue:
1857
+ """Resolve a JsonSchemaValue to the non-ref schema if it is a $ref schema.
1858
+
1859
+ Args:
1860
+ json_schema: The schema to resolve.
1861
+
1862
+ Returns:
1863
+ The resolved schema.
1864
+
1865
+ Raises:
1866
+ RuntimeError: If the schema reference can't be found in definitions.
1867
+ """
1868
+ while '$ref' in json_schema:
1869
+ ref = json_schema['$ref']
1870
+ schema_to_update = self.get_schema_from_definitions(JsonRef(ref))
1871
+ if schema_to_update is None:
1872
+ raise RuntimeError(f'Cannot update undefined schema for $ref={ref}')
1873
+ json_schema = schema_to_update
1874
+ return json_schema
1875
+
1876
+ def model_fields_schema(self, schema: core_schema.ModelFieldsSchema) -> JsonSchemaValue:
1877
+ """Generates a JSON schema that matches a schema that defines a model's fields.
1878
+
1879
+ Args:
1880
+ schema: The core schema.
1881
+
1882
+ Returns:
1883
+ The generated JSON schema.
1884
+ """
1885
+ named_required_fields: list[tuple[str, bool, CoreSchemaField]] = [
1886
+ (name, self.field_is_required(field, total=True), field)
1887
+ for name, field in schema['fields'].items()
1888
+ if self.field_is_present(field)
1889
+ ]
1890
+ if self.mode == 'serialization':
1891
+ named_required_fields.extend(self._name_required_computed_fields(schema.get('computed_fields', [])))
1892
+ json_schema = self._named_required_fields_schema(named_required_fields)
1893
+ extras_schema = schema.get('extras_schema', None)
1894
+ if extras_schema is not None:
1895
+ schema_to_update = self.resolve_ref_schema(json_schema)
1896
+ schema_to_update['additionalProperties'] = self.generate_inner(extras_schema)
1897
+ return json_schema
1898
+
1899
+ def field_is_present(self, field: CoreSchemaField) -> bool:
1900
+ """Whether the field should be included in the generated JSON schema.
1901
+
1902
+ Args:
1903
+ field: The schema for the field itself.
1904
+
1905
+ Returns:
1906
+ `True` if the field should be included in the generated JSON schema, `False` otherwise.
1907
+ """
1908
+ if self.mode == 'serialization':
1909
+ # If you still want to include the field in the generated JSON schema,
1910
+ # override this method and return True
1911
+ return not field.get('serialization_exclude')
1912
+ elif self.mode == 'validation':
1913
+ return True
1914
+ else:
1915
+ assert_never(self.mode)
1916
+
1917
+ def field_is_required(
1918
+ self,
1919
+ field: core_schema.ModelField | core_schema.DataclassField | core_schema.TypedDictField,
1920
+ total: bool,
1921
+ ) -> bool:
1922
+ """Whether the field should be marked as required in the generated JSON schema.
1923
+ (Note that this is irrelevant if the field is not present in the JSON schema.).
1924
+
1925
+ Args:
1926
+ field: The schema for the field itself.
1927
+ total: Only applies to `TypedDictField`s.
1928
+ Indicates if the `TypedDict` this field belongs to is total, in which case any fields that don't
1929
+ explicitly specify `required=False` are required.
1930
+
1931
+ Returns:
1932
+ `True` if the field should be marked as required in the generated JSON schema, `False` otherwise.
1933
+ """
1934
+ if field['type'] == 'typed-dict-field':
1935
+ required = field.get('required', total)
1936
+ else:
1937
+ required = field['schema']['type'] != 'default'
1938
+
1939
+ if self.mode == 'serialization':
1940
+ has_exclude_if = field.get('serialization_exclude_if') is not None
1941
+ if self._config.json_schema_serialization_defaults_required:
1942
+ return not has_exclude_if
1943
+ else:
1944
+ return required and not has_exclude_if
1945
+ else:
1946
+ return required
1947
+
1948
+ def dataclass_args_schema(self, schema: core_schema.DataclassArgsSchema) -> JsonSchemaValue:
1949
+ """Generates a JSON schema that matches a schema that defines a dataclass's constructor arguments.
1950
+
1951
+ Args:
1952
+ schema: The core schema.
1953
+
1954
+ Returns:
1955
+ The generated JSON schema.
1956
+ """
1957
+ named_required_fields: list[tuple[str, bool, CoreSchemaField]] = [
1958
+ (field['name'], self.field_is_required(field, total=True), field)
1959
+ for field in schema['fields']
1960
+ if self.field_is_present(field)
1961
+ ]
1962
+ if self.mode == 'serialization':
1963
+ named_required_fields.extend(self._name_required_computed_fields(schema.get('computed_fields', [])))
1964
+ return self._named_required_fields_schema(named_required_fields)
1965
+
1966
+ def dataclass_schema(self, schema: core_schema.DataclassSchema) -> JsonSchemaValue:
1967
+ """Generates a JSON schema that matches a schema that defines a dataclass.
1968
+
1969
+ Args:
1970
+ schema: The core schema.
1971
+
1972
+ Returns:
1973
+ The generated JSON schema.
1974
+ """
1975
+
1976
+ cls = schema['cls']
1977
+ # If (stdlib) dataclass doesn't have config, the parent's config is used (as during core schema generation):
1978
+ config = cast('ConfigDict | None', getattr(cls, '__pydantic_config__', None))
1979
+
1980
+ with self._config_wrapper_stack.push(config):
1981
+ json_schema = self.generate_inner(schema['schema']).copy()
1982
+
1983
+ # Only the parent's `extra` config value is relevant to the class schema. It is propagated
1984
+ # to the core config (and used for validation), so we reuse it:
1985
+ class_config = config or {}
1986
+ if 'extra' not in class_config and (extra := schema.get('config', {}).get('extra_fields_behavior')) is not None:
1987
+ class_config = cast('ConfigDict', {**class_config, 'extra': extra})
1988
+
1989
+ self._update_class_schema(json_schema, cls, class_config)
1990
+
1991
+ return json_schema
1992
+
1993
+ def named_tuple_field_schema(self, schema: core_schema.NamedTupleField) -> JsonSchemaValue:
1994
+ """Generates a JSON schema that matches a schema that defines a named tuple field.
1995
+
1996
+ Args:
1997
+ schema: The core schema.
1998
+
1999
+ Returns:
2000
+ The generated JSON schema.
2001
+ """
2002
+ return self.generate_inner(schema['schema'])
2003
+
2004
+ def named_tuple_schema(self, schema: core_schema.NamedTupleSchema) -> JsonSchemaValue:
2005
+ """Generates a JSON schema that matches a schema that defines a named tuple.
2006
+
2007
+ Args:
2008
+ schema: The core schema.
2009
+
2010
+ Returns:
2011
+ The generated JSON schema.
2012
+ """
2013
+ prefix_items: list[JsonSchemaValue] = []
2014
+ min_items = 0
2015
+
2016
+ for field in schema['fields']:
2017
+ name = field['name']
2018
+ if self.by_alias:
2019
+ alias = field.get('validation_alias')
2020
+ if isinstance(alias, str):
2021
+ name = alias
2022
+
2023
+ field_schema = self.generate_inner(field['schema']).copy()
2024
+ if 'title' not in field_schema and self.field_title_should_be_set(field['schema']):
2025
+ field_schema['title'] = self.get_title_from_name(name)
2026
+ prefix_items.append(field_schema)
2027
+
2028
+ if field['schema']['type'] != 'default':
2029
+ # This assumes that if the field has a default value,
2030
+ # the inner schema must be of type WithDefaultSchema.
2031
+ min_items += 1
2032
+
2033
+ json_schema: JsonSchemaValue = {'type': 'array'}
2034
+ if prefix_items:
2035
+ json_schema['prefixItems'] = prefix_items
2036
+ if min_items:
2037
+ json_schema['minItems'] = min_items
2038
+ json_schema['maxItems'] = len(prefix_items)
2039
+
2040
+ return json_schema
2041
+
2042
+ def arguments_schema(self, schema: core_schema.ArgumentsSchema) -> JsonSchemaValue:
2043
+ """Generates a JSON schema that matches a schema that defines a function's arguments.
2044
+
2045
+ Args:
2046
+ schema: The core schema.
2047
+
2048
+ Returns:
2049
+ The generated JSON schema.
2050
+ """
2051
+ prefer_positional = schema.get('metadata', {}).get('pydantic_js_prefer_positional_arguments')
2052
+
2053
+ arguments = schema['arguments_schema']
2054
+ kw_only_arguments = [a for a in arguments if a.get('mode') == 'keyword_only']
2055
+ kw_or_p_arguments = [a for a in arguments if a.get('mode') in {'positional_or_keyword', None}]
2056
+ p_only_arguments = [a for a in arguments if a.get('mode') == 'positional_only']
2057
+ var_args_schema = schema.get('var_args_schema')
2058
+ var_kwargs_schema = schema.get('var_kwargs_schema')
2059
+
2060
+ if prefer_positional:
2061
+ positional_possible = not kw_only_arguments and not var_kwargs_schema
2062
+ if positional_possible:
2063
+ return self.p_arguments_schema(p_only_arguments + kw_or_p_arguments, var_args_schema)
2064
+
2065
+ keyword_possible = not p_only_arguments and not var_args_schema
2066
+ if keyword_possible:
2067
+ return self.kw_arguments_schema(kw_or_p_arguments + kw_only_arguments, var_kwargs_schema)
2068
+
2069
+ if not prefer_positional:
2070
+ positional_possible = not kw_only_arguments and not var_kwargs_schema
2071
+ if positional_possible:
2072
+ return self.p_arguments_schema(p_only_arguments + kw_or_p_arguments, var_args_schema)
2073
+
2074
+ raise PydanticInvalidForJsonSchema(
2075
+ 'Unable to generate JSON schema for arguments validator with positional-only and keyword-only arguments'
2076
+ )
2077
+
2078
+ def kw_arguments_schema(
2079
+ self, arguments: list[core_schema.ArgumentsParameter], var_kwargs_schema: CoreSchema | None
2080
+ ) -> JsonSchemaValue:
2081
+ """Generates a JSON schema that matches a schema that defines a function's keyword arguments.
2082
+
2083
+ Args:
2084
+ arguments: The core schema.
2085
+
2086
+ Returns:
2087
+ The generated JSON schema.
2088
+ """
2089
+ properties: dict[str, JsonSchemaValue] = {}
2090
+ required: list[str] = []
2091
+ for argument in arguments:
2092
+ name = self.get_argument_name(argument)
2093
+ argument_schema = self.generate_inner(argument['schema']).copy()
2094
+ if 'title' not in argument_schema and self.field_title_should_be_set(argument['schema']):
2095
+ argument_schema['title'] = self.get_title_from_name(name)
2096
+ properties[name] = argument_schema
2097
+
2098
+ if argument['schema']['type'] != 'default':
2099
+ # This assumes that if the argument has a default value,
2100
+ # the inner schema must be of type WithDefaultSchema.
2101
+ # I believe this is true, but I am not 100% sure
2102
+ required.append(name)
2103
+
2104
+ json_schema: JsonSchemaValue = {'type': 'object', 'properties': properties}
2105
+ if required:
2106
+ json_schema['required'] = required
2107
+
2108
+ if var_kwargs_schema:
2109
+ additional_properties_schema = self.generate_inner(var_kwargs_schema)
2110
+ if additional_properties_schema:
2111
+ json_schema['additionalProperties'] = additional_properties_schema
2112
+ else:
2113
+ json_schema['additionalProperties'] = False
2114
+ return json_schema
2115
+
2116
+ def p_arguments_schema(
2117
+ self, arguments: list[core_schema.ArgumentsParameter], var_args_schema: CoreSchema | None
2118
+ ) -> JsonSchemaValue:
2119
+ """Generates a JSON schema that matches a schema that defines a function's positional arguments.
2120
+
2121
+ Args:
2122
+ arguments: The core schema.
2123
+
2124
+ Returns:
2125
+ The generated JSON schema.
2126
+ """
2127
+ prefix_items: list[JsonSchemaValue] = []
2128
+ min_items = 0
2129
+
2130
+ for argument in arguments:
2131
+ name = self.get_argument_name(argument)
2132
+
2133
+ argument_schema = self.generate_inner(argument['schema']).copy()
2134
+ if 'title' not in argument_schema and self.field_title_should_be_set(argument['schema']):
2135
+ argument_schema['title'] = self.get_title_from_name(name)
2136
+ prefix_items.append(argument_schema)
2137
+
2138
+ if argument['schema']['type'] != 'default':
2139
+ # This assumes that if the argument has a default value,
2140
+ # the inner schema must be of type WithDefaultSchema.
2141
+ # I believe this is true, but I am not 100% sure
2142
+ min_items += 1
2143
+
2144
+ json_schema: JsonSchemaValue = {'type': 'array'}
2145
+ if prefix_items:
2146
+ json_schema['prefixItems'] = prefix_items
2147
+ if min_items:
2148
+ json_schema['minItems'] = min_items
2149
+
2150
+ if var_args_schema:
2151
+ items_schema = self.generate_inner(var_args_schema)
2152
+ if items_schema:
2153
+ json_schema['items'] = items_schema
2154
+ else:
2155
+ json_schema['maxItems'] = len(prefix_items)
2156
+
2157
+ return json_schema
2158
+
2159
+ def get_argument_name(self, argument: core_schema.ArgumentsParameter | core_schema.ArgumentsV3Parameter) -> str:
2160
+ """Retrieves the name of an argument.
2161
+
2162
+ Args:
2163
+ argument: The core schema.
2164
+
2165
+ Returns:
2166
+ The name of the argument.
2167
+ """
2168
+ name = argument['name']
2169
+ if self.by_alias:
2170
+ alias = argument.get('alias')
2171
+ if isinstance(alias, str):
2172
+ name = alias
2173
+ else:
2174
+ pass # might want to do something else?
2175
+ return name
2176
+
2177
+ def arguments_v3_schema(self, schema: core_schema.ArgumentsV3Schema) -> JsonSchemaValue:
2178
+ """Generates a JSON schema that matches a schema that defines a function's arguments.
2179
+
2180
+ Args:
2181
+ schema: The core schema.
2182
+
2183
+ Returns:
2184
+ The generated JSON schema.
2185
+ """
2186
+ arguments = schema['arguments_schema']
2187
+ properties: dict[str, JsonSchemaValue] = {}
2188
+ required: list[str] = []
2189
+ for argument in arguments:
2190
+ mode = argument.get('mode', 'positional_or_keyword')
2191
+ name = self.get_argument_name(argument)
2192
+ argument_schema = self.generate_inner(argument['schema']).copy()
2193
+ if mode == 'var_args':
2194
+ argument_schema = {'type': 'array', 'items': argument_schema}
2195
+ elif mode == 'var_kwargs_uniform':
2196
+ argument_schema = {'type': 'object', 'additionalProperties': argument_schema}
2197
+
2198
+ argument_schema.setdefault('title', self.get_title_from_name(name))
2199
+ properties[name] = argument_schema
2200
+
2201
+ if (
2202
+ (mode == 'var_kwargs_unpacked_typed_dict' and 'required' in argument_schema)
2203
+ or mode not in {'var_args', 'var_kwargs_uniform', 'var_kwargs_unpacked_typed_dict'}
2204
+ and argument['schema']['type'] != 'default'
2205
+ ):
2206
+ # This assumes that if the argument has a default value,
2207
+ # the inner schema must be of type WithDefaultSchema.
2208
+ # I believe this is true, but I am not 100% sure
2209
+ required.append(name)
2210
+
2211
+ json_schema: JsonSchemaValue = {'type': 'object', 'properties': properties}
2212
+ if required:
2213
+ json_schema['required'] = required
2214
+ return json_schema
2215
+
2216
+ def call_schema(self, schema: core_schema.CallSchema) -> JsonSchemaValue:
2217
+ """Generates a JSON schema that matches a schema that defines a function call.
2218
+
2219
+ Args:
2220
+ schema: The core schema.
2221
+
2222
+ Returns:
2223
+ The generated JSON schema.
2224
+ """
2225
+ return self.generate_inner(schema['arguments_schema'])
2226
+
2227
+ def custom_error_schema(self, schema: core_schema.CustomErrorSchema) -> JsonSchemaValue:
2228
+ """Generates a JSON schema that matches a schema that defines a custom error.
2229
+
2230
+ Args:
2231
+ schema: The core schema.
2232
+
2233
+ Returns:
2234
+ The generated JSON schema.
2235
+ """
2236
+ return self.generate_inner(schema['schema'])
2237
+
2238
+ def json_schema(self, schema: core_schema.JsonSchema) -> JsonSchemaValue:
2239
+ """Generates a JSON schema that matches a schema that defines a JSON object.
2240
+
2241
+ Args:
2242
+ schema: The core schema.
2243
+
2244
+ Returns:
2245
+ The generated JSON schema.
2246
+ """
2247
+ content_core_schema = schema.get('schema') or core_schema.any_schema()
2248
+ content_json_schema = self.generate_inner(content_core_schema)
2249
+ if self.mode == 'validation':
2250
+ return {'type': 'string', 'contentMediaType': 'application/json', 'contentSchema': content_json_schema}
2251
+ else:
2252
+ # self.mode == 'serialization'
2253
+ return content_json_schema
2254
+
2255
+ def url_schema(self, schema: core_schema.UrlSchema) -> JsonSchemaValue:
2256
+ """Generates a JSON schema that matches a schema that defines a URL.
2257
+
2258
+ Args:
2259
+ schema: The core schema.
2260
+
2261
+ Returns:
2262
+ The generated JSON schema.
2263
+ """
2264
+ json_schema = {'type': 'string', 'format': 'uri', 'minLength': 1}
2265
+ self.update_with_validations(json_schema, schema, self.ValidationsMapping.string)
2266
+ return json_schema
2267
+
2268
+ def multi_host_url_schema(self, schema: core_schema.MultiHostUrlSchema) -> JsonSchemaValue:
2269
+ """Generates a JSON schema that matches a schema that defines a URL that can be used with multiple hosts.
2270
+
2271
+ Args:
2272
+ schema: The core schema.
2273
+
2274
+ Returns:
2275
+ The generated JSON schema.
2276
+ """
2277
+ # Note: 'multi-host-uri' is a custom/pydantic-specific format, not part of the JSON Schema spec
2278
+ json_schema = {'type': 'string', 'format': 'multi-host-uri', 'minLength': 1}
2279
+ self.update_with_validations(json_schema, schema, self.ValidationsMapping.string)
2280
+ return json_schema
2281
+
2282
+ def uuid_schema(self, schema: core_schema.UuidSchema) -> JsonSchemaValue:
2283
+ """Generates a JSON schema that matches a UUID.
2284
+
2285
+ Args:
2286
+ schema: The core schema.
2287
+
2288
+ Returns:
2289
+ The generated JSON schema.
2290
+ """
2291
+ return {'type': 'string', 'format': 'uuid'}
2292
+
2293
+ def definitions_schema(self, schema: core_schema.DefinitionsSchema) -> JsonSchemaValue:
2294
+ """Generates a JSON schema that matches a schema that defines a JSON object with definitions.
2295
+
2296
+ Args:
2297
+ schema: The core schema.
2298
+
2299
+ Returns:
2300
+ The generated JSON schema.
2301
+ """
2302
+ for definition in schema['definitions']:
2303
+ try:
2304
+ self.generate_inner(definition)
2305
+ except PydanticInvalidForJsonSchema as e: # noqa: PERF203
2306
+ core_ref: CoreRef = CoreRef(definition['ref']) # type: ignore
2307
+ self._core_defs_invalid_for_json_schema[self.get_defs_ref((core_ref, self.mode))] = e
2308
+ continue
2309
+ return self.generate_inner(schema['schema'])
2310
+
2311
+ def definition_ref_schema(self, schema: core_schema.DefinitionReferenceSchema) -> JsonSchemaValue:
2312
+ """Generates a JSON schema that matches a schema that references a definition.
2313
+
2314
+ Args:
2315
+ schema: The core schema.
2316
+
2317
+ Returns:
2318
+ The generated JSON schema.
2319
+ """
2320
+ core_ref = CoreRef(schema['schema_ref'])
2321
+ _, ref_json_schema = self.get_cache_defs_ref_schema(core_ref)
2322
+ return ref_json_schema
2323
+
2324
+ def ser_schema(
2325
+ self, schema: core_schema.SerSchema | core_schema.IncExSeqSerSchema | core_schema.IncExDictSerSchema
2326
+ ) -> JsonSchemaValue | None:
2327
+ """Generates a JSON schema that matches a schema that defines a serialized object.
2328
+
2329
+ Args:
2330
+ schema: The core schema.
2331
+
2332
+ Returns:
2333
+ The generated JSON schema.
2334
+ """
2335
+ match schema:
2336
+ case {'type': 'function-plain' | 'function-wrap'}:
2337
+ # PlainSerializerFunctionSerSchema or WrapSerializerFunctionSerSchema
2338
+ return_schema = schema.get('return_schema')
2339
+ if return_schema is not None:
2340
+ return self.generate_inner(return_schema)
2341
+ case {'type': 'format' | 'to-string'}:
2342
+ # FormatSerSchema or ToStringSerSchema
2343
+ return self.str_schema(core_schema.str_schema())
2344
+ case {'type': 'model'}:
2345
+ # ModelSerSchema
2346
+ return self.generate_inner(schema['schema'])
2347
+ return None
2348
+
2349
+ def complex_schema(self, schema: core_schema.ComplexSchema) -> JsonSchemaValue:
2350
+ """Generates a JSON schema that matches a complex number.
2351
+
2352
+ JSON has no standard way to represent complex numbers. Complex number is not a numeric
2353
+ type. Here we represent complex number as strings following the rule defined by Python.
2354
+ For instance, '1+2j' is an accepted complex string. Details can be found in
2355
+ [Python's `complex` documentation][complex].
2356
+
2357
+ Args:
2358
+ schema: The core schema.
2359
+
2360
+ Returns:
2361
+ The generated JSON schema.
2362
+ """
2363
+ return {'type': 'string'}
2364
+
2365
+ # ### Utility methods
2366
+
2367
+ def get_title_from_name(self, name: str) -> str:
2368
+ """Retrieves a title from a name.
2369
+
2370
+ Args:
2371
+ name: The name to retrieve a title from.
2372
+
2373
+ Returns:
2374
+ The title.
2375
+ """
2376
+ return name.title().replace('_', ' ').strip()
2377
+
2378
+ def field_title_should_be_set(self, schema: CoreSchemaOrField) -> bool:
2379
+ """Returns true if a field with the given schema should have a title set based on the field name.
2380
+
2381
+ Intuitively, we want this to return true for schemas that wouldn't otherwise provide their own title
2382
+ (e.g., int, float, str), and false for those that would (e.g., BaseModel subclasses).
2383
+
2384
+ Args:
2385
+ schema: The schema to check.
2386
+
2387
+ Returns:
2388
+ `True` if the field should have a title set, `False` otherwise.
2389
+ """
2390
+ if _core_utils.is_core_schema_field(schema):
2391
+ if schema['type'] == 'computed-field':
2392
+ field_schema = schema['return_schema']
2393
+ else:
2394
+ field_schema = schema['schema']
2395
+ return self.field_title_should_be_set(field_schema)
2396
+
2397
+ elif _core_utils.is_core_schema(schema):
2398
+ if schema.get('ref'): # things with refs, such as models and enums, should not have titles set
2399
+ return False
2400
+ if schema['type'] in {'default', 'nullable', 'definitions'}:
2401
+ return self.field_title_should_be_set(schema['schema']) # type: ignore[typeddict-item]
2402
+ if schema['type'] == 'missing-sentinel' and (inner_schema := schema.get('schema')) is not None:
2403
+ return self.field_title_should_be_set(inner_schema)
2404
+ if _core_utils.is_function_with_inner_schema(schema):
2405
+ return self.field_title_should_be_set(schema['schema'])
2406
+ if schema['type'] == 'definition-ref':
2407
+ # Referenced schemas should not have titles set for the same reason
2408
+ # schemas with refs should not
2409
+ return False
2410
+ return True # anything else should have title set
2411
+
2412
+ else:
2413
+ raise PydanticInvalidForJsonSchema(f'Unexpected schema type: schema={schema}') # pragma: no cover
2414
+
2415
+ def normalize_name(self, name: str) -> str:
2416
+ """Normalizes a name to be used as a key in a dictionary.
2417
+
2418
+ Args:
2419
+ name: The name to normalize.
2420
+
2421
+ Returns:
2422
+ The normalized name.
2423
+ """
2424
+ return re.sub(r'[^a-zA-Z0-9.\-_]', '_', name).replace('.', '__')
2425
+
2426
+ def get_defs_ref(self, core_mode_ref: CoreModeRef) -> DefsRef:
2427
+ """Override this method to change the way that definitions keys are generated from a core reference.
2428
+
2429
+ Args:
2430
+ core_mode_ref: The core reference.
2431
+
2432
+ Returns:
2433
+ The definitions key.
2434
+ """
2435
+ # Split the core ref into "components"; generic origins and arguments are each separate components
2436
+ core_ref, mode = core_mode_ref
2437
+ components = re.split(r'([\][,])', core_ref)
2438
+ # Remove IDs from each component
2439
+ components = [x.rsplit(':', 1)[0] for x in components]
2440
+ core_ref_no_id = ''.join(components)
2441
+ # Remove everything before the last period from each "component"
2442
+ components = [re.sub(r'(?:[^.[\]]+\.)+((?:[^.[\]]+))', r'\1', x) for x in components]
2443
+ short_ref = ''.join(components)
2444
+
2445
+ mode_title = _MODE_TITLE_MAPPING[mode]
2446
+
2447
+ # It is important that the generated defs_ref values be such that at least one choice will not
2448
+ # be generated for any other core_ref. Currently, this should be the case because we include
2449
+ # the id of the source type in the core_ref
2450
+ name = DefsRef(self.normalize_name(short_ref))
2451
+ name_mode = DefsRef(self.normalize_name(short_ref) + f'-{mode_title}')
2452
+ module_qualname = DefsRef(self.normalize_name(core_ref_no_id))
2453
+ module_qualname_mode = DefsRef(f'{module_qualname}-{mode_title}')
2454
+ module_qualname_id = DefsRef(self.normalize_name(core_ref))
2455
+ occurrence_index = self._collision_index.get(module_qualname_id)
2456
+ if occurrence_index is None:
2457
+ self._collision_counter[module_qualname] += 1
2458
+ occurrence_index = self._collision_index[module_qualname_id] = self._collision_counter[module_qualname]
2459
+
2460
+ module_qualname_occurrence = DefsRef(f'{module_qualname}__{occurrence_index}')
2461
+ module_qualname_occurrence_mode = DefsRef(f'{module_qualname_mode}__{occurrence_index}')
2462
+
2463
+ self._prioritized_defsref_choices[module_qualname_occurrence_mode] = [
2464
+ name,
2465
+ name_mode,
2466
+ module_qualname,
2467
+ module_qualname_mode,
2468
+ module_qualname_occurrence,
2469
+ module_qualname_occurrence_mode,
2470
+ ]
2471
+
2472
+ return module_qualname_occurrence_mode
2473
+
2474
+ def get_cache_defs_ref_schema(self, core_ref: CoreRef) -> tuple[DefsRef, JsonSchemaValue]:
2475
+ """This method wraps the get_defs_ref method with some cache-lookup/population logic,
2476
+ and returns both the produced defs_ref and the JSON schema that will refer to the right definition.
2477
+
2478
+ Args:
2479
+ core_ref: The core reference to get the definitions reference for.
2480
+
2481
+ Returns:
2482
+ A tuple of the definitions reference and the JSON schema that will refer to it.
2483
+ """
2484
+ core_mode_ref = (core_ref, self.mode)
2485
+ maybe_defs_ref = self.core_to_defs_refs.get(core_mode_ref)
2486
+ if maybe_defs_ref is not None:
2487
+ json_ref = self.core_to_json_refs[core_mode_ref]
2488
+ return maybe_defs_ref, {'$ref': json_ref}
2489
+
2490
+ defs_ref = self.get_defs_ref(core_mode_ref)
2491
+
2492
+ # populate the ref translation mappings
2493
+ self.core_to_defs_refs[core_mode_ref] = defs_ref
2494
+ self.defs_to_core_refs[defs_ref] = core_mode_ref
2495
+
2496
+ json_ref = JsonRef(self.ref_template.format(model=defs_ref))
2497
+ self.core_to_json_refs[core_mode_ref] = json_ref
2498
+ self.json_to_defs_refs[json_ref] = defs_ref
2499
+ ref_json_schema = {'$ref': json_ref}
2500
+ return defs_ref, ref_json_schema
2501
+
2502
+ def handle_ref_overrides(self, json_schema: JsonSchemaValue) -> JsonSchemaValue:
2503
+ """Remove any sibling keys that are redundant with the referenced schema.
2504
+
2505
+ Args:
2506
+ json_schema: The schema to remove redundant sibling keys from.
2507
+
2508
+ Returns:
2509
+ The schema with redundant sibling keys removed.
2510
+ """
2511
+ if '$ref' in json_schema:
2512
+ # prevent modifications to the input; this copy may be safe to drop if there is significant overhead
2513
+ json_schema = json_schema.copy()
2514
+
2515
+ referenced_json_schema = self.get_schema_from_definitions(JsonRef(json_schema['$ref']))
2516
+ if referenced_json_schema is None:
2517
+ # This can happen when building schemas for models with not-yet-defined references.
2518
+ # It may be a good idea to do a recursive pass at the end of the generation to remove
2519
+ # any redundant override keys.
2520
+ return json_schema
2521
+ for k, v in list(json_schema.items()):
2522
+ if k == '$ref':
2523
+ continue
2524
+ if k in referenced_json_schema and referenced_json_schema[k] == v:
2525
+ del json_schema[k] # redundant key
2526
+
2527
+ return json_schema
2528
+
2529
+ def get_schema_from_definitions(self, json_ref: JsonRef) -> JsonSchemaValue | None:
2530
+ try:
2531
+ def_ref = self.json_to_defs_refs[json_ref]
2532
+ if def_ref in self._core_defs_invalid_for_json_schema:
2533
+ raise self._core_defs_invalid_for_json_schema[def_ref]
2534
+ return self.definitions.get(def_ref, None)
2535
+ except KeyError:
2536
+ if json_ref.startswith(('http://', 'https://')):
2537
+ return None
2538
+ raise
2539
+
2540
+ def encode_default(self, dft: Any) -> Any:
2541
+ """Encode a default value to a JSON-serializable value.
2542
+
2543
+ This is used to encode default values for fields in the generated JSON schema.
2544
+
2545
+ Args:
2546
+ dft: The default value to encode.
2547
+
2548
+ Returns:
2549
+ The encoded default value.
2550
+ """
2551
+ from .type_adapter import TypeAdapter, _type_has_config
2552
+
2553
+ config = self._config.config_dict
2554
+ if self.mode == 'validation' and ('ser_json_temporal' in config or 'ser_json_timedelta' in config):
2555
+ # Temporal serialization formats aren't applied to validation JSON Schemas (see `_common_temporal_schema()`),
2556
+ # so they shouldn't be applied to the default either:
2557
+ config = cast(
2558
+ 'ConfigDict',
2559
+ {k: v for k, v in config.items() if k not in ('ser_json_temporal', 'ser_json_timedelta')},
2560
+ )
2561
+ try:
2562
+ # Types with their own config (e.g. models) can't be used with a config, so we serialize "as Any",
2563
+ # which will serialize using their own serializer.
2564
+ return TypeAdapter(Any if _type_has_config(type(dft)) else type(dft), config=config).dump_python(
2565
+ dft, by_alias=self.by_alias, mode='json'
2566
+ )
2567
+ except Exception as e:
2568
+ raise pydantic_core.PydanticSerializationError(f'Unable to encode default value {dft}') from e
2569
+
2570
+ def update_with_validations(
2571
+ self, json_schema: JsonSchemaValue, core_schema: CoreSchema, mapping: dict[str, str]
2572
+ ) -> None:
2573
+ """Update the json_schema with the corresponding validations specified in the core_schema,
2574
+ using the provided mapping to translate keys in core_schema to the appropriate keys for a JSON schema.
2575
+
2576
+ Args:
2577
+ json_schema: The JSON schema to update.
2578
+ core_schema: The core schema to get the validations from.
2579
+ mapping: A mapping from core_schema attribute names to the corresponding JSON schema attribute names.
2580
+ """
2581
+ for core_key, json_schema_key in mapping.items():
2582
+ if core_key in core_schema:
2583
+ json_schema[json_schema_key] = core_schema[core_key]
2584
+
2585
+ class ValidationsMapping:
2586
+ """This class just contains mappings from core_schema attribute names to the corresponding
2587
+ JSON schema attribute names. While I suspect it is unlikely to be necessary, you can in
2588
+ principle override this class in a subclass of GenerateJsonSchema (by inheriting from
2589
+ GenerateJsonSchema.ValidationsMapping) to change these mappings.
2590
+ """
2591
+
2592
+ numeric = {
2593
+ 'multiple_of': 'multipleOf',
2594
+ 'le': 'maximum',
2595
+ 'ge': 'minimum',
2596
+ 'lt': 'exclusiveMaximum',
2597
+ 'gt': 'exclusiveMinimum',
2598
+ }
2599
+ bytes = {
2600
+ 'min_length': 'minLength',
2601
+ 'max_length': 'maxLength',
2602
+ }
2603
+ string = {
2604
+ 'min_length': 'minLength',
2605
+ 'max_length': 'maxLength',
2606
+ 'pattern': 'pattern',
2607
+ }
2608
+ array = {
2609
+ 'min_length': 'minItems',
2610
+ 'max_length': 'maxItems',
2611
+ }
2612
+ object = {
2613
+ 'min_length': 'minProperties',
2614
+ 'max_length': 'maxProperties',
2615
+ }
2616
+
2617
+ def get_flattened_anyof(self, schemas: list[JsonSchemaValue]) -> JsonSchemaValue:
2618
+ members = []
2619
+ for schema in schemas:
2620
+ if len(schema) == 1 and 'anyOf' in schema:
2621
+ members.extend(schema['anyOf'])
2622
+ else:
2623
+ members.append(schema)
2624
+ members = _deduplicate_schemas(members)
2625
+ if len(members) == 1:
2626
+ return members[0]
2627
+ return {'anyOf': members}
2628
+
2629
+ def get_json_ref_counts(self, json_schema: JsonSchemaValue) -> dict[JsonRef, int]:
2630
+ """Get all values corresponding to the key '$ref' anywhere in the json_schema."""
2631
+ json_refs: dict[JsonRef, int] = Counter()
2632
+
2633
+ def _add_json_refs(schema: Any) -> None:
2634
+ if isinstance(schema, dict):
2635
+ if '$ref' in schema:
2636
+ json_ref = JsonRef(schema['$ref'])
2637
+ if not isinstance(json_ref, str):
2638
+ return # in this case, '$ref' might have been the name of a property
2639
+ already_visited = json_ref in json_refs
2640
+ json_refs[json_ref] += 1
2641
+ if already_visited:
2642
+ return # prevent recursion on a definition that was already visited
2643
+ try:
2644
+ defs_ref = self.json_to_defs_refs[json_ref]
2645
+ if defs_ref in self._core_defs_invalid_for_json_schema:
2646
+ raise self._core_defs_invalid_for_json_schema[defs_ref]
2647
+ _add_json_refs(self.definitions[defs_ref])
2648
+ except KeyError:
2649
+ if not json_ref.startswith(('http://', 'https://')):
2650
+ raise
2651
+
2652
+ for k, v in schema.items():
2653
+ if k == 'examples' and isinstance(v, list):
2654
+ # Skip examples that may contain arbitrary values and references
2655
+ # (see the comment in `_get_all_json_refs` for more details).
2656
+ continue
2657
+ _add_json_refs(v)
2658
+ elif isinstance(schema, list):
2659
+ for v in schema:
2660
+ _add_json_refs(v)
2661
+
2662
+ _add_json_refs(json_schema)
2663
+ return json_refs
2664
+
2665
+ def handle_invalid_for_json_schema(self, schema: CoreSchemaOrField, error_info: str) -> JsonSchemaValue:
2666
+ raise PydanticInvalidForJsonSchema(f'Cannot generate a JsonSchema for {error_info}')
2667
+
2668
+ def emit_warning(self, kind: JsonSchemaWarningKind, detail: str) -> None:
2669
+ """This method simply emits PydanticJsonSchemaWarnings based on handling in the `warning_message` method."""
2670
+ message = self.render_warning_message(kind, detail)
2671
+ if message is not None:
2672
+ warnings.warn(message, PydanticJsonSchemaWarning)
2673
+
2674
+ def render_warning_message(self, kind: JsonSchemaWarningKind, detail: str) -> str | None:
2675
+ """This method is responsible for ignoring warnings as desired, and for formatting the warning messages.
2676
+
2677
+ You can override the value of `ignored_warning_kinds` in a subclass of GenerateJsonSchema
2678
+ to modify what warnings are generated. If you want more control, you can override this method;
2679
+ just return None in situations where you don't want warnings to be emitted.
2680
+
2681
+ Args:
2682
+ kind: The kind of warning to render. It can be one of the following:
2683
+
2684
+ - 'skipped-choice': A choice field was skipped because it had no valid choices.
2685
+ - 'non-serializable-default': A default value was skipped because it was not JSON-serializable.
2686
+ detail: A string with additional details about the warning.
2687
+
2688
+ Returns:
2689
+ The formatted warning message, or `None` if no warning should be emitted.
2690
+ """
2691
+ if kind in self.ignored_warning_kinds:
2692
+ return None
2693
+ return f'{detail} [{kind}]'
2694
+
2695
+ def _build_definitions_remapping(self) -> _DefinitionsRemapping:
2696
+ defs_to_json: dict[DefsRef, JsonRef] = {}
2697
+ for defs_refs in self._prioritized_defsref_choices.values():
2698
+ for defs_ref in defs_refs:
2699
+ json_ref = JsonRef(self.ref_template.format(model=defs_ref))
2700
+ defs_to_json[defs_ref] = json_ref
2701
+
2702
+ return _DefinitionsRemapping.from_prioritized_choices(
2703
+ self._prioritized_defsref_choices, defs_to_json, self.definitions
2704
+ )
2705
+
2706
+ def _garbage_collect_definitions(self, schema: JsonSchemaValue) -> None:
2707
+ visited_defs_refs: set[DefsRef] = set()
2708
+ unvisited_json_refs = _get_all_json_refs(schema)
2709
+ while unvisited_json_refs:
2710
+ next_json_ref = unvisited_json_refs.pop()
2711
+ try:
2712
+ next_defs_ref = self.json_to_defs_refs[next_json_ref]
2713
+ if next_defs_ref in visited_defs_refs:
2714
+ continue
2715
+ visited_defs_refs.add(next_defs_ref)
2716
+ unvisited_json_refs.update(_get_all_json_refs(self.definitions[next_defs_ref]))
2717
+ except KeyError:
2718
+ if not next_json_ref.startswith(('http://', 'https://')):
2719
+ raise
2720
+
2721
+ self.definitions = {k: v for k, v in self.definitions.items() if k in visited_defs_refs}
2722
+
2723
+
2724
+ # ##### Start JSON Schema Generation Functions #####
2725
+
2726
+
2727
+ def model_json_schema(
2728
+ cls: type[BaseModel] | type[PydanticDataclass],
2729
+ by_alias: bool | None = None,
2730
+ ref_template: str = DEFAULT_REF_TEMPLATE,
2731
+ union_format: Literal['any_of', 'primitive_type_array'] = 'any_of',
2732
+ schema_generator: type[GenerateJsonSchema] = GenerateJsonSchema,
2733
+ mode: JsonSchemaMode = 'validation',
2734
+ ) -> dict[str, Any]:
2735
+ """Utility function to generate a JSON Schema for a model.
2736
+
2737
+ Args:
2738
+ cls: The model class to generate a JSON Schema for.
2739
+ by_alias: Whether to use field aliases as keys in the generated JSON Schema. If `None` (the default),
2740
+ aliases are used unless disabled by the configuration (i.e. `validate_by_alias=False` for validation
2741
+ schemas). An explicit value takes precedence over the configuration.
2742
+ ref_template: The template to use for generating JSON Schema references.
2743
+ union_format: The format to use when combining schemas from unions together. Can be one of:
2744
+
2745
+ - `'any_of'`: Use the [`anyOf`](https://json-schema.org/understanding-json-schema/reference/combining#anyOf)
2746
+ keyword to combine schemas (the default).
2747
+ - `'primitive_type_array'`: Use the [`type`](https://json-schema.org/understanding-json-schema/reference/type)
2748
+ keyword as an array of strings, containing each type of the combination. If any of the schemas is not a primitive
2749
+ type (`string`, `boolean`, `null`, `integer` or `number`) or contains constraints/metadata, falls back to
2750
+ `any_of`.
2751
+ schema_generator: The class to use for generating the JSON Schema.
2752
+ mode: The mode to use for generating the JSON Schema. It can be one of the following:
2753
+
2754
+ - 'validation': Generate a JSON Schema for validating data.
2755
+ - 'serialization': Generate a JSON Schema for serializing data.
2756
+
2757
+ Returns:
2758
+ The generated JSON Schema.
2759
+ """
2760
+ from .main import BaseModel
2761
+
2762
+ schema_generator_instance = schema_generator(
2763
+ by_alias=by_alias, ref_template=ref_template, union_format=union_format
2764
+ )
2765
+
2766
+ if isinstance(cls.__pydantic_core_schema__, _mock_val_ser.MockCoreSchema):
2767
+ cls.__pydantic_core_schema__.rebuild()
2768
+
2769
+ if cls is BaseModel:
2770
+ raise AttributeError('model_json_schema() must be called on a subclass of BaseModel, not BaseModel itself.')
2771
+
2772
+ assert not isinstance(cls.__pydantic_core_schema__, _mock_val_ser.MockCoreSchema), 'this is a bug! please report it'
2773
+ return schema_generator_instance.generate(cls.__pydantic_core_schema__, mode=mode)
2774
+
2775
+
2776
+ def models_json_schema(
2777
+ models: Sequence[tuple[type[BaseModel] | type[PydanticDataclass], JsonSchemaMode]],
2778
+ *,
2779
+ by_alias: bool | None = None,
2780
+ title: str | None = None,
2781
+ description: str | None = None,
2782
+ ref_template: str = DEFAULT_REF_TEMPLATE,
2783
+ union_format: Literal['any_of', 'primitive_type_array'] = 'any_of',
2784
+ schema_generator: type[GenerateJsonSchema] = GenerateJsonSchema,
2785
+ ) -> tuple[dict[tuple[type[BaseModel] | type[PydanticDataclass], JsonSchemaMode], JsonSchemaValue], JsonSchemaValue]:
2786
+ """Utility function to generate a JSON Schema for multiple models.
2787
+
2788
+ Args:
2789
+ models: A sequence of tuples of the form (model, mode).
2790
+ by_alias: Whether to use field aliases as keys in the generated JSON Schema. If `None` (the default),
2791
+ aliases are used unless disabled by the configuration (i.e. `validate_by_alias=False` for validation
2792
+ schemas). An explicit value takes precedence over the configuration.
2793
+ title: The title of the generated JSON Schema.
2794
+ description: The description of the generated JSON Schema.
2795
+ ref_template: The reference template to use for generating JSON Schema references.
2796
+ union_format: The format to use when combining schemas from unions together. Can be one of:
2797
+
2798
+ - `'any_of'`: Use the [`anyOf`](https://json-schema.org/understanding-json-schema/reference/combining#anyOf)
2799
+ keyword to combine schemas (the default).
2800
+ - `'primitive_type_array'`: Use the [`type`](https://json-schema.org/understanding-json-schema/reference/type)
2801
+ keyword as an array of strings, containing each type of the combination. If any of the schemas is not a primitive
2802
+ type (`string`, `boolean`, `null`, `integer` or `number`) or contains constraints/metadata, falls back to
2803
+ `any_of`.
2804
+ schema_generator: The schema generator to use for generating the JSON Schema.
2805
+
2806
+ Returns:
2807
+ A tuple where:
2808
+ - The first element is a dictionary whose keys are tuples of JSON schema key type and JSON mode, and
2809
+ whose values are the JSON schema corresponding to that pair of inputs. (These schemas may have
2810
+ JsonRef references to definitions that are defined in the second returned element.)
2811
+ - The second element is a JSON schema containing all definitions referenced in the first returned
2812
+ element, along with the optional title and description keys.
2813
+ """
2814
+ for cls, _ in models:
2815
+ if isinstance(cls.__pydantic_core_schema__, _mock_val_ser.MockCoreSchema):
2816
+ cls.__pydantic_core_schema__.rebuild()
2817
+
2818
+ instance = schema_generator(by_alias=by_alias, ref_template=ref_template, union_format=union_format)
2819
+ inputs: list[tuple[type[BaseModel] | type[PydanticDataclass], JsonSchemaMode, CoreSchema]] = [
2820
+ (m, mode, m.__pydantic_core_schema__) for m, mode in models
2821
+ ]
2822
+ json_schemas_map, definitions = instance.generate_definitions(inputs)
2823
+
2824
+ json_schema: dict[str, Any] = {}
2825
+ if definitions:
2826
+ json_schema['$defs'] = definitions
2827
+ if title:
2828
+ json_schema['title'] = title
2829
+ if description:
2830
+ json_schema['description'] = description
2831
+
2832
+ return json_schemas_map, json_schema
2833
+
2834
+
2835
+ # ##### End JSON Schema Generation Functions #####
2836
+
2837
+
2838
+ # Decimal JSON Schema pattern utilities.
2839
+ # Note: while we could use `\d` to represent digits (`Decimal` objects allow Unicode decimal digits), we use [0-9] instead:
2840
+ # - to reduce complexity (`\d` expands to a large set, and with `max_digits`/`decimal_places` constraints set, it can blow
2841
+ # the compile limit on some engines).
2842
+ # - [0-9] is a portable pattern (e.g. `\d` is equivalent to `[0-9]` in ECMA (https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Regular_expressions/Character_class_escape#d)
2843
+ # while it allows any Unicode decimal digit in Python.
2844
+
2845
+
2846
+ def _repeat(atom: str, min_count: int, max_count: int) -> str:
2847
+ """Build a regex repetition of `atom` between `min_count` and `max_count` times (inclusive), using the shortest quantifier."""
2848
+ if min_count > max_count or max_count == 0:
2849
+ return ''
2850
+ if min_count == max_count:
2851
+ return atom if min_count == 1 else f'{atom}{{{min_count}}}'
2852
+ if (min_count, max_count) == (0, 1):
2853
+ return f'{atom}?'
2854
+ return f'{atom}{{{min_count},{max_count}}}'
2855
+
2856
+
2857
+ def _int_range_pattern(max_value: int) -> str:
2858
+ """Build a regex matching the integers between 1 and `max_value` (inclusive), without leading zeros."""
2859
+ digits = str(max_value)
2860
+ length = len(digits)
2861
+ alts: list[str] = [f'[1-9]{_repeat("[0-9]", k - 1, k - 1)}' for k in range(1, length)]
2862
+ for i, char in enumerate(digits):
2863
+ d = int(char)
2864
+ low = 1 if i == 0 else 0
2865
+ high = d if i == length - 1 else d - 1
2866
+ if high >= low:
2867
+ char_class = str(low) if low == high else f'[{low}-{high}]'
2868
+ alts.append(f'{digits[:i]}{char_class}{_repeat("[0-9]", length - i - 1, length - i - 1)}')
2869
+ return alts[0] if len(alts) == 1 else f'(?:{"|".join(alts)})'
2870
+
2871
+
2872
+ def _decimal_validation_pattern(max_digits: int | None, decimal_places: int | None, allow_inf_nan: bool) -> str:
2873
+ """Build the decimal pattern for the `'validation'` mode."""
2874
+
2875
+ number = r'(?:[0-9]+\.?[0-9]*|\.[0-9]+)' # e.g. 1, 1., .5
2876
+ exponent = r'[eE][+-]?[0-9]+' # e.g. e5, E5, e-7
2877
+ # e.g. Infinity, inf, NaN, sNaN, NaN123 (case-insensitive). Spelled out explicitly, as inline flags
2878
+ # aren't supported by all regular expression engines:
2879
+ non_finite = r'|[iI][nN][fF](?:[iI][nN][iI][tT][yY])?|[sS]?[nN][aA][nN][0-9]*' if allow_inf_nan else ''
2880
+ if max_digits is None and decimal_places is None:
2881
+ return rf'^[+-]?(?:{number}(?:{exponent})?{non_finite})$'
2882
+
2883
+ alts: list[str] = []
2884
+ if max_digits is not None and decimal_places is not None:
2885
+ # If `decimal_places > max_digits`, no whole digits are allowed and `max_digits` bounds the decimal places:
2886
+ whole = max(0, max_digits - decimal_places)
2887
+ places = min(max_digits, decimal_places)
2888
+ int_part = f'0*{_repeat("[0-9]", 1, whole)}' if whole else '0+'
2889
+ opt_int_part = f'0*{_repeat("[0-9]", 0, whole)}'
2890
+ opt_frac_part = rf'\.{_repeat("[0-9]", 0, places)}0*'
2891
+ frac_part = rf'\.{_repeat("[0-9]", 1, places)}0*' if places else r'\.0+'
2892
+ alts += [f'{int_part}(?:{opt_frac_part})?', f'{opt_int_part}{frac_part}']
2893
+ elif max_digits is not None:
2894
+ # The whole part and decimal part must have at most `max_digits` digits in total,
2895
+ # so we enumerate the possible widths of the whole part:
2896
+ int_part = f'0*{_repeat("[0-9]", 1, max_digits)}' if max_digits else '0+'
2897
+ alts.append(rf'{int_part}(?:\.0*)?')
2898
+ alts += [
2899
+ rf'0*{_repeat("[0-9]", whole, whole)}\.{_repeat("[0-9]", 1, max_digits - whole)}0*'
2900
+ for whole in range(max_digits)
2901
+ ] or [r'0*\.0+']
2902
+ else:
2903
+ assert decimal_places is not None
2904
+ opt_frac_part = rf'\.{_repeat("[0-9]", 0, decimal_places)}0*'
2905
+ frac_part = rf'\.{_repeat("[0-9]", 1, decimal_places)}0*' if decimal_places else r'\.0+'
2906
+ alts += [f'[0-9]+(?:{opt_frac_part})?', f'[0-9]*{frac_part}']
2907
+
2908
+ alts.append(f'{number}{exponent}')
2909
+ return rf'^[+-]?(?:{"|".join(alts)}{non_finite})$'
2910
+
2911
+
2912
+ def _decimal_serialization_pattern(max_digits: int | None, decimal_places: int | None, allow_inf_nan: bool) -> str:
2913
+ """Build the decimal pattern for the `'serialization'` mode.
2914
+
2915
+ Decimals are serialized using `str()`, producing either:
2916
+
2917
+ - The plain notation (`'123.45'`), when the exponent is lower than or equal to 0 and the adjusted
2918
+ exponent is greater than or equal to -6.
2919
+ - The scientific notation otherwise (`'1E+3'`, `'1.5E-7'`, `'0E-10'`), with a single digit before
2920
+ the optional decimal point and an always signed exponent.
2921
+
2922
+ Trailing zeros of the decimal part are preserved by `str()`, but aren't counted by the validation logic.
2923
+ """
2924
+
2925
+ def frac_part(places: int) -> str:
2926
+ return rf'\.{_repeat("[0-9]", 1, places)}0*' if places else r'\.0+'
2927
+
2928
+ alts: list[str] = []
2929
+
2930
+ # Plain notation:
2931
+ if max_digits is not None and decimal_places is not None:
2932
+ whole = max(0, max_digits - decimal_places)
2933
+ places = min(max_digits, decimal_places)
2934
+ int_part = f'(?:0|[1-9]{_repeat("[0-9]", 0, whole - 1)})' if whole else '0'
2935
+ alts.append(f'{int_part}(?:{frac_part(places)})?')
2936
+ elif max_digits is not None:
2937
+ # The whole part and decimal part must have at most `max_digits` digits in total,
2938
+ # so we enumerate the possible widths of the whole part:
2939
+ alts.append(rf'0(?:\.{_repeat("[0-9]", 1, max_digits)}0*)?')
2940
+ alts += [
2941
+ f'[1-9]{_repeat("[0-9]", whole - 1, whole - 1)}(?:{frac_part(max_digits - whole)})?'
2942
+ for whole in range(1, max_digits + 1)
2943
+ ]
2944
+ elif decimal_places is not None:
2945
+ alts.append(f'(?:0|[1-9][0-9]*)(?:{frac_part(decimal_places)})?')
2946
+ else:
2947
+ alts.append(r'(?:0|[1-9][0-9]*)(?:\.[0-9]+)?')
2948
+
2949
+ # Zero with an exponent (e.g. `'0E-10'`), which normalizes to zero and thus satisfies any constraint:
2950
+ alts.append(r'0E[+-][1-9][0-9]*')
2951
+
2952
+ # Scientific notation with a positive exponent `k` (e.g. `'1.5E+3'`): the value has `k + 1` whole digits
2953
+ # and no decimal places:
2954
+ if max_digits is None:
2955
+ alts.append(r'[1-9](?:\.[0-9]+)?E\+[1-9][0-9]*')
2956
+ else:
2957
+ max_exponent = max_digits - (decimal_places or 0) - 1
2958
+ if max_exponent >= 1:
2959
+ alts.append(rf'[1-9](?:\.[0-9]+)?E\+{_int_range_pattern(max_exponent)}')
2960
+
2961
+ # Scientific notation with a negative exponent `k` (`k >= 7`, e.g. `'1.5E-7'`): the value has no whole digits,
2962
+ # and `k` + (the number of significant decimal digits of the coefficient) decimal places:
2963
+ if max_digits is None and decimal_places is None:
2964
+ alts.append(r'[1-9](?:\.[0-9]+)?E-[1-9][0-9]*')
2965
+ else:
2966
+ max_places = min(c for c in (max_digits, decimal_places) if c is not None)
2967
+ alts += [f'[1-9](?:{frac_part(max_places - k)})?E-{k}' for k in range(7, max_places + 1)]
2968
+
2969
+ if allow_inf_nan:
2970
+ # `str()` produces `'Infinity'`, `'NaN'` and `'sNaN'` (with an optional payload):
2971
+ alts += ['Infinity', 's?NaN[0-9]*']
2972
+
2973
+ return rf'^-?(?:{"|".join(alts)})$'
2974
+
2975
+
2976
+ def _deduplicate_schemas(schemas: Iterable[JsonDict]) -> list[JsonDict]:
2977
+ return list({_make_json_hashable(schema): schema for schema in schemas}.values())
2978
+
2979
+
2980
+ _HashableJsonValue: TypeAlias = (
2981
+ int | float | str | bool | None | tuple['_HashableJsonValue', ...] | tuple[tuple[str, '_HashableJsonValue'], ...]
2982
+ )
2983
+
2984
+
2985
+ def _make_json_hashable(value: JsonValue) -> _HashableJsonValue:
2986
+ if isinstance(value, dict):
2987
+ return tuple(sorted((k, _make_json_hashable(v)) for k, v in value.items()))
2988
+ elif isinstance(value, list):
2989
+ return tuple(_make_json_hashable(v) for v in value)
2990
+ else:
2991
+ return value
2992
+
2993
+
2994
+ @dataclasses.dataclass(slots=True)
2995
+ class WithJsonSchema:
2996
+ """!!! abstract "Usage Documentation"
2997
+ [`WithJsonSchema` Annotation](../concepts/json_schema.md#withjsonschema-annotation)
2998
+
2999
+ An annotation used to override the JSON Schema for a type.
3000
+
3001
+ This is useful when you want to set a JSON Schema for a type that don't produce any JSON Schemas by default
3002
+ (e.g. [`Callable`][collections.abc.Callable]).
3003
+
3004
+ If `mode` is set this will only apply to that schema generation mode, allowing you to set different JSON Schemas for validation and serialization.
3005
+
3006
+ !!! note
3007
+ If the `WithJsonSchema` annotation is coupled with the [`Field()`][pydantic.Field] function, the behavior overriding will vary depending on the location:
3008
+
3009
+ * If the [`Annotated`][typing.Annotated] metadata is specified at the "top-level" field, `Field()` metadata arguments
3010
+ (excluding [constraints](../concepts/fields.md#field-constraints)) such as `title` and `description` will be applied on
3011
+ top of the `WithJsonSchema`, no matter the order:
3012
+
3013
+ ```python
3014
+ from typing import Annotated
3015
+
3016
+ from pydantic import BaseModel, Field, WithJsonSchema
3017
+
3018
+ class Model(BaseModel):
3019
+ field: Annotated[
3020
+ int,
3021
+ Field(title='My Field'),
3022
+ WithJsonSchema({'type': 'integer', 'extra': 'data'}),
3023
+ ]
3024
+
3025
+ Model.model_json_schema()['properties']['field']
3026
+ #> {'type': 'integer', 'extra': 'data', 'title': 'My Field'}
3027
+ ```
3028
+
3029
+ * If the [`Annotated`][typing.Annotated] metadata is specified on a specific inner type, `WithJsonSchema` will unconditionally
3030
+ override the JSON Schema:
3031
+
3032
+ ```python
3033
+ from typing import Annotated
3034
+
3035
+ from pydantic import BaseModel, Field, WithJsonSchema
3036
+
3037
+ class Model(BaseModel):
3038
+ field: list[
3039
+ Annotated[
3040
+ int,
3041
+ Field(title='My Field'),
3042
+ WithJsonSchema({'type': 'integer', 'extra': 'data'}),
3043
+ ]
3044
+ ]
3045
+
3046
+ Model.model_json_schema()['properties']['field']
3047
+ #> {'items': {'extra': 'data', 'type': 'integer'}, 'title': 'Field', 'type': 'array'}
3048
+ ```
3049
+
3050
+ See also the documentation about [the annotated pattern](../concepts/fields.md#the-annotated-pattern).
3051
+ """
3052
+
3053
+ json_schema: JsonSchemaValue | None
3054
+ mode: Literal['validation', 'serialization'] | None = None
3055
+
3056
+ def __get_pydantic_json_schema__(
3057
+ self, core_schema: core_schema.CoreSchema, handler: GetJsonSchemaHandler
3058
+ ) -> JsonSchemaValue:
3059
+ if self.mode is not None and self.mode != handler.mode:
3060
+ return handler(core_schema)
3061
+ if self.json_schema is None:
3062
+ # This exception is handled in pydantic.json_schema.GenerateJsonSchema._named_required_fields_schema
3063
+ raise PydanticOmit
3064
+ else:
3065
+ return self.json_schema.copy()
3066
+
3067
+ def __hash__(self) -> int:
3068
+ return hash(self.mode)
3069
+
3070
+
3071
+ class Examples:
3072
+ """Add examples to a JSON schema.
3073
+
3074
+ If the JSON Schema already contains examples, the provided examples
3075
+ will be appended.
3076
+
3077
+ If `mode` is set this will only apply to that schema generation mode,
3078
+ allowing you to add different examples for validation and serialization.
3079
+ """
3080
+
3081
+ @overload
3082
+ @deprecated('Using a dict for `examples` is deprecated since v2.9 and will be removed in v3.0. Use a list instead.')
3083
+ def __init__(
3084
+ self, examples: dict[str, Any], mode: Literal['validation', 'serialization'] | None = None
3085
+ ) -> None: ...
3086
+
3087
+ @overload
3088
+ def __init__(self, examples: list[Any], mode: Literal['validation', 'serialization'] | None = None) -> None: ...
3089
+
3090
+ def __init__(
3091
+ self, examples: dict[str, Any] | list[Any], mode: Literal['validation', 'serialization'] | None = None
3092
+ ) -> None:
3093
+ if isinstance(examples, dict):
3094
+ warnings.warn(
3095
+ 'Using a dict for `examples` is deprecated, use a list instead.',
3096
+ PydanticDeprecatedSince29,
3097
+ stacklevel=2,
3098
+ )
3099
+ self.examples = examples
3100
+ self.mode = mode
3101
+
3102
+ def __get_pydantic_json_schema__(
3103
+ self, core_schema: core_schema.CoreSchema, handler: GetJsonSchemaHandler
3104
+ ) -> JsonSchemaValue:
3105
+ mode = self.mode or handler.mode
3106
+ json_schema = handler(core_schema)
3107
+ if mode != handler.mode:
3108
+ return json_schema
3109
+ examples = json_schema.get('examples')
3110
+ if examples is None:
3111
+ json_schema['examples'] = to_jsonable_python(self.examples)
3112
+ if isinstance(examples, dict):
3113
+ if isinstance(self.examples, list):
3114
+ warnings.warn(
3115
+ 'Updating existing JSON Schema examples of type dict with examples of type list. '
3116
+ 'Only the existing examples values will be retained. Note that dict support for '
3117
+ 'examples is deprecated and will be removed in v3.0.',
3118
+ UserWarning,
3119
+ )
3120
+ json_schema['examples'] = to_jsonable_python(
3121
+ [ex for value in examples.values() for ex in value] + self.examples
3122
+ )
3123
+ else:
3124
+ json_schema['examples'] = to_jsonable_python({**examples, **self.examples})
3125
+ if isinstance(examples, list):
3126
+ if isinstance(self.examples, list):
3127
+ json_schema['examples'] = to_jsonable_python(examples + self.examples)
3128
+ elif isinstance(self.examples, dict):
3129
+ warnings.warn(
3130
+ 'Updating existing JSON Schema examples of type list with examples of type dict. '
3131
+ 'Only the examples values will be retained. Note that dict support for '
3132
+ 'examples is deprecated and will be removed in v3.0.',
3133
+ UserWarning,
3134
+ )
3135
+ json_schema['examples'] = to_jsonable_python(
3136
+ examples + [ex for value in self.examples.values() for ex in value]
3137
+ )
3138
+
3139
+ return json_schema
3140
+
3141
+ def __hash__(self) -> int:
3142
+ return hash(self.mode)
3143
+
3144
+
3145
+ def _get_all_json_refs(item: Any) -> set[JsonRef]:
3146
+ """Get all the definitions references from a JSON schema."""
3147
+ refs: set[JsonRef] = set()
3148
+ stack = [item]
3149
+
3150
+ while stack:
3151
+ current = stack.pop()
3152
+ if isinstance(current, dict):
3153
+ for key, value in current.items():
3154
+ if key == 'examples' and isinstance(value, list):
3155
+ # Skip examples that may contain arbitrary values and references
3156
+ # (e.g. `{"examples": [{"$ref": "..."}]}`). Note: checking for value
3157
+ # of type list is necessary to avoid skipping valid portions of the schema,
3158
+ # for instance when "examples" is used as a property key. A more robust solution
3159
+ # could be found, but would require more advanced JSON Schema parsing logic.
3160
+ continue
3161
+ if key == '$ref' and isinstance(value, str):
3162
+ refs.add(JsonRef(value))
3163
+ elif isinstance(value, dict):
3164
+ stack.append(value)
3165
+ elif isinstance(value, list):
3166
+ stack.extend(value)
3167
+ elif isinstance(current, list):
3168
+ stack.extend(current)
3169
+
3170
+ return refs
3171
+
3172
+
3173
+ AnyType = TypeVar('AnyType')
3174
+
3175
+ if TYPE_CHECKING:
3176
+ SkipJsonSchema = Annotated[AnyType, ...]
3177
+ else:
3178
+
3179
+ @dataclasses.dataclass(slots=True)
3180
+ class SkipJsonSchema:
3181
+ """!!! abstract "Usage Documentation"
3182
+ [`SkipJsonSchema` Annotation](../concepts/json_schema.md#skipjsonschema-annotation)
3183
+
3184
+ Add this as an annotation on a field to skip generating a JSON schema for that field.
3185
+
3186
+ Example:
3187
+ ```python
3188
+ from pprint import pprint
3189
+
3190
+ from pydantic import BaseModel
3191
+ from pydantic.json_schema import SkipJsonSchema
3192
+
3193
+ class Model(BaseModel):
3194
+ a: int | None = None # (1)!
3195
+ b: int | SkipJsonSchema[None] = None # (2)!
3196
+ c: SkipJsonSchema[int | None] = None # (3)!
3197
+
3198
+ pprint(Model.model_json_schema())
3199
+ '''
3200
+ {
3201
+ 'properties': {
3202
+ 'a': {
3203
+ 'anyOf': [
3204
+ {'type': 'integer'},
3205
+ {'type': 'null'}
3206
+ ],
3207
+ 'default': None,
3208
+ 'title': 'A'
3209
+ },
3210
+ 'b': {
3211
+ 'default': None,
3212
+ 'title': 'B',
3213
+ 'type': 'integer'
3214
+ }
3215
+ },
3216
+ 'title': 'Model',
3217
+ 'type': 'object'
3218
+ }
3219
+ '''
3220
+ ```
3221
+
3222
+ 1. The integer and null types are both included in the schema for `a`.
3223
+ 2. The integer type is the only type included in the schema for `b`.
3224
+ 3. The entirety of the `c` field is omitted from the schema.
3225
+ """
3226
+
3227
+ def __class_getitem__(cls, item: AnyType) -> AnyType:
3228
+ return Annotated[item, cls()]
3229
+
3230
+ def __get_pydantic_json_schema__(
3231
+ self, core_schema: CoreSchema, handler: GetJsonSchemaHandler
3232
+ ) -> JsonSchemaValue:
3233
+ raise PydanticOmit
3234
+
3235
+ def __hash__(self) -> int:
3236
+ return hash(type(self))
3237
+
3238
+
3239
+ def _get_typed_dict_config(cls: type[Any] | None) -> ConfigDict | None:
3240
+ # If typed dictionary doesn't have config, the parent's config is used (as during core schema generation),
3241
+ # hence a default of `None`:
3242
+ if cls is not None:
3243
+ try:
3244
+ return _decorators.get_attribute_from_bases(cls, '__pydantic_config__')
3245
+ except AttributeError:
3246
+ pass
3247
+ return None
3248
+
3249
+
3250
+ def _get_ser_schema_for_default_value(schema: CoreSchema) -> core_schema.PlainSerializerFunctionSerSchema | None:
3251
+ """Get a `'function-plain'` serialization schema that can be used to serialize a default value.
3252
+
3253
+ This takes into account having the serialization schema nested under validation schema(s).
3254
+ """
3255
+ if (
3256
+ (ser_schema := schema.get('serialization'))
3257
+ and ser_schema['type'] == 'function-plain'
3258
+ and not ser_schema.get('info_arg')
3259
+ ):
3260
+ return cast('core_schema.PlainSerializerFunctionSerSchema', ser_schema)
3261
+ if _core_utils.is_function_with_inner_schema(schema):
3262
+ return _get_ser_schema_for_default_value(schema['schema'])
3263
+
3264
+
3265
+ def _is_nullable_schema(schema: CoreSchemaOrField) -> bool:
3266
+ """Whether the schema is a `'nullable'` schema, possibly wrapped in default, validator function, chain,
3267
+ lax-or-strict and JSON-or-Python schemas.
3268
+
3269
+ For the latter three, the same inner schema as the one used to generate the serialization JSON Schema
3270
+ is checked (see the corresponding `GenerateJsonSchema` methods).
3271
+ """
3272
+ if schema['type'] == 'default' or _core_utils.is_function_with_inner_schema(schema):
3273
+ return _is_nullable_schema(schema['schema'])
3274
+ if schema['type'] == 'chain':
3275
+ return _is_nullable_schema(schema['steps'][-1])
3276
+ if schema['type'] == 'lax-or-strict':
3277
+ # See TODO in `GenerateJsonSchema.lax_or_strict_schema()`:
3278
+ return _is_nullable_schema(schema['strict_schema'] if schema.get('strict', False) else schema['lax_schema'])
3279
+ if schema['type'] == 'json-or-python':
3280
+ return _is_nullable_schema(schema['json_schema'])
3281
+ return schema['type'] == 'nullable'