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

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.1.dist-info/INSTALLER +1 -0
  1706. package/python-runtime/python/lib/python3.12/site-packages/steerable_agent_harness-0.9.1.dist-info/METADATA +13 -0
  1707. package/python-runtime/python/lib/python3.12/site-packages/steerable_agent_harness-0.9.1.dist-info/RECORD +23 -0
  1708. package/python-runtime/python/lib/python3.12/site-packages/steerable_agent_harness-0.9.1.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.1.dist-info/INSTALLER +1 -0
  1712. package/python-runtime/python/lib/python3.12/site-packages/steerable_agent_protocol-0.9.1.dist-info/METADATA +12 -0
  1713. package/python-runtime/python/lib/python3.12/site-packages/steerable_agent_protocol-0.9.1.dist-info/RECORD +11 -0
  1714. package/python-runtime/python/lib/python3.12/site-packages/steerable_agent_protocol-0.9.1.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.1.dist-info/INSTALLER +1 -0
  1787. package/python-runtime/python/lib/python3.12/site-packages/steerable_agent_runtime-0.9.1.dist-info/METADATA +72 -0
  1788. package/python-runtime/python/lib/python3.12/site-packages/steerable_agent_runtime-0.9.1.dist-info/RECORD +147 -0
  1789. package/python-runtime/python/lib/python3.12/site-packages/steerable_agent_runtime-0.9.1.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.1.dist-info/INSTALLER +1 -0
  1832. package/python-runtime/python/lib/python3.12/site-packages/steerable_sidecar-0.9.1.dist-info/METADATA +58 -0
  1833. package/python-runtime/python/lib/python3.12/site-packages/steerable_sidecar-0.9.1.dist-info/RECORD +79 -0
  1834. package/python-runtime/python/lib/python3.12/site-packages/steerable_sidecar-0.9.1.dist-info/WHEEL +5 -0
  1835. package/python-runtime/python/lib/python3.12/site-packages/steerable_sidecar-0.9.1.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,3825 @@
1
+ from __future__ import annotations
2
+
3
+ import collections.abc as cabc
4
+ import enum
5
+ import errno
6
+ import inspect
7
+ import os
8
+ import sys
9
+ import typing as t
10
+ from abc import ABC
11
+ from abc import abstractmethod
12
+ from collections import abc
13
+ from collections import Counter
14
+ from contextlib import AbstractContextManager
15
+ from contextlib import contextmanager
16
+ from contextlib import ExitStack
17
+ from functools import update_wrapper
18
+ from gettext import gettext as _
19
+ from gettext import ngettext
20
+ from itertools import repeat
21
+ from types import TracebackType
22
+
23
+ from . import types
24
+ from ._utils import FLAG_NEEDS_VALUE
25
+ from ._utils import UNSET
26
+ from .exceptions import Abort
27
+ from .exceptions import BadParameter
28
+ from .exceptions import ClickException
29
+ from .exceptions import Exit
30
+ from .exceptions import MissingParameter
31
+ from .exceptions import NoArgsIsHelpError
32
+ from .exceptions import NoSuchCommand
33
+ from .exceptions import UsageError
34
+ from .formatting import HelpFormatter
35
+ from .formatting import join_options
36
+ from .globals import pop_context
37
+ from .globals import push_context
38
+ from .parser import _OptionParser
39
+ from .parser import _split_opt
40
+ from .termui import confirm
41
+ from .termui import prompt
42
+ from .termui import style
43
+ from .utils import _detect_program_name
44
+ from .utils import _expand_args
45
+ from .utils import _make_default_short_help
46
+ from .utils import _PacifyFlushWrapper
47
+ from .utils import echo
48
+ from .utils import make_str
49
+
50
+ if t.TYPE_CHECKING:
51
+ from typing_extensions import Self
52
+
53
+ from .shell_completion import CompletionItem
54
+
55
+ F = t.TypeVar("F", bound="t.Callable[..., t.Any]")
56
+ V = t.TypeVar("V")
57
+
58
+ # Reserved storage name of the automatic help option. No user parameter is
59
+ # expected to claim it.
60
+ _HELP_OPTION_STORAGE_NAME = "_click_default_help"
61
+
62
+
63
+ def _complete_visible_commands(
64
+ ctx: Context, incomplete: str
65
+ ) -> cabc.Iterator[tuple[str, Command]]:
66
+ """List all the subcommands of a group that start with the
67
+ incomplete value and aren't hidden.
68
+
69
+ :param ctx: Invocation context for the group.
70
+ :param incomplete: Value being completed. May be empty.
71
+ """
72
+ multi = t.cast(Group, ctx.command)
73
+
74
+ for name in multi.list_commands(ctx):
75
+ if name.startswith(incomplete):
76
+ command = multi.get_command(ctx, name)
77
+
78
+ if command is not None and not command.hidden:
79
+ yield name, command
80
+
81
+
82
+ def _check_nested_chain(
83
+ base_command: Group, cmd_name: str, cmd: Command, register: bool = False
84
+ ) -> None:
85
+ if not base_command.chain or not isinstance(cmd, Group):
86
+ return
87
+
88
+ if register:
89
+ message = (
90
+ f"It is not possible to add the group {cmd_name!r} to another"
91
+ f" group {base_command.name!r} that is in chain mode."
92
+ )
93
+ else:
94
+ message = (
95
+ f"Found the group {cmd_name!r} as subcommand to another group "
96
+ f" {base_command.name!r} that is in chain mode. This is not supported."
97
+ )
98
+
99
+ raise RuntimeError(message)
100
+
101
+
102
+ def _echo_aborted() -> None:
103
+ """Write the final abort message to standard error."""
104
+ echo(_("Aborted!"), file=sys.stderr)
105
+
106
+
107
+ def _format_deprecated_label(deprecated: bool | str) -> str:
108
+ """Return the parenthesized deprecation label shown in help text."""
109
+ label = _("deprecated").upper()
110
+ if isinstance(deprecated, str):
111
+ return f"({label}: {deprecated})"
112
+ return f"({label})"
113
+
114
+
115
+ def _format_deprecated_suffix(deprecated: bool | str) -> str:
116
+ """Return the trailing reason for a ``DeprecationWarning`` message,
117
+ prefixed with a space, or an empty string when no reason was given.
118
+ """
119
+ if isinstance(deprecated, str):
120
+ return f" {deprecated}"
121
+ return ""
122
+
123
+
124
+ def batch(iterable: cabc.Iterable[V], batch_size: int) -> list[tuple[V, ...]]:
125
+ return list(zip(*repeat(iter(iterable), batch_size), strict=False))
126
+
127
+
128
+ @contextmanager
129
+ def augment_usage_errors(
130
+ ctx: Context, param: Parameter | None = None
131
+ ) -> cabc.Generator[None]:
132
+ """Context manager that attaches extra information to exceptions."""
133
+ try:
134
+ yield
135
+ except BadParameter as e:
136
+ if e.ctx is None:
137
+ e.ctx = ctx
138
+ if param is not None and e.param is None:
139
+ e.param = param
140
+ raise
141
+ except UsageError as e:
142
+ if e.ctx is None:
143
+ e.ctx = ctx
144
+ raise
145
+
146
+
147
+ def iter_params_for_processing(
148
+ invocation_order: cabc.Sequence[Parameter],
149
+ declaration_order: cabc.Sequence[Parameter],
150
+ ) -> list[Parameter]:
151
+ """Returns all declared parameters in the order they should be processed.
152
+
153
+ The declared parameters are re-shuffled depending on the order in which
154
+ they were invoked, as well as the eagerness of each parameters.
155
+
156
+ The invocation order takes precedence over the declaration order. I.e. the
157
+ order in which the user provided them to the CLI is respected.
158
+
159
+ This behavior and its effect on callback evaluation is detailed at:
160
+ https://click.palletsprojects.com/en/stable/advanced/#callback-evaluation-order
161
+ """
162
+
163
+ def sort_key(item: Parameter) -> tuple[bool, float]:
164
+ try:
165
+ idx: float = invocation_order.index(item)
166
+ except ValueError:
167
+ idx = float("inf")
168
+
169
+ return not item.is_eager, idx
170
+
171
+ return sorted(declaration_order, key=sort_key)
172
+
173
+
174
+ class ParameterSource(enum.IntEnum):
175
+ """This is an :class:`~enum.IntEnum` that indicates the source of a
176
+ parameter's value.
177
+
178
+ Use :meth:`click.Context.get_parameter_source` to get the
179
+ source for a parameter by name.
180
+
181
+ Members are ordered from most explicit to least explicit source.
182
+ This allows comparison to check if a value was explicitly provided:
183
+
184
+ .. code-block:: python
185
+
186
+ source = ctx.get_parameter_source("port")
187
+ if source < click.ParameterSource.DEFAULT_MAP:
188
+ ... # value was explicitly set
189
+
190
+ .. versionchanged:: 8.3.3
191
+ Use :class:`~enum.IntEnum` and reorder members from most to
192
+ least explicit. Supports comparison operators.
193
+
194
+ .. versionchanged:: 8.0
195
+ Use :class:`~enum.Enum` and drop the ``validate`` method.
196
+
197
+ .. versionchanged:: 8.0
198
+ Added the ``PROMPT`` value.
199
+ """
200
+
201
+ PROMPT = enum.auto()
202
+ """Used a prompt to confirm a default or provide a value."""
203
+ COMMANDLINE = enum.auto()
204
+ """The value was provided by the command line args."""
205
+ ENVIRONMENT = enum.auto()
206
+ """The value was provided with an environment variable."""
207
+ DEFAULT_MAP = enum.auto()
208
+ """Used a default provided by :attr:`Context.default_map`."""
209
+ DEFAULT = enum.auto()
210
+ """Used the default specified by the parameter."""
211
+
212
+
213
+ class Context:
214
+ """The context is a special internal object that holds state relevant
215
+ for the script execution at every single level. It's normally invisible
216
+ to commands unless they opt-in to getting access to it.
217
+
218
+ The context is useful as it can pass internal objects around and can
219
+ control special execution features such as reading data from
220
+ environment variables.
221
+
222
+ A context can be used as context manager in which case it will call
223
+ :meth:`close` on teardown.
224
+
225
+ :param command: the command class for this context.
226
+ :param parent: the parent context.
227
+ :param info_name: the info name for this invocation. Generally this
228
+ is the most descriptive name for the script or
229
+ command. For the toplevel script it is usually
230
+ the name of the script, for commands below that it's
231
+ the name of the script.
232
+ :param obj: an arbitrary object of user data.
233
+ :param auto_envvar_prefix: the prefix to use for automatic environment
234
+ variables. If this is `None` then reading
235
+ from environment variables is disabled. This
236
+ does not affect manually set environment
237
+ variables which are always read.
238
+ :param default_map: a dictionary (like object) with default values
239
+ for parameters.
240
+ :param terminal_width: the width of the terminal. The default is
241
+ inherit from parent context. If no context
242
+ defines the terminal width then auto
243
+ detection will be applied.
244
+ :param max_content_width: the maximum width for content rendered by
245
+ Click (this currently only affects help
246
+ pages). This defaults to 80 characters if
247
+ not overridden. In other words: even if the
248
+ terminal is larger than that, Click will not
249
+ format things wider than 80 characters by
250
+ default. In addition to that, formatters might
251
+ add some safety mapping on the right.
252
+ :param resilient_parsing: if this flag is enabled then Click will
253
+ parse without any interactivity or callback
254
+ invocation. Default values will also be
255
+ ignored. This is useful for implementing
256
+ things such as completion support.
257
+ :param allow_extra_args: if this is set to `True` then extra arguments
258
+ at the end will not raise an error and will be
259
+ kept on the context. The default is to inherit
260
+ from the command.
261
+ :param allow_interspersed_args: if this is set to `False` then options
262
+ and arguments cannot be mixed. The
263
+ default is to inherit from the command.
264
+ :param ignore_unknown_options: instructs click to ignore options it does
265
+ not know and keeps them for later
266
+ processing.
267
+ :param help_option_names: optionally a list of strings that define how
268
+ the default help parameter is named. The
269
+ default is ``['--help']``.
270
+ :param token_normalize_func: an optional function that is used to
271
+ normalize tokens (options, choices,
272
+ etc.). This for instance can be used to
273
+ implement case insensitive behavior.
274
+ :param color: controls if the terminal supports ANSI colors or not. The
275
+ default is autodetection. This is only needed if ANSI
276
+ codes are used in texts that Click prints which is by
277
+ default not the case. This for instance would affect
278
+ help output.
279
+ :param show_default: Show the default value for commands. If this
280
+ value is not set, it defaults to the value from the parent
281
+ context. ``Command.show_default`` overrides this default for the
282
+ specific command.
283
+
284
+ .. versionchanged:: 8.2
285
+ The ``protected_args`` attribute is deprecated and will be removed in
286
+ Click 9.0. ``args`` will contain remaining unparsed tokens.
287
+
288
+ .. versionchanged:: 8.1
289
+ The ``show_default`` parameter is overridden by
290
+ ``Command.show_default``, instead of the other way around.
291
+
292
+ .. versionchanged:: 8.0
293
+ The ``show_default`` parameter defaults to the value from the
294
+ parent context.
295
+
296
+ .. versionchanged:: 7.1
297
+ Added the ``show_default`` parameter.
298
+
299
+ .. versionchanged:: 4.0
300
+ Added the ``color``, ``ignore_unknown_options``, and
301
+ ``max_content_width`` parameters.
302
+
303
+ .. versionchanged:: 3.0
304
+ Added the ``allow_extra_args`` and ``allow_interspersed_args``
305
+ parameters.
306
+
307
+ .. versionchanged:: 2.0
308
+ Added the ``resilient_parsing``, ``help_option_names``, and
309
+ ``token_normalize_func`` parameters.
310
+ """
311
+
312
+ #: The formatter class to create with :meth:`make_formatter`.
313
+ #:
314
+ #: .. versionadded:: 8.0
315
+ formatter_class: type[HelpFormatter] = HelpFormatter
316
+
317
+ parent: Context | None
318
+ command: Command
319
+ info_name: str | None
320
+ params: dict[str, t.Any]
321
+ args: list[str]
322
+ _protected_args: list[str]
323
+ _opt_prefixes: set[str]
324
+ obj: t.Any
325
+ _meta: dict[str, t.Any]
326
+ default_map: cabc.MutableMapping[str, t.Any] | None
327
+ invoked_subcommand: str | None
328
+ terminal_width: int | None
329
+ max_content_width: int | None
330
+ allow_extra_args: bool
331
+ allow_interspersed_args: bool
332
+ ignore_unknown_options: bool
333
+ help_option_names: list[str]
334
+ token_normalize_func: t.Callable[[str], str] | None
335
+ resilient_parsing: bool
336
+ auto_envvar_prefix: str | None
337
+ color: bool | None
338
+ show_default: bool | None
339
+ _close_callbacks: list[t.Callable[[], t.Any]]
340
+ _depth: int
341
+ _parameter_source: dict[str, ParameterSource]
342
+ _param_default_explicit: dict[str, bool]
343
+ _exit_stack: ExitStack
344
+
345
+ def __init__(
346
+ self,
347
+ command: Command,
348
+ parent: Context | None = None,
349
+ info_name: str | None = None,
350
+ obj: t.Any | None = None,
351
+ auto_envvar_prefix: str | None = None,
352
+ default_map: cabc.MutableMapping[str, t.Any] | None = None,
353
+ terminal_width: int | None = None,
354
+ max_content_width: int | None = None,
355
+ resilient_parsing: bool = False,
356
+ allow_extra_args: bool | None = None,
357
+ allow_interspersed_args: bool | None = None,
358
+ ignore_unknown_options: bool | None = None,
359
+ help_option_names: list[str] | None = None,
360
+ token_normalize_func: t.Callable[[str], str] | None = None,
361
+ color: bool | None = None,
362
+ show_default: bool | None = None,
363
+ ) -> None:
364
+ #: the parent context or `None` if none exists.
365
+ self.parent = parent
366
+ #: the :class:`Command` for this context.
367
+ self.command = command
368
+ #: the descriptive information name
369
+ self.info_name = info_name
370
+ #: Map of parameter names to their parsed values. Parameters
371
+ #: with ``expose_value=False`` are not stored.
372
+ self.params = {}
373
+ #: the leftover arguments.
374
+ self.args = []
375
+ #: protected arguments. These are arguments that are prepended
376
+ #: to `args` when certain parsing scenarios are encountered but
377
+ #: must be never propagated to another arguments. This is used
378
+ #: to implement nested parsing.
379
+ self._protected_args = []
380
+ #: the collected prefixes of the command's options.
381
+ self._opt_prefixes = set(parent._opt_prefixes) if parent else set()
382
+
383
+ if obj is None and parent is not None:
384
+ obj = parent.obj
385
+
386
+ #: the user object stored.
387
+ self.obj = obj
388
+ self._meta = getattr(parent, "meta", {})
389
+
390
+ #: A dictionary (-like object) with defaults for parameters.
391
+ if (
392
+ default_map is None
393
+ and info_name is not None
394
+ and parent is not None
395
+ and parent.default_map is not None
396
+ ):
397
+ default_map = parent.default_map.get(info_name)
398
+
399
+ self.default_map = default_map
400
+
401
+ #: This flag indicates if a subcommand is going to be executed. A
402
+ #: group callback can use this information to figure out if it's
403
+ #: being executed directly or because the execution flow passes
404
+ #: onwards to a subcommand. By default it's None, but it can be
405
+ #: the name of the subcommand to execute.
406
+ #:
407
+ #: If chaining is enabled this will be set to ``'*'`` in case
408
+ #: any commands are executed. It is however not possible to
409
+ #: figure out which ones. If you require this knowledge you
410
+ #: should use a :func:`result_callback`.
411
+ self.invoked_subcommand = None
412
+
413
+ if terminal_width is None and parent is not None:
414
+ terminal_width = parent.terminal_width
415
+
416
+ #: The width of the terminal (None is autodetection).
417
+ self.terminal_width = terminal_width
418
+
419
+ if max_content_width is None and parent is not None:
420
+ max_content_width = parent.max_content_width
421
+
422
+ #: The maximum width of formatted content (None implies a sensible
423
+ #: default which is 80 for most things).
424
+ self.max_content_width = max_content_width
425
+
426
+ if allow_extra_args is None:
427
+ allow_extra_args = command.allow_extra_args
428
+
429
+ #: Indicates if the context allows extra args or if it should
430
+ #: fail on parsing.
431
+ #:
432
+ #: .. versionadded:: 3.0
433
+ self.allow_extra_args = allow_extra_args
434
+
435
+ if allow_interspersed_args is None:
436
+ allow_interspersed_args = command.allow_interspersed_args
437
+
438
+ #: Indicates if the context allows mixing of arguments and
439
+ #: options or not.
440
+ #:
441
+ #: .. versionadded:: 3.0
442
+ self.allow_interspersed_args = allow_interspersed_args
443
+
444
+ if ignore_unknown_options is None:
445
+ ignore_unknown_options = command.ignore_unknown_options
446
+
447
+ #: Instructs click to ignore options that a command does not
448
+ #: understand and will store it on the context for later
449
+ #: processing. This is primarily useful for situations where you
450
+ #: want to call into external programs. Generally this pattern is
451
+ #: strongly discouraged because it's not possibly to losslessly
452
+ #: forward all arguments.
453
+ #:
454
+ #: .. versionadded:: 4.0
455
+ self.ignore_unknown_options = ignore_unknown_options
456
+
457
+ if help_option_names is None:
458
+ if parent is not None:
459
+ help_option_names = parent.help_option_names
460
+ else:
461
+ help_option_names = ["--help"]
462
+
463
+ #: The names for the help options.
464
+ self.help_option_names = help_option_names
465
+
466
+ if token_normalize_func is None and parent is not None:
467
+ token_normalize_func = parent.token_normalize_func
468
+
469
+ #: An optional normalization function for tokens. This is
470
+ #: options, choices, commands etc.
471
+ self.token_normalize_func = token_normalize_func
472
+
473
+ #: Indicates if resilient parsing is enabled. In that case Click
474
+ #: will do its best to not cause any failures and default values
475
+ #: will be ignored. Useful for completion.
476
+ self.resilient_parsing = resilient_parsing
477
+
478
+ # If there is no envvar prefix yet, but the parent has one and
479
+ # the command on this level has a name, we can expand the envvar
480
+ # prefix automatically.
481
+ if auto_envvar_prefix is None:
482
+ if (
483
+ parent is not None
484
+ and parent.auto_envvar_prefix is not None
485
+ and self.info_name is not None
486
+ ):
487
+ auto_envvar_prefix = (
488
+ f"{parent.auto_envvar_prefix}_{self.info_name.upper()}"
489
+ )
490
+ else:
491
+ auto_envvar_prefix = auto_envvar_prefix.upper()
492
+
493
+ if auto_envvar_prefix is not None:
494
+ auto_envvar_prefix = auto_envvar_prefix.replace("-", "_")
495
+
496
+ self.auto_envvar_prefix = auto_envvar_prefix
497
+
498
+ if color is None and parent is not None:
499
+ color = parent.color
500
+
501
+ #: Controls if styling output is wanted or not.
502
+ self.color = color
503
+
504
+ if show_default is None and parent is not None:
505
+ show_default = parent.show_default
506
+
507
+ #: Show option default values when formatting help text.
508
+ self.show_default = show_default
509
+
510
+ self._close_callbacks = []
511
+ self._depth = 0
512
+ self._parameter_source = {}
513
+ # Tracks whether the option that currently owns each parameter slot in
514
+ # :attr:`params` had its ``default`` set explicitly by the user. Used to
515
+ # tie-break feature-switch groups where multiple options share a parameter name
516
+ # and both fall back to their default value.
517
+ self._param_default_explicit = {}
518
+ self._exit_stack = ExitStack()
519
+
520
+ @property
521
+ def protected_args(self) -> list[str]:
522
+ import warnings
523
+
524
+ warnings.warn(
525
+ "'protected_args' is deprecated and will be removed in Click 9.0."
526
+ " 'args' will contain remaining unparsed tokens.",
527
+ DeprecationWarning,
528
+ stacklevel=2,
529
+ )
530
+ return self._protected_args
531
+
532
+ def to_info_dict(self) -> dict[str, t.Any]:
533
+ """Gather information that could be useful for a tool generating
534
+ user-facing documentation. This traverses the entire CLI
535
+ structure.
536
+
537
+ .. code-block:: python
538
+
539
+ with Context(cli) as ctx:
540
+ info = ctx.to_info_dict()
541
+
542
+ .. versionadded:: 8.0
543
+ """
544
+ return {
545
+ "command": self.command.to_info_dict(self),
546
+ "info_name": self.info_name,
547
+ "allow_extra_args": self.allow_extra_args,
548
+ "allow_interspersed_args": self.allow_interspersed_args,
549
+ "ignore_unknown_options": self.ignore_unknown_options,
550
+ "auto_envvar_prefix": self.auto_envvar_prefix,
551
+ }
552
+
553
+ def __enter__(self) -> Self:
554
+ self._depth += 1
555
+ push_context(self)
556
+ return self
557
+
558
+ def __exit__(
559
+ self,
560
+ exc_type: type[BaseException] | None,
561
+ exc_value: BaseException | None,
562
+ tb: TracebackType | None,
563
+ ) -> bool | None:
564
+ self._depth -= 1
565
+ exit_result: bool | None = None
566
+ if self._depth == 0:
567
+ exit_result = self._close_with_exception_info(exc_type, exc_value, tb)
568
+ pop_context()
569
+
570
+ return exit_result
571
+
572
+ @contextmanager
573
+ def scope(self, cleanup: bool = True) -> cabc.Generator[Context]:
574
+ """This helper method can be used with the context object to promote
575
+ it to the current thread local (see :func:`get_current_context`).
576
+ The default behavior of this is to invoke the cleanup functions which
577
+ can be disabled by setting `cleanup` to `False`. The cleanup
578
+ functions are typically used for things such as closing file handles.
579
+
580
+ If the cleanup is intended the context object can also be directly
581
+ used as a context manager.
582
+
583
+ Example usage::
584
+
585
+ with ctx.scope():
586
+ assert get_current_context() is ctx
587
+
588
+ This is equivalent::
589
+
590
+ with ctx:
591
+ assert get_current_context() is ctx
592
+
593
+ .. versionadded:: 5.0
594
+
595
+ :param cleanup: controls if the cleanup functions should be run or
596
+ not. The default is to run these functions. In
597
+ some situations the context only wants to be
598
+ temporarily pushed in which case this can be disabled.
599
+ Nested pushes automatically defer the cleanup.
600
+ """
601
+ if not cleanup:
602
+ self._depth += 1
603
+ try:
604
+ with self as rv:
605
+ yield rv
606
+ finally:
607
+ if not cleanup:
608
+ self._depth -= 1
609
+
610
+ @property
611
+ def meta(self) -> dict[str, t.Any]:
612
+ """This is a dictionary which is shared with all the contexts
613
+ that are nested. It exists so that click utilities can store some
614
+ state here if they need to. It is however the responsibility of
615
+ that code to manage this dictionary well.
616
+
617
+ The keys are supposed to be unique dotted strings. For instance
618
+ module paths are a good choice for it. What is stored in there is
619
+ irrelevant for the operation of click. However what is important is
620
+ that code that places data here adheres to the general semantics of
621
+ the system.
622
+
623
+ Example usage::
624
+
625
+ LANG_KEY = f'{__name__}.lang'
626
+
627
+ def set_language(value):
628
+ ctx = get_current_context()
629
+ ctx.meta[LANG_KEY] = value
630
+
631
+ def get_language():
632
+ return get_current_context().meta.get(LANG_KEY, 'en_US')
633
+
634
+ .. versionadded:: 5.0
635
+ """
636
+ return self._meta
637
+
638
+ def make_formatter(self) -> HelpFormatter:
639
+ """Creates the :class:`~click.HelpFormatter` for the help and
640
+ usage output.
641
+
642
+ To quickly customize the formatter class used without overriding
643
+ this method, set the :attr:`formatter_class` attribute.
644
+
645
+ .. versionchanged:: 8.0
646
+ Added the :attr:`formatter_class` attribute.
647
+ """
648
+ return self.formatter_class(
649
+ width=self.terminal_width, max_width=self.max_content_width
650
+ )
651
+
652
+ def with_resource(self, context_manager: AbstractContextManager[V]) -> V:
653
+ """Register a resource as if it were used in a ``with``
654
+ statement. The resource will be cleaned up when the context is
655
+ popped.
656
+
657
+ Uses :meth:`contextlib.ExitStack.enter_context`. It calls the
658
+ resource's ``__enter__()`` method and returns the result. When
659
+ the context is popped, it closes the stack, which calls the
660
+ resource's ``__exit__()`` method.
661
+
662
+ To register a cleanup function for something that isn't a
663
+ context manager, use :meth:`call_on_close`. Or use something
664
+ from :mod:`contextlib` to turn it into a context manager first.
665
+
666
+ .. code-block:: python
667
+
668
+ @click.group()
669
+ @click.option("--name")
670
+ @click.pass_context
671
+ def cli(ctx):
672
+ ctx.obj = ctx.with_resource(connect_db(name))
673
+
674
+ :param context_manager: The context manager to enter.
675
+ :return: Whatever ``context_manager.__enter__()`` returns.
676
+
677
+ .. versionadded:: 8.0
678
+ """
679
+ return self._exit_stack.enter_context(context_manager)
680
+
681
+ def call_on_close(self, f: t.Callable[..., t.Any]) -> t.Callable[..., t.Any]:
682
+ """Register a function to be called when the context tears down.
683
+
684
+ This can be used to close resources opened during the script
685
+ execution. Resources that support Python's context manager
686
+ protocol which would be used in a ``with`` statement should be
687
+ registered with :meth:`with_resource` instead.
688
+
689
+ :param f: The function to execute on teardown.
690
+ """
691
+ return self._exit_stack.callback(f)
692
+
693
+ def close(self) -> None:
694
+ """Invoke all close callbacks registered with
695
+ :meth:`call_on_close`, and exit all context managers entered
696
+ with :meth:`with_resource`.
697
+ """
698
+ self._close_with_exception_info(None, None, None)
699
+
700
+ def _close_with_exception_info(
701
+ self,
702
+ exc_type: type[BaseException] | None,
703
+ exc_value: BaseException | None,
704
+ tb: TracebackType | None,
705
+ ) -> bool | None:
706
+ """Unwind the exit stack by calling its :meth:`__exit__` providing the exception
707
+ information to allow for exception handling by the various resources registered
708
+ using :meth;`with_resource`
709
+
710
+ :return: Whatever ``exit_stack.__exit__()`` returns.
711
+ """
712
+ exit_result = self._exit_stack.__exit__(exc_type, exc_value, tb)
713
+ # In case the context is reused, create a new exit stack.
714
+ self._exit_stack = ExitStack()
715
+
716
+ return exit_result
717
+
718
+ @property
719
+ def command_path(self) -> str:
720
+ """The computed command path. This is used for the ``usage``
721
+ information on the help page. It's automatically created by
722
+ combining the info names of the chain of contexts to the root.
723
+ """
724
+ rv = ""
725
+ if self.info_name is not None:
726
+ rv = self.info_name
727
+ if self.parent is not None:
728
+ parent_command_path = [self.parent.command_path]
729
+
730
+ if isinstance(self.parent.command, Command):
731
+ for param in self.parent.command.get_params(self):
732
+ parent_command_path.extend(param.get_usage_pieces(self))
733
+
734
+ rv = f"{' '.join(parent_command_path)} {rv}"
735
+ return rv.lstrip()
736
+
737
+ def find_root(self) -> Context:
738
+ """Finds the outermost context."""
739
+ node = self
740
+ while node.parent is not None:
741
+ node = node.parent
742
+ return node
743
+
744
+ def find_object(self, object_type: type[V]) -> V | None:
745
+ """Finds the closest object of a given type."""
746
+ node: Context | None = self
747
+
748
+ while node is not None:
749
+ if isinstance(node.obj, object_type):
750
+ return node.obj
751
+
752
+ node = node.parent
753
+
754
+ return None
755
+
756
+ def ensure_object(self, object_type: type[V]) -> V:
757
+ """Like :meth:`find_object` but sets the innermost object to a
758
+ new instance of `object_type` if it does not exist.
759
+ """
760
+ rv = self.find_object(object_type)
761
+ if rv is None:
762
+ self.obj = rv = object_type()
763
+ return rv
764
+
765
+ def _default_map_has(self, name: str | None) -> bool:
766
+ """Check if :attr:`default_map` contains a real value for ``name``.
767
+
768
+ Returns ``False`` when the key is absent, the map is ``None``,
769
+ ``name`` is ``None``, or the stored value is the internal
770
+ :data:`UNSET` sentinel.
771
+ """
772
+ return (
773
+ name is not None
774
+ and self.default_map is not None
775
+ and name in self.default_map
776
+ and self.default_map[name] is not UNSET
777
+ )
778
+
779
+ @t.overload
780
+ def lookup_default(
781
+ self, name: str, call: t.Literal[True] = True
782
+ ) -> t.Any | None: ...
783
+
784
+ @t.overload
785
+ def lookup_default(
786
+ self, name: str, call: t.Literal[False] = ...
787
+ ) -> t.Any | t.Callable[[], t.Any] | None: ...
788
+
789
+ def lookup_default(self, name: str, call: bool = True) -> t.Any | None:
790
+ """Get the default for a parameter from :attr:`default_map`.
791
+
792
+ :param name: Name of the parameter.
793
+ :param call: If the default is a callable, call it. Disable to
794
+ return the callable instead.
795
+
796
+ .. versionchanged:: 8.0
797
+ Added the ``call`` parameter.
798
+ """
799
+ if not self._default_map_has(name):
800
+ return None
801
+
802
+ # Assert to make the type checker happy.
803
+ assert self.default_map is not None
804
+ value = self.default_map[name]
805
+
806
+ if call and callable(value):
807
+ return value()
808
+
809
+ return value
810
+
811
+ def fail(self, message: str) -> t.NoReturn:
812
+ """Aborts the execution of the program with a specific error
813
+ message.
814
+
815
+ :param message: the error message to fail with.
816
+ """
817
+ raise UsageError(message, self)
818
+
819
+ def abort(self) -> t.NoReturn:
820
+ """Aborts the script."""
821
+ raise Abort()
822
+
823
+ def exit(self, code: int = 0) -> t.NoReturn:
824
+ """Exits the application with a given exit code.
825
+
826
+ .. versionchanged:: 8.2
827
+ Callbacks and context managers registered with :meth:`call_on_close`
828
+ and :meth:`with_resource` are closed before exiting.
829
+ """
830
+ self.close()
831
+ raise Exit(code)
832
+
833
+ def get_usage(self) -> str:
834
+ """Helper method to get formatted usage string for the current
835
+ context and command.
836
+ """
837
+ return self.command.get_usage(self)
838
+
839
+ def get_help(self) -> str:
840
+ """Helper method to get formatted help page for the current
841
+ context and command.
842
+ """
843
+ return self.command.get_help(self)
844
+
845
+ def _make_sub_context(self, command: Command) -> Context:
846
+ """Create a new context of the same type as this context, but
847
+ for a new command.
848
+
849
+ :meta private:
850
+ """
851
+ return type(self)(command, info_name=command.name, parent=self)
852
+
853
+ @t.overload
854
+ def invoke(
855
+ self, callback: t.Callable[..., V], /, *args: t.Any, **kwargs: t.Any
856
+ ) -> V: ...
857
+
858
+ @t.overload
859
+ def invoke(self, callback: Command, /, *args: t.Any, **kwargs: t.Any) -> t.Any: ...
860
+
861
+ def invoke(
862
+ self, callback: Command | t.Callable[..., V], /, *args: t.Any, **kwargs: t.Any
863
+ ) -> t.Any | V:
864
+ """Invokes a command callback in exactly the way it expects. There
865
+ are two ways to invoke this method:
866
+
867
+ 1. the first argument can be a callback and all other arguments and
868
+ keyword arguments are forwarded directly to the function.
869
+ 2. the first argument is a click command object. In that case all
870
+ arguments are forwarded as well but proper click parameters
871
+ (options and click arguments) must be keyword arguments and Click
872
+ will fill in defaults.
873
+
874
+ .. versionchanged:: 8.0
875
+ All ``kwargs`` are tracked in :attr:`params` so they will be
876
+ passed if :meth:`forward` is called at multiple levels.
877
+
878
+ .. versionchanged:: 3.2
879
+ A new context is created, and missing arguments use default values.
880
+ """
881
+ if isinstance(callback, Command):
882
+ other_cmd = callback
883
+
884
+ if other_cmd.callback is None:
885
+ raise TypeError(
886
+ "The given command does not have a callback that can be invoked."
887
+ )
888
+ else:
889
+ callback = t.cast("t.Callable[..., V]", other_cmd.callback)
890
+
891
+ ctx = self._make_sub_context(other_cmd)
892
+
893
+ for param in other_cmd.params:
894
+ if param.name not in kwargs and param.expose_value:
895
+ default_value = param.get_default(ctx)
896
+ # We explicitly hide the :attr:`UNSET` value to the user, as we
897
+ # choose to make it an implementation detail. And because ``invoke``
898
+ # has been designed as part of Click public API, we return ``None``
899
+ # instead.
900
+ if default_value is UNSET:
901
+ default_value = None
902
+ kwargs[param.name] = param.type_cast_value(ctx, default_value)
903
+
904
+ # Track all kwargs as params, so that forward() will pass
905
+ # them on in subsequent calls.
906
+ ctx.params.update(kwargs)
907
+ else:
908
+ ctx = self
909
+
910
+ with augment_usage_errors(self), ctx:
911
+ return callback(*args, **kwargs)
912
+
913
+ def forward(self, cmd: Command, /, *args: t.Any, **kwargs: t.Any) -> t.Any:
914
+ """Similar to :meth:`invoke` but fills in default keyword
915
+ arguments from the current context if the other command expects
916
+ it. This cannot invoke callbacks directly, only other commands.
917
+
918
+ .. versionchanged:: 8.0
919
+ All ``kwargs`` are tracked in :attr:`params` so they will be
920
+ passed if ``forward`` is called at multiple levels.
921
+ """
922
+ # Can only forward to other commands, not direct callbacks.
923
+ if not isinstance(cmd, Command):
924
+ raise TypeError("Callback is not a command.")
925
+
926
+ for param in self.params:
927
+ if param not in kwargs:
928
+ kwargs[param] = self.params[param]
929
+
930
+ return self.invoke(cmd, *args, **kwargs)
931
+
932
+ def set_parameter_source(self, name: str, source: ParameterSource) -> None:
933
+ """Set the source of a parameter. This indicates the location
934
+ from which the value of the parameter was obtained.
935
+
936
+ :param name: The name of the parameter.
937
+ :param source: A member of :class:`~click.core.ParameterSource`.
938
+ """
939
+ self._parameter_source[name] = source
940
+
941
+ def get_parameter_source(self, name: str) -> ParameterSource | None:
942
+ """Get the source of a parameter. This indicates the location
943
+ from which the value of the parameter was obtained.
944
+
945
+ This can be useful for determining when a user specified a value
946
+ on the command line that is the same as the default value. It
947
+ will be :attr:`~click.core.ParameterSource.DEFAULT` only if the
948
+ value was actually taken from the default.
949
+
950
+ :param name: The name of the parameter.
951
+ :rtype: ParameterSource
952
+
953
+ .. versionchanged:: 8.0
954
+ Returns ``None`` if the parameter was not provided from any
955
+ source.
956
+ """
957
+ return self._parameter_source.get(name)
958
+
959
+
960
+ class Command:
961
+ """Commands are the basic building block of command line interfaces in
962
+ Click. A basic command handles command line parsing and might dispatch
963
+ more parsing to commands nested below it.
964
+
965
+ :param name: the name of the command to use unless a group overrides it.
966
+ :param context_settings: an optional dictionary with defaults that are
967
+ passed to the context object.
968
+ :param callback: the callback to invoke. This is optional.
969
+ :param params: the parameters to register with this command. This can
970
+ be either :class:`Option` or :class:`Argument` objects.
971
+ :param help: the help string to use for this command.
972
+ :param epilog: like the help string but it's printed at the end of the
973
+ help page after everything else.
974
+ :param short_help: the short help to use for this command. This is
975
+ shown on the command listing of the parent command.
976
+ :param add_help_option: by default each command registers a ``--help``
977
+ option. This can be disabled by this parameter.
978
+ :param no_args_is_help: this controls what happens if no arguments are
979
+ provided. This option is disabled by default.
980
+ If enabled this will add ``--help`` as argument
981
+ if no arguments are passed
982
+ :param hidden: hide this command from help outputs.
983
+ :param deprecated: If ``True`` or non-empty string, issues a message
984
+ indicating that the command is deprecated and highlights
985
+ its deprecation in --help. The message can be customized
986
+ by using a string as the value.
987
+
988
+ .. versionchanged:: 8.2
989
+ This is the base class for all commands, not ``BaseCommand``.
990
+ ``deprecated`` can be set to a string as well to customize the
991
+ deprecation message.
992
+
993
+ .. versionchanged:: 8.1
994
+ ``help``, ``epilog``, and ``short_help`` are stored unprocessed,
995
+ all formatting is done when outputting help text, not at init,
996
+ and is done even if not using the ``@command`` decorator.
997
+
998
+ .. versionchanged:: 8.0
999
+ Added a ``repr`` showing the command name.
1000
+
1001
+ .. versionchanged:: 7.1
1002
+ Added the ``no_args_is_help`` parameter.
1003
+
1004
+ .. versionchanged:: 2.0
1005
+ Added the ``context_settings`` parameter.
1006
+ """
1007
+
1008
+ #: The context class to create with :meth:`make_context`.
1009
+ #:
1010
+ #: .. versionadded:: 8.0
1011
+ context_class: type[Context] = Context
1012
+
1013
+ #: the default for the :attr:`Context.allow_extra_args` flag.
1014
+ allow_extra_args = False
1015
+
1016
+ #: the default for the :attr:`Context.allow_interspersed_args` flag.
1017
+ allow_interspersed_args = True
1018
+
1019
+ #: the default for the :attr:`Context.ignore_unknown_options` flag.
1020
+ ignore_unknown_options = False
1021
+
1022
+ name: str | None
1023
+ context_settings: cabc.MutableMapping[str, t.Any]
1024
+ callback: t.Callable[..., t.Any] | None
1025
+ params: list[Parameter]
1026
+ help: str | None
1027
+ epilog: str | None
1028
+ options_metavar: str | None
1029
+ short_help: str | None
1030
+ add_help_option: bool
1031
+ _help_option: Option | None
1032
+ no_args_is_help: bool
1033
+ hidden: bool
1034
+ deprecated: bool | str
1035
+
1036
+ def __init__(
1037
+ self,
1038
+ name: str | None,
1039
+ context_settings: cabc.MutableMapping[str, t.Any] | None = None,
1040
+ callback: t.Callable[..., t.Any] | None = None,
1041
+ params: list[Parameter] | None = None,
1042
+ help: str | None = None,
1043
+ epilog: str | None = None,
1044
+ short_help: str | None = None,
1045
+ options_metavar: str | None = "[OPTIONS]",
1046
+ add_help_option: bool = True,
1047
+ no_args_is_help: bool = False,
1048
+ hidden: bool = False,
1049
+ deprecated: bool | str = False,
1050
+ ) -> None:
1051
+ #: the name the command thinks it has. Upon registering a command
1052
+ #: on a :class:`Group` the group will default the command name
1053
+ #: with this information. You should instead use the
1054
+ #: :class:`Context`\'s :attr:`~Context.info_name` attribute.
1055
+ self.name = name
1056
+
1057
+ if context_settings is None:
1058
+ context_settings = {}
1059
+
1060
+ #: an optional dictionary with defaults passed to the context.
1061
+ self.context_settings = context_settings
1062
+
1063
+ #: the callback to execute when the command fires. This might be
1064
+ #: `None` in which case nothing happens.
1065
+ self.callback = callback
1066
+ #: the list of parameters for this command in the order they
1067
+ #: should show up in the help page and execute. Eager parameters
1068
+ #: will automatically be handled before non eager ones.
1069
+ self.params = params or []
1070
+ self.help = help
1071
+ self.epilog = epilog
1072
+ self.options_metavar = options_metavar
1073
+ self.short_help = short_help
1074
+ self.add_help_option = add_help_option
1075
+ self._help_option = None
1076
+ self.no_args_is_help = no_args_is_help
1077
+ self.hidden = hidden
1078
+ self.deprecated = deprecated
1079
+
1080
+ def to_info_dict(self, ctx: Context) -> dict[str, t.Any]:
1081
+ return {
1082
+ "name": self.name,
1083
+ "params": [param.to_info_dict() for param in self.get_params(ctx)],
1084
+ "help": self.help,
1085
+ "epilog": self.epilog,
1086
+ "short_help": self.short_help,
1087
+ "hidden": self.hidden,
1088
+ "deprecated": self.deprecated,
1089
+ }
1090
+
1091
+ def __repr__(self) -> str:
1092
+ return f"<{self.__class__.__name__} {self.name}>"
1093
+
1094
+ def get_usage(self, ctx: Context) -> str:
1095
+ """Formats the usage line into a string and returns it.
1096
+
1097
+ Calls :meth:`format_usage` internally.
1098
+ """
1099
+ formatter = ctx.make_formatter()
1100
+ self.format_usage(ctx, formatter)
1101
+ return formatter.getvalue().rstrip("\n")
1102
+
1103
+ def get_params(self, ctx: Context) -> list[Parameter]:
1104
+ params = self.params
1105
+ help_option = self.get_help_option(ctx)
1106
+
1107
+ if help_option is not None:
1108
+ params = [*params, help_option]
1109
+
1110
+ if __debug__:
1111
+ import warnings
1112
+
1113
+ opts = [opt for param in params for opt in param.opts]
1114
+ opts_counter = Counter(opts)
1115
+ duplicate_opts = (opt for opt, count in opts_counter.items() if count > 1)
1116
+
1117
+ for duplicate_opt in duplicate_opts:
1118
+ warnings.warn(
1119
+ (
1120
+ f"The parameter {duplicate_opt} is used more than once. "
1121
+ "Remove its duplicate as parameters should be unique."
1122
+ ),
1123
+ stacklevel=3,
1124
+ )
1125
+
1126
+ # Options may deliberately share a storage name to compete for
1127
+ # the same value (feature switches), but an argument sharing a
1128
+ # name silently overwrites the other parameter's value.
1129
+ names_counter = Counter(param.name for param in params)
1130
+ duplicate_names = (
1131
+ name for name, count in names_counter.items() if count > 1
1132
+ )
1133
+
1134
+ for duplicate_name in duplicate_names:
1135
+ sharers = [param for param in params if param.name == duplicate_name]
1136
+
1137
+ if help_option in sharers:
1138
+ warnings.warn(
1139
+ (
1140
+ f"The name {duplicate_name!r} is reserved for the "
1141
+ "automatic help option. Give the parameter a "
1142
+ "different name."
1143
+ ),
1144
+ stacklevel=3,
1145
+ )
1146
+ elif any(isinstance(param, Argument) for param in sharers):
1147
+ warnings.warn(
1148
+ (
1149
+ f"The name {duplicate_name!r} is used by an argument "
1150
+ "and another parameter. They will overwrite each "
1151
+ "other's value during parsing. Give each parameter "
1152
+ "a unique name."
1153
+ ),
1154
+ stacklevel=3,
1155
+ )
1156
+
1157
+ return params
1158
+
1159
+ def format_usage(self, ctx: Context, formatter: HelpFormatter) -> None:
1160
+ """Writes the usage line into the formatter.
1161
+
1162
+ This is a low-level method called by :meth:`get_usage`.
1163
+ """
1164
+ pieces = self.collect_usage_pieces(ctx)
1165
+ formatter.write_usage(ctx.command_path, " ".join(pieces))
1166
+
1167
+ def collect_usage_pieces(self, ctx: Context) -> list[str]:
1168
+ """Returns all the pieces that go into the usage line and returns
1169
+ it as a list of strings.
1170
+ """
1171
+ rv = [self.options_metavar] if self.options_metavar else []
1172
+
1173
+ for param in self.get_params(ctx):
1174
+ rv.extend(param.get_usage_pieces(ctx))
1175
+
1176
+ return rv
1177
+
1178
+ def get_help_option_names(self, ctx: Context) -> list[str]:
1179
+ """Returns the names for the help option.
1180
+
1181
+ Drops duplicates and names already reserved by another parameter. Order of
1182
+ :attr:`Context.help_option_names` is preserved, so the result is stable.
1183
+
1184
+ .. versionchanged:: 8.5.0
1185
+ Names keep their declaration order.
1186
+ """
1187
+ all_names = dict.fromkeys(ctx.help_option_names)
1188
+ for param in self.params:
1189
+ for name in (*param.opts, *param.secondary_opts):
1190
+ all_names.pop(name, None)
1191
+ return list(all_names)
1192
+
1193
+ def get_help_option(self, ctx: Context) -> Option | None:
1194
+ """Returns the help option object.
1195
+
1196
+ Skipped if :attr:`add_help_option` is ``False``.
1197
+
1198
+ .. versionchanged:: 8.5.0
1199
+ The help option stores its value under the reserved name
1200
+ ``_click_default_help``, so a parameter named ``help`` no
1201
+ longer breaks parsing.
1202
+
1203
+ .. versionchanged:: 8.1.8
1204
+ The help option is now cached to avoid creating it multiple times.
1205
+ """
1206
+ help_option_names = self.get_help_option_names(ctx)
1207
+
1208
+ if not help_option_names or not self.add_help_option:
1209
+ return None
1210
+
1211
+ # Cache the help option object in private _help_option attribute to
1212
+ # avoid creating it multiple times. Not doing this will break the
1213
+ # callback ordering by iter_params_for_processing(), which relies on
1214
+ # object comparison.
1215
+ if self._help_option is None:
1216
+ # Avoid circular import.
1217
+ from .decorators import help_option
1218
+
1219
+ # The help option never exposes its value, so it uses a reserved
1220
+ # storage name, keeping it clear of user parameters (like an
1221
+ # argument named "help") that would otherwise clobber its value.
1222
+ help_option(*help_option_names, _HELP_OPTION_STORAGE_NAME)(self)
1223
+ self._help_option = self.params.pop() # type: ignore[assignment]
1224
+
1225
+ return self._help_option
1226
+
1227
+ def make_parser(self, ctx: Context) -> _OptionParser:
1228
+ """Creates the underlying option parser for this command."""
1229
+ parser = _OptionParser(ctx)
1230
+ for param in self.get_params(ctx):
1231
+ param.add_to_parser(parser, ctx)
1232
+ return parser
1233
+
1234
+ def get_help(self, ctx: Context) -> str:
1235
+ """Formats the help into a string and returns it.
1236
+
1237
+ Calls :meth:`format_help` internally.
1238
+ """
1239
+ formatter = ctx.make_formatter()
1240
+ self.format_help(ctx, formatter)
1241
+ return formatter.getvalue().rstrip("\n")
1242
+
1243
+ def get_short_help_str(self, limit: int = 45) -> str:
1244
+ """Gets short help for the command or makes it by shortening the
1245
+ long help string.
1246
+ """
1247
+ if self.short_help:
1248
+ text = inspect.cleandoc(self.short_help)
1249
+ elif self.help:
1250
+ text = _make_default_short_help(self.help, limit)
1251
+ else:
1252
+ text = ""
1253
+
1254
+ if self.deprecated:
1255
+ text = f"{text} {_format_deprecated_label(self.deprecated)}"
1256
+
1257
+ return text.strip()
1258
+
1259
+ def format_help(self, ctx: Context, formatter: HelpFormatter) -> None:
1260
+ """Writes the help into the formatter if it exists.
1261
+
1262
+ This is a low-level method called by :meth:`get_help`.
1263
+
1264
+ This calls the following methods:
1265
+
1266
+ - :meth:`format_usage`
1267
+ - :meth:`format_help_text`
1268
+ - :meth:`format_arguments`
1269
+ - :meth:`format_options`
1270
+ - :meth:`format_epilog`
1271
+ """
1272
+ self.format_usage(ctx, formatter)
1273
+ self.format_help_text(ctx, formatter)
1274
+ self.format_arguments(ctx, formatter)
1275
+ self.format_options(ctx, formatter)
1276
+ self.format_epilog(ctx, formatter)
1277
+
1278
+ def format_help_text(self, ctx: Context, formatter: HelpFormatter) -> None:
1279
+ """Writes the help text to the formatter if it exists."""
1280
+ if self.help is not None:
1281
+ # truncate the help text to the first form feed
1282
+ text = inspect.cleandoc(self.help).partition("\f")[0]
1283
+ else:
1284
+ text = ""
1285
+
1286
+ if self.deprecated:
1287
+ label = _format_deprecated_label(self.deprecated)
1288
+ text = f"{text} {label}" if text else label
1289
+
1290
+ if text:
1291
+ formatter.write_paragraph()
1292
+
1293
+ with formatter.indentation():
1294
+ formatter.write_text(text)
1295
+
1296
+ def format_options(self, ctx: Context, formatter: HelpFormatter) -> None:
1297
+ """Writes all the options into the formatter if they exist."""
1298
+ opts = []
1299
+ for param in self.get_params(ctx):
1300
+ rv = param.get_help_record(ctx)
1301
+ if rv is not None and not isinstance(param, Argument):
1302
+ opts.append(rv)
1303
+
1304
+ if opts:
1305
+ with formatter.section(_("Options")):
1306
+ formatter.write_dl(opts)
1307
+
1308
+ def format_arguments(self, ctx: Context, formatter: HelpFormatter) -> None:
1309
+ """Writes all arguments into the formatter, if at least one is documented.
1310
+
1311
+ An argument with no help gets an empty description, the same way an option
1312
+ with no help does. That keeps the section an exhaustive list of the
1313
+ positional arguments, matching the usage line.
1314
+ """
1315
+ args = [param for param in self.get_params(ctx) if isinstance(param, Argument)]
1316
+
1317
+ if any(arg.help is not None for arg in args):
1318
+ with formatter.section(_("Positional arguments")):
1319
+ formatter.write_dl([arg.get_help_record(ctx) for arg in args])
1320
+
1321
+ def format_epilog(self, ctx: Context, formatter: HelpFormatter) -> None:
1322
+ """Writes the epilog into the formatter if it exists."""
1323
+ if self.epilog:
1324
+ epilog = inspect.cleandoc(self.epilog)
1325
+ formatter.write_paragraph()
1326
+
1327
+ with formatter.indentation():
1328
+ formatter.write_text(epilog)
1329
+
1330
+ def make_context(
1331
+ self,
1332
+ info_name: str | None,
1333
+ args: list[str],
1334
+ parent: Context | None = None,
1335
+ **extra: t.Any,
1336
+ ) -> Context:
1337
+ """This function when given an info name and arguments will kick
1338
+ off the parsing and create a new :class:`Context`. It does not
1339
+ invoke the actual command callback though.
1340
+
1341
+ To quickly customize the context class used without overriding
1342
+ this method, set the :attr:`context_class` attribute.
1343
+
1344
+ :param info_name: the info name for this invocation. Generally this
1345
+ is the most descriptive name for the script or
1346
+ command. For the toplevel script it's usually
1347
+ the name of the script, for commands below it's
1348
+ the name of the command.
1349
+ :param args: the arguments to parse as list of strings.
1350
+ :param parent: the parent context if available.
1351
+ :param extra: extra keyword arguments forwarded to the context
1352
+ constructor.
1353
+
1354
+ .. versionchanged:: 8.0
1355
+ Added the :attr:`context_class` attribute.
1356
+ """
1357
+ for key, value in self.context_settings.items():
1358
+ if key not in extra:
1359
+ extra[key] = value
1360
+
1361
+ ctx = self.context_class(self, info_name=info_name, parent=parent, **extra)
1362
+
1363
+ with ctx.scope(cleanup=False):
1364
+ self.parse_args(ctx, args)
1365
+ return ctx
1366
+
1367
+ def parse_args(self, ctx: Context, args: list[str]) -> list[str]:
1368
+ if not args and self.no_args_is_help and not ctx.resilient_parsing:
1369
+ raise NoArgsIsHelpError(ctx)
1370
+
1371
+ parser = self.make_parser(ctx)
1372
+ opts, args, param_order = parser.parse_args(args=args)
1373
+
1374
+ for param in iter_params_for_processing(param_order, self.get_params(ctx)):
1375
+ _, args = param.handle_parse_result(ctx, opts, args)
1376
+
1377
+ # We now have all parameters' values into `ctx.params`, but the data may contain
1378
+ # the `UNSET` sentinel.
1379
+ # Convert `UNSET` to `None` to ensure that the user doesn't see `UNSET`.
1380
+ #
1381
+ # Waiting until after the initial parse to convert allows us to treat `UNSET`
1382
+ # more like a missing value when multiple params use the same name.
1383
+ for name, value in ctx.params.items():
1384
+ if value is UNSET:
1385
+ ctx.params[name] = None
1386
+
1387
+ if args and not ctx.allow_extra_args and not ctx.resilient_parsing:
1388
+ ctx.fail(
1389
+ ngettext(
1390
+ "Got unexpected extra argument ({args})",
1391
+ "Got unexpected extra arguments ({args})",
1392
+ len(args),
1393
+ ).format(args=" ".join(map(str, args)))
1394
+ )
1395
+
1396
+ ctx.args = args
1397
+ ctx._opt_prefixes.update(parser._opt_prefixes)
1398
+ return args
1399
+
1400
+ def invoke(self, ctx: Context) -> t.Any:
1401
+ """Given a context, this invokes the attached callback (if it exists)
1402
+ in the right way.
1403
+ """
1404
+ if self.deprecated:
1405
+ message = _(
1406
+ "DeprecationWarning: The command {name!r} is deprecated.{extra_message}"
1407
+ ).format(
1408
+ name=self.name,
1409
+ extra_message=_format_deprecated_suffix(self.deprecated),
1410
+ )
1411
+ echo(style(message, fg="red"), err=True)
1412
+
1413
+ if self.callback is not None:
1414
+ return ctx.invoke(self.callback, **ctx.params)
1415
+
1416
+ def shell_complete(self, ctx: Context, incomplete: str) -> list[CompletionItem]:
1417
+ """Return a list of completions for the incomplete value. Looks
1418
+ at the names of options and chained multi-commands.
1419
+
1420
+ Any command could be part of a chained multi-command, so sibling
1421
+ commands are valid at any point during command completion.
1422
+
1423
+ :param ctx: Invocation context for this command.
1424
+ :param incomplete: Value being completed. May be empty.
1425
+
1426
+ .. versionadded:: 8.0
1427
+ """
1428
+ from click.shell_completion import CompletionItem
1429
+
1430
+ results: list[CompletionItem] = []
1431
+
1432
+ if incomplete and not incomplete[0].isalnum():
1433
+ for param in self.get_params(ctx):
1434
+ if (
1435
+ not isinstance(param, Option)
1436
+ or param.hidden
1437
+ or (
1438
+ not param.multiple
1439
+ and ctx.get_parameter_source(param.name)
1440
+ is ParameterSource.COMMANDLINE
1441
+ )
1442
+ ):
1443
+ continue
1444
+
1445
+ results.extend(
1446
+ CompletionItem(name, help=param.help)
1447
+ for name in [*param.opts, *param.secondary_opts]
1448
+ if name.startswith(incomplete)
1449
+ )
1450
+
1451
+ while ctx.parent is not None:
1452
+ ctx = ctx.parent
1453
+
1454
+ if isinstance(ctx.command, Group) and ctx.command.chain:
1455
+ results.extend(
1456
+ CompletionItem(name, help=command.get_short_help_str())
1457
+ for name, command in _complete_visible_commands(ctx, incomplete)
1458
+ if name not in ctx._protected_args
1459
+ )
1460
+
1461
+ return results
1462
+
1463
+ @t.overload
1464
+ def main(
1465
+ self,
1466
+ args: cabc.Sequence[str] | None = None,
1467
+ prog_name: str | None = None,
1468
+ complete_var: str | None = None,
1469
+ standalone_mode: t.Literal[True] = True,
1470
+ **extra: t.Any,
1471
+ ) -> t.NoReturn: ...
1472
+
1473
+ @t.overload
1474
+ def main(
1475
+ self,
1476
+ args: cabc.Sequence[str] | None = None,
1477
+ prog_name: str | None = None,
1478
+ complete_var: str | None = None,
1479
+ standalone_mode: bool = ...,
1480
+ **extra: t.Any,
1481
+ ) -> t.Any: ...
1482
+
1483
+ def main(
1484
+ self,
1485
+ args: cabc.Sequence[str] | None = None,
1486
+ prog_name: str | None = None,
1487
+ complete_var: str | None = None,
1488
+ standalone_mode: bool = True,
1489
+ windows_expand_args: bool = True,
1490
+ **extra: t.Any,
1491
+ ) -> t.Any:
1492
+ """This is the way to invoke a script with all the bells and
1493
+ whistles as a command line application. This will always terminate
1494
+ the application after a call. If this is not wanted, ``SystemExit``
1495
+ needs to be caught.
1496
+
1497
+ This method is also available by directly calling the instance of
1498
+ a :class:`Command`.
1499
+
1500
+ :param args: the arguments that should be used for parsing. If not
1501
+ provided, ``sys.argv[1:]`` is used.
1502
+ :param prog_name: the program name that should be used. By default
1503
+ the program name is constructed by taking the file
1504
+ name from ``sys.argv[0]``.
1505
+ :param complete_var: the environment variable that controls the
1506
+ bash completion support. The default is
1507
+ ``"_<prog_name>_COMPLETE"`` with prog_name in
1508
+ uppercase.
1509
+ :param standalone_mode: the default behavior is to invoke the script
1510
+ in standalone mode. Click will then
1511
+ handle exceptions and convert them into
1512
+ error messages and the function will never
1513
+ return but shut down the interpreter. If
1514
+ this is set to `False` they will be
1515
+ propagated to the caller and the return
1516
+ value of this function is the return value
1517
+ of :meth:`invoke`.
1518
+ :param windows_expand_args: Expand glob patterns, user dir, and
1519
+ env vars in command line args on Windows.
1520
+ :param extra: extra keyword arguments are forwarded to the context
1521
+ constructor. See :class:`Context` for more information.
1522
+
1523
+ .. versionchanged:: 8.0.1
1524
+ Added the ``windows_expand_args`` parameter to allow
1525
+ disabling command line arg expansion on Windows.
1526
+
1527
+ .. versionchanged:: 8.0
1528
+ When taking arguments from ``sys.argv`` on Windows, glob
1529
+ patterns, user dir, and env vars are expanded.
1530
+
1531
+ .. versionchanged:: 3.0
1532
+ Added the ``standalone_mode`` parameter.
1533
+ """
1534
+ if args is None:
1535
+ args = sys.argv[1:]
1536
+
1537
+ if os.name == "nt" and windows_expand_args:
1538
+ args = _expand_args(args)
1539
+ else:
1540
+ args = list(args)
1541
+
1542
+ if prog_name is None:
1543
+ prog_name = _detect_program_name()
1544
+
1545
+ # Process shell completion requests and exit early.
1546
+ self._main_shell_completion(extra, prog_name, complete_var)
1547
+
1548
+ # Every handler below takes the same two steps: propagate when
1549
+ # standalone mode is disabled, otherwise collect the message and the
1550
+ # exit code, and leave both to the teardown after the ``try``. The
1551
+ # teardown writes the message and exits, and the outermost handler
1552
+ # holds one policy for every interrupt arriving that late: the
1553
+ # message may be lost, the intended exit code still wins.
1554
+ report: cabc.Callable[[], None] | None = None
1555
+ exit_code = 1
1556
+
1557
+ try:
1558
+ try:
1559
+ with self.make_context(prog_name, args, **extra) as ctx:
1560
+ rv = self.invoke(ctx)
1561
+ if not standalone_mode:
1562
+ return rv
1563
+ # it's not safe to `ctx.exit(rv)` here!
1564
+ # note that `rv` may actually contain data like "1" which
1565
+ # has obvious effects
1566
+ # more subtle case: `rv=[None, None]` can come out of
1567
+ # chained commands which all returned `None` -- so it's not
1568
+ # even always obvious that `rv` indicates success/failure
1569
+ # by its truthiness/falsiness
1570
+ ctx.exit()
1571
+ except Exit as e:
1572
+ if not standalone_mode:
1573
+ # in non-standalone mode, return the exit code
1574
+ # note that this is only reached if `self.invoke` above raises
1575
+ # an Exit explicitly -- thus bypassing the check there which
1576
+ # would return its result
1577
+ # the results of non-standalone execution may therefore be
1578
+ # somewhat ambiguous: if there are codepaths which lead to
1579
+ # `ctx.exit(1)` and to `return 1`, the caller won't be able to
1580
+ # tell the difference between the two
1581
+ return e.exit_code
1582
+
1583
+ exit_code = e.exit_code
1584
+ except Abort:
1585
+ if not standalone_mode:
1586
+ raise
1587
+
1588
+ report = _echo_aborted
1589
+ except (EOFError, KeyboardInterrupt) as e:
1590
+ # The blank line closes the terminal's ``^C`` echo.
1591
+ echo(file=sys.stderr)
1592
+
1593
+ if not standalone_mode:
1594
+ raise Abort() from e
1595
+
1596
+ report = _echo_aborted
1597
+ except ClickException as e:
1598
+ if not standalone_mode:
1599
+ raise
1600
+
1601
+ report, exit_code = e.show, e.exit_code
1602
+ except OSError as e:
1603
+ if e.errno != errno.EPIPE:
1604
+ raise
1605
+
1606
+ sys.stdout = t.cast(t.TextIO, _PacifyFlushWrapper(sys.stdout))
1607
+ sys.stderr = t.cast(t.TextIO, _PacifyFlushWrapper(sys.stderr))
1608
+
1609
+ if report is not None:
1610
+ report()
1611
+
1612
+ sys.exit(exit_code)
1613
+ except (EOFError, KeyboardInterrupt):
1614
+ if not standalone_mode:
1615
+ raise
1616
+
1617
+ sys.exit(exit_code)
1618
+
1619
+ def _main_shell_completion(
1620
+ self,
1621
+ ctx_args: cabc.MutableMapping[str, t.Any],
1622
+ prog_name: str,
1623
+ complete_var: str | None = None,
1624
+ ) -> None:
1625
+ """Check if the shell is asking for tab completion, process
1626
+ that, then exit early. Called from :meth:`main` before the
1627
+ program is invoked.
1628
+
1629
+ :param prog_name: Name of the executable in the shell.
1630
+ :param complete_var: Name of the environment variable that holds
1631
+ the completion instruction. Defaults to
1632
+ ``_{PROG_NAME}_COMPLETE``.
1633
+
1634
+ .. versionchanged:: 8.2.0
1635
+ Dots (``.``) in ``prog_name`` are replaced with underscores (``_``).
1636
+ """
1637
+ if complete_var is None:
1638
+ complete_name = prog_name.replace("-", "_").replace(".", "_")
1639
+ complete_var = f"_{complete_name}_COMPLETE".upper()
1640
+
1641
+ instruction = os.environ.get(complete_var)
1642
+
1643
+ if not instruction:
1644
+ return
1645
+
1646
+ from .shell_completion import shell_complete
1647
+
1648
+ rv = shell_complete(self, ctx_args, prog_name, complete_var, instruction)
1649
+ sys.exit(rv)
1650
+
1651
+ def __call__(self, *args: t.Any, **kwargs: t.Any) -> t.Any:
1652
+ """Alias for :meth:`main`."""
1653
+ return self.main(*args, **kwargs)
1654
+
1655
+
1656
+ class _FakeSubclassCheck(type):
1657
+ def __subclasscheck__(cls, subclass: type) -> bool:
1658
+ return issubclass(subclass, cls.__bases__[0])
1659
+
1660
+ def __instancecheck__(cls, instance: t.Any) -> bool:
1661
+ return isinstance(instance, cls.__bases__[0])
1662
+
1663
+
1664
+ class _BaseCommand(Command, metaclass=_FakeSubclassCheck):
1665
+ """
1666
+ .. deprecated:: 8.2
1667
+ Will be removed in Click 9.0. Use ``Command`` instead.
1668
+ """
1669
+
1670
+
1671
+ class Group(Command):
1672
+ """A group is a command that nests other commands (or more groups).
1673
+
1674
+ :param name: The name of the group command.
1675
+ :param commands: Map names to :class:`Command` objects. Can be a list, which
1676
+ will use :attr:`Command.name` as the keys.
1677
+ :param invoke_without_command: Invoke the group's callback even if a
1678
+ subcommand is not given.
1679
+ :param no_args_is_help: If no arguments are given, show the group's help and
1680
+ exit. Defaults to the opposite of ``invoke_without_command``.
1681
+ :param subcommand_metavar: How to represent the subcommand argument in help.
1682
+ The default will represent whether ``chain`` is set or not.
1683
+ :param chain: Allow passing more than one subcommand argument. After parsing
1684
+ a command's arguments, if any arguments remain another command will be
1685
+ matched, and so on.
1686
+ :param result_callback: A function to call after the group's and
1687
+ subcommand's callbacks. The value returned by the subcommand is passed.
1688
+ If ``chain`` is enabled, the value will be a list of values returned by
1689
+ all the commands. If ``invoke_without_command`` is enabled, the value
1690
+ will be the value returned by the group's callback, or an empty list if
1691
+ ``chain`` is enabled.
1692
+ :param kwargs: Other arguments passed to :class:`Command`.
1693
+
1694
+ .. versionchanged:: 8.0
1695
+ The ``commands`` argument can be a list of command objects.
1696
+
1697
+ .. versionchanged:: 8.2
1698
+ Merged with and replaces the ``MultiCommand`` base class.
1699
+ """
1700
+
1701
+ allow_extra_args = True
1702
+ allow_interspersed_args = False
1703
+
1704
+ #: If set, this is used by the group's :meth:`command` decorator
1705
+ #: as the default :class:`Command` class. This is useful to make all
1706
+ #: subcommands use a custom command class.
1707
+ #:
1708
+ #: .. versionadded:: 8.0
1709
+ command_class: type[Command] | None = None
1710
+
1711
+ #: If set, this is used by the group's :meth:`group` decorator
1712
+ #: as the default :class:`Group` class. This is useful to make all
1713
+ #: subgroups use a custom group class.
1714
+ #:
1715
+ #: If set to the special value :class:`type` (literally
1716
+ #: ``group_class = type``), this group's class will be used as the
1717
+ #: default class. This makes a custom group class continue to make
1718
+ #: custom groups.
1719
+ #:
1720
+ #: .. versionadded:: 8.0
1721
+ group_class: type[Group | type] | None = None
1722
+ # Literal[type] isn't valid, so use Type[type]
1723
+
1724
+ commands: cabc.MutableMapping[str, Command]
1725
+ invoke_without_command: bool
1726
+ subcommand_metavar: str
1727
+ chain: bool
1728
+ _result_callback: t.Callable[..., t.Any] | None
1729
+
1730
+ def __init__(
1731
+ self,
1732
+ name: str | None = None,
1733
+ commands: cabc.MutableMapping[str, Command]
1734
+ | cabc.Sequence[Command]
1735
+ | None = None,
1736
+ invoke_without_command: bool = False,
1737
+ no_args_is_help: bool | None = None,
1738
+ subcommand_metavar: str | None = None,
1739
+ chain: bool = False,
1740
+ result_callback: t.Callable[..., t.Any] | None = None,
1741
+ **kwargs: t.Any,
1742
+ ) -> None:
1743
+ super().__init__(name, **kwargs)
1744
+
1745
+ if commands is None:
1746
+ commands = {}
1747
+ elif isinstance(commands, abc.Sequence):
1748
+ commands = {c.name: c for c in commands if c.name is not None}
1749
+
1750
+ #: The registered subcommands by their exported names.
1751
+ self.commands = commands
1752
+
1753
+ if no_args_is_help is None:
1754
+ no_args_is_help = not invoke_without_command
1755
+
1756
+ self.no_args_is_help = no_args_is_help
1757
+ self.invoke_without_command = invoke_without_command
1758
+
1759
+ if subcommand_metavar is None:
1760
+ # When the group can run without a subcommand, the leading command
1761
+ # token is optional, so wrap it in brackets to reflect that.
1762
+ if chain:
1763
+ if invoke_without_command:
1764
+ subcommand_metavar = "[COMMAND1] [ARGS]... [COMMAND2 [ARGS]...]..."
1765
+ else:
1766
+ subcommand_metavar = "COMMAND1 [ARGS]... [COMMAND2 [ARGS]...]..."
1767
+ elif invoke_without_command:
1768
+ subcommand_metavar = "[COMMAND] [ARGS]..."
1769
+ else:
1770
+ subcommand_metavar = "COMMAND [ARGS]..."
1771
+
1772
+ self.subcommand_metavar = subcommand_metavar
1773
+ self.chain = chain
1774
+ # The result callback that is stored. This can be set or
1775
+ # overridden with the :func:`result_callback` decorator.
1776
+ self._result_callback = result_callback
1777
+
1778
+ if self.chain:
1779
+ for param in self.params:
1780
+ if isinstance(param, Argument) and not param.required:
1781
+ raise RuntimeError(
1782
+ "A group in chain mode cannot have optional arguments."
1783
+ )
1784
+
1785
+ def to_info_dict(self, ctx: Context) -> dict[str, t.Any]:
1786
+ info_dict = super().to_info_dict(ctx)
1787
+ commands = {}
1788
+
1789
+ for name in self.list_commands(ctx):
1790
+ command = self.get_command(ctx, name)
1791
+
1792
+ if command is None:
1793
+ continue
1794
+
1795
+ sub_ctx = ctx._make_sub_context(command)
1796
+
1797
+ with sub_ctx.scope(cleanup=False):
1798
+ commands[name] = command.to_info_dict(sub_ctx)
1799
+
1800
+ info_dict.update(commands=commands, chain=self.chain)
1801
+ return info_dict
1802
+
1803
+ def add_command(self, cmd: Command, name: str | None = None) -> None:
1804
+ """Registers another :class:`Command` with this group. If the name
1805
+ is not provided, the name of the command is used.
1806
+ """
1807
+ name = name or cmd.name
1808
+ if name is None:
1809
+ raise TypeError("Command has no name.")
1810
+ _check_nested_chain(self, name, cmd, register=True)
1811
+ self.commands[name] = cmd
1812
+
1813
+ @t.overload
1814
+ def command(self, __func: t.Callable[..., t.Any]) -> Command: ...
1815
+
1816
+ @t.overload
1817
+ def command(
1818
+ self, *args: t.Any, **kwargs: t.Any
1819
+ ) -> t.Callable[[t.Callable[..., t.Any]], Command]: ...
1820
+
1821
+ def command(
1822
+ self, *args: t.Any, **kwargs: t.Any
1823
+ ) -> t.Callable[[t.Callable[..., t.Any]], Command] | Command:
1824
+ """A shortcut decorator for declaring and attaching a command to
1825
+ the group. This takes the same arguments as :func:`command` and
1826
+ immediately registers the created command with this group by
1827
+ calling :meth:`add_command`.
1828
+
1829
+ To customize the command class used, set the
1830
+ :attr:`command_class` attribute.
1831
+
1832
+ .. versionchanged:: 8.1
1833
+ This decorator can be applied without parentheses.
1834
+
1835
+ .. versionchanged:: 8.0
1836
+ Added the :attr:`command_class` attribute.
1837
+ """
1838
+ from .decorators import command
1839
+
1840
+ func: t.Callable[..., t.Any] | None = None
1841
+
1842
+ if args and callable(args[0]):
1843
+ assert len(args) == 1 and not kwargs, (
1844
+ "Use 'command(**kwargs)(callable)' to provide arguments."
1845
+ )
1846
+ (func,) = args
1847
+ args = ()
1848
+
1849
+ if self.command_class and kwargs.get("cls") is None:
1850
+ kwargs["cls"] = self.command_class
1851
+
1852
+ def decorator(f: t.Callable[..., t.Any]) -> Command:
1853
+ cmd: Command = command(*args, **kwargs)(f)
1854
+ self.add_command(cmd)
1855
+ return cmd
1856
+
1857
+ if func is not None:
1858
+ return decorator(func)
1859
+
1860
+ return decorator
1861
+
1862
+ @t.overload
1863
+ def group(self, __func: t.Callable[..., t.Any]) -> Group: ...
1864
+
1865
+ @t.overload
1866
+ def group(
1867
+ self, *args: t.Any, **kwargs: t.Any
1868
+ ) -> t.Callable[[t.Callable[..., t.Any]], Group]: ...
1869
+
1870
+ def group(
1871
+ self, *args: t.Any, **kwargs: t.Any
1872
+ ) -> t.Callable[[t.Callable[..., t.Any]], Group] | Group:
1873
+ """A shortcut decorator for declaring and attaching a group to
1874
+ the group. This takes the same arguments as :func:`group` and
1875
+ immediately registers the created group with this group by
1876
+ calling :meth:`add_command`.
1877
+
1878
+ To customize the group class used, set the :attr:`group_class`
1879
+ attribute.
1880
+
1881
+ .. versionchanged:: 8.1
1882
+ This decorator can be applied without parentheses.
1883
+
1884
+ .. versionchanged:: 8.0
1885
+ Added the :attr:`group_class` attribute.
1886
+ """
1887
+ from .decorators import group
1888
+
1889
+ func: t.Callable[..., t.Any] | None = None
1890
+
1891
+ if args and callable(args[0]):
1892
+ assert len(args) == 1 and not kwargs, (
1893
+ "Use 'group(**kwargs)(callable)' to provide arguments."
1894
+ )
1895
+ (func,) = args
1896
+ args = ()
1897
+
1898
+ if self.group_class is not None and kwargs.get("cls") is None:
1899
+ if self.group_class is type:
1900
+ kwargs["cls"] = type(self)
1901
+ else:
1902
+ kwargs["cls"] = self.group_class
1903
+
1904
+ def decorator(f: t.Callable[..., t.Any]) -> Group:
1905
+ cmd: Group = group(*args, **kwargs)(f)
1906
+ self.add_command(cmd)
1907
+ return cmd
1908
+
1909
+ if func is not None:
1910
+ return decorator(func)
1911
+
1912
+ return decorator
1913
+
1914
+ def result_callback(self, replace: bool = False) -> t.Callable[[F], F]:
1915
+ """Adds a result callback to the command. By default if a
1916
+ result callback is already registered this will chain them but
1917
+ this can be disabled with the `replace` parameter. The result
1918
+ callback is invoked with the return value of the subcommand
1919
+ (or the list of return values from all subcommands if chaining
1920
+ is enabled) as well as the parameters as they would be passed
1921
+ to the main callback.
1922
+
1923
+ Example::
1924
+
1925
+ @click.group()
1926
+ @click.option('-i', '--input', default=23)
1927
+ def cli(input):
1928
+ return 42
1929
+
1930
+ @cli.result_callback()
1931
+ def process_result(result, input):
1932
+ return result + input
1933
+
1934
+ :param replace: if set to `True` an already existing result
1935
+ callback will be removed.
1936
+
1937
+ .. versionchanged:: 8.0
1938
+ Renamed from ``resultcallback``.
1939
+
1940
+ .. versionadded:: 3.0
1941
+ """
1942
+
1943
+ def decorator(f: F) -> F:
1944
+ old_callback = self._result_callback
1945
+
1946
+ if old_callback is None or replace:
1947
+ self._result_callback = f
1948
+ return f
1949
+
1950
+ def function(value: t.Any, /, *args: t.Any, **kwargs: t.Any) -> t.Any:
1951
+ inner = old_callback(value, *args, **kwargs)
1952
+ return f(inner, *args, **kwargs)
1953
+
1954
+ self._result_callback = rv = update_wrapper(t.cast(F, function), f)
1955
+ return rv # type: ignore[return-value]
1956
+
1957
+ return decorator
1958
+
1959
+ def get_command(self, ctx: Context, cmd_name: str) -> Command | None:
1960
+ """Given a context and a command name, this returns a :class:`Command`
1961
+ object if it exists or returns ``None``.
1962
+ """
1963
+ return self.commands.get(cmd_name)
1964
+
1965
+ def list_commands(self, ctx: Context) -> list[str]:
1966
+ """Returns a list of subcommand names in the order they should appear."""
1967
+ return sorted(self.commands)
1968
+
1969
+ def collect_usage_pieces(self, ctx: Context) -> list[str]:
1970
+ rv = super().collect_usage_pieces(ctx)
1971
+ rv.append(self.subcommand_metavar)
1972
+ return rv
1973
+
1974
+ def format_options(self, ctx: Context, formatter: HelpFormatter) -> None:
1975
+ super().format_options(ctx, formatter)
1976
+ self.format_commands(ctx, formatter)
1977
+
1978
+ def format_commands(self, ctx: Context, formatter: HelpFormatter) -> None:
1979
+ """Extra format methods for multi methods that adds all the commands
1980
+ after the options.
1981
+ """
1982
+ commands = []
1983
+ for subcommand in self.list_commands(ctx):
1984
+ cmd = self.get_command(ctx, subcommand)
1985
+ # What is this, the tool lied about a command. Ignore it
1986
+ if cmd is None:
1987
+ continue
1988
+ if cmd.hidden:
1989
+ continue
1990
+
1991
+ commands.append((subcommand, cmd))
1992
+
1993
+ # allow for 3 times the default spacing
1994
+ if len(commands):
1995
+ limit = formatter.width - 6 - max(len(cmd[0]) for cmd in commands)
1996
+
1997
+ rows = []
1998
+ for subcommand, cmd in commands:
1999
+ help = cmd.get_short_help_str(limit)
2000
+ rows.append((subcommand, help))
2001
+
2002
+ if rows:
2003
+ with formatter.section(_("Commands")):
2004
+ formatter.write_dl(rows)
2005
+
2006
+ def parse_args(self, ctx: Context, args: list[str]) -> list[str]:
2007
+ if not args and self.no_args_is_help and not ctx.resilient_parsing:
2008
+ raise NoArgsIsHelpError(ctx)
2009
+
2010
+ rest = super().parse_args(ctx, args)
2011
+
2012
+ if self.chain:
2013
+ ctx._protected_args = rest
2014
+ ctx.args = []
2015
+ elif rest:
2016
+ ctx._protected_args, ctx.args = rest[:1], rest[1:]
2017
+
2018
+ return ctx.args
2019
+
2020
+ def invoke(self, ctx: Context) -> t.Any:
2021
+ def _process_result(value: t.Any) -> t.Any:
2022
+ if self._result_callback is not None:
2023
+ value = ctx.invoke(self._result_callback, value, **ctx.params)
2024
+ return value
2025
+
2026
+ if not ctx._protected_args:
2027
+ if self.invoke_without_command:
2028
+ # No subcommand was invoked, so the result callback is
2029
+ # invoked with the group return value for regular
2030
+ # groups, or an empty list for chained groups.
2031
+ with ctx:
2032
+ rv = super().invoke(ctx)
2033
+ return _process_result([] if self.chain else rv)
2034
+ ctx.fail(_("Missing command."))
2035
+
2036
+ # Fetch args back out
2037
+ args = [*ctx._protected_args, *ctx.args]
2038
+ ctx.args = []
2039
+ ctx._protected_args = []
2040
+
2041
+ # If we're not in chain mode, we only allow the invocation of a
2042
+ # single command but we also inform the current context about the
2043
+ # name of the command to invoke.
2044
+ if not self.chain:
2045
+ # Make sure the context is entered so we do not clean up
2046
+ # resources until the result processor has worked.
2047
+ with ctx:
2048
+ cmd_name, cmd, args = self.resolve_command(ctx, args)
2049
+ assert cmd is not None
2050
+ ctx.invoked_subcommand = cmd_name
2051
+ super().invoke(ctx)
2052
+ sub_ctx = cmd.make_context(cmd_name, args, parent=ctx)
2053
+ with sub_ctx:
2054
+ return _process_result(sub_ctx.command.invoke(sub_ctx))
2055
+
2056
+ # In chain mode we create the contexts step by step, but after the
2057
+ # base command has been invoked. Because at that point we do not
2058
+ # know the subcommands yet, the invoked subcommand attribute is
2059
+ # set to ``*`` to inform the command that subcommands are executed
2060
+ # but nothing else.
2061
+ with ctx:
2062
+ ctx.invoked_subcommand = "*" if args else None
2063
+ super().invoke(ctx)
2064
+
2065
+ # Otherwise we make every single context and invoke them in a
2066
+ # chain. In that case the return value to the result processor
2067
+ # is the list of all invoked subcommand's results.
2068
+ contexts = []
2069
+ while args:
2070
+ cmd_name, cmd, args = self.resolve_command(ctx, args)
2071
+ assert cmd is not None
2072
+ sub_ctx = cmd.make_context(
2073
+ cmd_name,
2074
+ args,
2075
+ parent=ctx,
2076
+ allow_extra_args=True,
2077
+ allow_interspersed_args=False,
2078
+ )
2079
+ contexts.append(sub_ctx)
2080
+ args, sub_ctx.args = sub_ctx.args, []
2081
+
2082
+ rv = []
2083
+ for sub_ctx in contexts:
2084
+ with sub_ctx:
2085
+ rv.append(sub_ctx.command.invoke(sub_ctx))
2086
+ return _process_result(rv)
2087
+
2088
+ def resolve_command(
2089
+ self, ctx: Context, args: list[str]
2090
+ ) -> tuple[str | None, Command | None, list[str]]:
2091
+ cmd_name = make_str(args[0])
2092
+
2093
+ # Get the command
2094
+ cmd = self.get_command(ctx, cmd_name)
2095
+
2096
+ # If we can't find the command but there is a normalization
2097
+ # function available, we try with that one.
2098
+ if cmd is None and ctx.token_normalize_func is not None:
2099
+ cmd_name = ctx.token_normalize_func(cmd_name)
2100
+ cmd = self.get_command(ctx, cmd_name)
2101
+
2102
+ # If we don't find the command we want to show an error message
2103
+ # to the user that it was not provided. However, there is
2104
+ # something else we should do: if the first argument looks like
2105
+ # an option we want to kick off parsing again for arguments to
2106
+ # resolve things like --help which now should go to the main
2107
+ # place.
2108
+ if cmd is None and not ctx.resilient_parsing:
2109
+ if _split_opt(cmd_name)[0]:
2110
+ self.parse_args(ctx, args)
2111
+ raise NoSuchCommand(cmd_name, possibilities=self.commands, ctx=ctx)
2112
+ return cmd_name if cmd else None, cmd, args[1:]
2113
+
2114
+ def shell_complete(self, ctx: Context, incomplete: str) -> list[CompletionItem]:
2115
+ """Return a list of completions for the incomplete value. Looks
2116
+ at the names of options, subcommands, and chained
2117
+ multi-commands.
2118
+
2119
+ :param ctx: Invocation context for this command.
2120
+ :param incomplete: Value being completed. May be empty.
2121
+
2122
+ .. versionadded:: 8.0
2123
+ """
2124
+ from click.shell_completion import CompletionItem
2125
+
2126
+ results = [
2127
+ CompletionItem(name, help=command.get_short_help_str())
2128
+ for name, command in _complete_visible_commands(ctx, incomplete)
2129
+ ]
2130
+ results.extend(super().shell_complete(ctx, incomplete))
2131
+ return results
2132
+
2133
+
2134
+ class _MultiCommand(Group, metaclass=_FakeSubclassCheck):
2135
+ """
2136
+ .. deprecated:: 8.2
2137
+ Will be removed in Click 9.0. Use ``Group`` instead.
2138
+ """
2139
+
2140
+
2141
+ class CommandCollection(Group):
2142
+ """A :class:`Group` that looks up subcommands on other groups. If a command
2143
+ is not found on this group, each registered source is checked in order.
2144
+ Parameters on a source are not added to this group, and a source's callback
2145
+ is not invoked when invoking its commands. In other words, this "flattens"
2146
+ commands in many groups into this one group.
2147
+
2148
+ :param name: The name of the group command.
2149
+ :param sources: A list of :class:`Group` objects to look up commands from.
2150
+ :param kwargs: Other arguments passed to :class:`Group`.
2151
+
2152
+ .. versionchanged:: 8.2
2153
+ This is a subclass of ``Group``. Commands are looked up first on this
2154
+ group, then each of its sources.
2155
+ """
2156
+
2157
+ sources: list[Group]
2158
+
2159
+ def __init__(
2160
+ self,
2161
+ name: str | None = None,
2162
+ sources: list[Group] | None = None,
2163
+ **kwargs: t.Any,
2164
+ ) -> None:
2165
+ super().__init__(name, **kwargs)
2166
+ #: The list of registered groups.
2167
+ self.sources = sources or []
2168
+
2169
+ def add_source(self, group: Group) -> None:
2170
+ """Add a group as a source of commands."""
2171
+ self.sources.append(group)
2172
+
2173
+ def get_command(self, ctx: Context, cmd_name: str) -> Command | None:
2174
+ rv = super().get_command(ctx, cmd_name)
2175
+
2176
+ if rv is not None:
2177
+ return rv
2178
+
2179
+ for source in self.sources:
2180
+ rv = source.get_command(ctx, cmd_name)
2181
+
2182
+ if rv is not None:
2183
+ if self.chain:
2184
+ _check_nested_chain(self, cmd_name, rv)
2185
+
2186
+ return rv
2187
+
2188
+ return None
2189
+
2190
+ def list_commands(self, ctx: Context) -> list[str]:
2191
+ rv: set[str] = set(super().list_commands(ctx))
2192
+
2193
+ for source in self.sources:
2194
+ rv.update(source.list_commands(ctx))
2195
+
2196
+ return sorted(rv)
2197
+
2198
+
2199
+ def _check_iter(value: cabc.Iterable[V]) -> cabc.Iterator[V]:
2200
+ """Check if the value is iterable but not a string. Raises a type
2201
+ error, or return an iterator over the value.
2202
+ """
2203
+ if isinstance(value, str):
2204
+ raise TypeError
2205
+
2206
+ return iter(value)
2207
+
2208
+
2209
+ class Parameter(ABC):
2210
+ r"""A parameter to a command comes in two versions: they are either
2211
+ :class:`Option`\s or :class:`Argument`\s. Other subclasses are currently
2212
+ not supported by design as some of the internals for parsing are
2213
+ intentionally not finalized.
2214
+
2215
+ Some settings are supported by both options and arguments.
2216
+
2217
+ :param param_decls: the parameter declarations for this option or
2218
+ argument. This is a list of flags or argument
2219
+ names.
2220
+ :param type: the type that should be used. Either a :class:`ParamType`
2221
+ or a Python type. The latter is converted into the former
2222
+ automatically if supported.
2223
+ :param required: controls if this is optional or not.
2224
+ :param default: the default value if omitted. This can also be a callable,
2225
+ in which case it's invoked when the default is needed
2226
+ without any arguments.
2227
+ :param callback: A function to further process or validate the value
2228
+ after type conversion. It is called as ``f(ctx, param, value)``
2229
+ and must return the value. It is called for all sources,
2230
+ including prompts.
2231
+ :param nargs: the number of arguments to match. If not ``1`` the return
2232
+ value is a tuple instead of single value. The default for
2233
+ nargs is ``1`` (except if the type is a tuple, then it's
2234
+ the arity of the tuple). If ``nargs=-1``, all remaining
2235
+ parameters are collected.
2236
+ :param metavar: how the value is represented in the help page.
2237
+ :param expose_value: if this is `True` then the value is passed onwards
2238
+ to the command callback and stored on the context,
2239
+ otherwise it's skipped.
2240
+ :param is_eager: eager values are processed before non eager ones. This
2241
+ should not be set for arguments or it will inverse the
2242
+ order of processing.
2243
+ :param envvar: environment variable(s) that are used to provide a default value for
2244
+ this parameter. This can be a string or a sequence of strings. If a sequence is
2245
+ given, only the first non-empty environment variable is used for the parameter.
2246
+ :param shell_complete: A function that returns custom shell
2247
+ completions. Used instead of the param's type completion if
2248
+ given. Takes ``ctx, param, incomplete`` and must return a list
2249
+ of :class:`~click.shell_completion.CompletionItem` or a list of
2250
+ strings.
2251
+ :param deprecated: If ``True`` or non-empty string, issues a message
2252
+ indicating that the argument is deprecated and highlights
2253
+ its deprecation in --help. The message can be customized
2254
+ by using a string as the value. A deprecated parameter
2255
+ cannot be required, a ValueError will be raised otherwise.
2256
+ :param help: the help string. It is dedented and get a deprecated label if
2257
+ appropriate.
2258
+
2259
+ .. versionchanged:: 8.5.1
2260
+ New ``help`` parameter to replace the one from :class:`Option` and
2261
+ :class:`Argument`.
2262
+
2263
+ .. versionchanged:: 8.2.0
2264
+ Introduction of ``deprecated``.
2265
+
2266
+ .. versionchanged:: 8.2
2267
+ Adding duplicate parameter names to a :class:`~click.core.Command` will
2268
+ result in a ``UserWarning`` being shown.
2269
+
2270
+ .. versionchanged:: 8.2
2271
+ Adding duplicate parameter names to a :class:`~click.core.Command` will
2272
+ result in a ``UserWarning`` being shown.
2273
+
2274
+ .. versionchanged:: 8.0
2275
+ ``process_value`` validates required parameters and bounded
2276
+ ``nargs``, and invokes the parameter callback before returning
2277
+ the value. This allows the callback to validate prompts.
2278
+ ``full_process_value`` is removed.
2279
+
2280
+ .. versionchanged:: 8.0
2281
+ ``autocompletion`` is renamed to ``shell_complete`` and has new
2282
+ semantics described above. The old name is deprecated and will
2283
+ be removed in 8.1, until then it will be wrapped to match the
2284
+ new requirements.
2285
+
2286
+ .. versionchanged:: 8.0
2287
+ For ``multiple=True, nargs>1``, the default must be a list of
2288
+ tuples.
2289
+
2290
+ .. versionchanged:: 8.0
2291
+ Setting a default is no longer required for ``nargs>1``, it will
2292
+ default to ``None``. ``multiple=True`` or ``nargs=-1`` will
2293
+ default to ``()``.
2294
+
2295
+ .. versionchanged:: 7.1
2296
+ Empty environment variables are ignored rather than taking the
2297
+ empty string value. This makes it possible for scripts to clear
2298
+ variables if they can't unset them.
2299
+
2300
+ .. versionchanged:: 2.0
2301
+ Changed signature for parameter callback to also be passed the
2302
+ parameter. The old callback format will still work, but it will
2303
+ raise a warning to give you a chance to migrate the code easier.
2304
+ """
2305
+
2306
+ param_type_name = "parameter"
2307
+
2308
+ name: str
2309
+ opts: list[str]
2310
+ secondary_opts: list[str]
2311
+ # `Parameter.type` is annotated in `__init__` to avoid confusing mypy
2312
+ required: bool
2313
+ callback: t.Callable[[Context, Parameter, t.Any], t.Any] | None
2314
+ nargs: int
2315
+ multiple: bool
2316
+ expose_value: bool
2317
+ default: t.Any | t.Callable[[], t.Any] | None
2318
+ _default_explicit: bool
2319
+ is_eager: bool
2320
+ metavar: str | None
2321
+ envvar: str | cabc.Sequence[str] | None
2322
+ _custom_shell_complete: (
2323
+ t.Callable[[Context, Parameter, str], list[CompletionItem] | list[str]] | None
2324
+ )
2325
+ deprecated: bool | str
2326
+ help: str | None
2327
+
2328
+ def __init__(
2329
+ self,
2330
+ param_decls: cabc.Sequence[str] | None = None,
2331
+ type: types.ParamType[t.Any] | t.Any | None = None,
2332
+ required: bool = False,
2333
+ # XXX The default historically embed two concepts:
2334
+ # - the declaration of a Parameter object carrying the default (handy to
2335
+ # arbitrage the default value of coupled Parameters sharing the same
2336
+ # self.name, like flag options),
2337
+ # - and the actual value of the default.
2338
+ # It is confusing and is the source of many issues. In the future, we might
2339
+ # think of splitting it in two, not unlike Option.is_flag and Option.flag_value:
2340
+ # we could have something like Parameter.is_default and Parameter.default_value.
2341
+ default: t.Any | t.Callable[[], t.Any] | None = UNSET,
2342
+ callback: t.Callable[[Context, Parameter, t.Any], t.Any] | None = None,
2343
+ nargs: int | None = None,
2344
+ multiple: bool = False,
2345
+ metavar: str | None = None,
2346
+ expose_value: bool = True,
2347
+ is_eager: bool = False,
2348
+ envvar: str | cabc.Sequence[str] | None = None,
2349
+ shell_complete: t.Callable[
2350
+ [Context, Parameter, str], list[CompletionItem] | list[str]
2351
+ ]
2352
+ | None = None,
2353
+ deprecated: bool | str = False,
2354
+ help: str | None = None,
2355
+ ) -> None:
2356
+ self.name, self.opts, self.secondary_opts = self._parse_decls(
2357
+ param_decls or (), expose_value
2358
+ )
2359
+ self.type: types.ParamType[t.Any] = types.convert_type(type, default)
2360
+
2361
+ # Default nargs to what the type tells us if we have that
2362
+ # information available.
2363
+ if nargs is None:
2364
+ if self.type.is_composite:
2365
+ nargs = self.type.arity
2366
+ else:
2367
+ nargs = 1
2368
+
2369
+ self.required = required
2370
+ self.callback = callback
2371
+ self.nargs = nargs
2372
+ self.multiple = multiple
2373
+ self.expose_value = expose_value
2374
+ self.default = default
2375
+ # Whether the user passed ``default`` explicitly to the constructor. Captured
2376
+ # before any auto-derived default (like ``0`` for a ``count`` :class:`Option`)
2377
+ # replaces the :data:`UNSET` sentinel, so it remains ``False`` when the default
2378
+ # was inferred rather than chosen.
2379
+ self._default_explicit = default is not UNSET
2380
+ self.is_eager = is_eager
2381
+ self.metavar = metavar
2382
+ self.envvar = envvar
2383
+ self._custom_shell_complete = shell_complete
2384
+ self.deprecated = deprecated
2385
+
2386
+ if help:
2387
+ help = inspect.cleandoc(help)
2388
+
2389
+ if deprecated:
2390
+ label = _format_deprecated_label(deprecated)
2391
+ help = f"{help} {label}" if help else label
2392
+
2393
+ self.help = help
2394
+
2395
+ if __debug__:
2396
+ if self.type.is_composite and nargs != self.type.arity:
2397
+ raise ValueError(
2398
+ f"'nargs' must be {self.type.arity} (or None) for"
2399
+ f" type {self.type!r}, but it was {nargs}."
2400
+ )
2401
+
2402
+ if required and deprecated:
2403
+ raise ValueError(
2404
+ f"The {self.param_type_name} '{self.human_readable_name}' "
2405
+ "is deprecated and still required. A deprecated "
2406
+ f"{self.param_type_name} cannot be required."
2407
+ )
2408
+
2409
+ @staticmethod
2410
+ def _hide_unset(value: t.Any) -> t.Any:
2411
+ """Present the internal :data:`UNSET` sentinel as ``None`` at a boundary that
2412
+ exposes a parameter's value (introspection, prompts), keeping the sentinel an
2413
+ implementation detail.
2414
+ """
2415
+ return None if value is UNSET else value
2416
+
2417
+ def to_info_dict(self) -> dict[str, t.Any]:
2418
+ """Gather information that could be useful for a tool generating
2419
+ user-facing documentation.
2420
+
2421
+ Use :meth:`click.Context.to_info_dict` to traverse the entire
2422
+ CLI structure.
2423
+
2424
+ .. versionchanged:: 8.3.0
2425
+ Returns ``None`` for the :attr:`default` if it was not set.
2426
+
2427
+ .. versionadded:: 8.0
2428
+ """
2429
+ return {
2430
+ "name": self.name,
2431
+ "param_type_name": self.param_type_name,
2432
+ "opts": self.opts,
2433
+ "secondary_opts": self.secondary_opts,
2434
+ "type": self.type.to_info_dict(),
2435
+ "required": self.required,
2436
+ "nargs": self.nargs,
2437
+ "multiple": self.multiple,
2438
+ "default": self._hide_unset(self.default),
2439
+ "envvar": self.envvar,
2440
+ "help": self.help,
2441
+ }
2442
+
2443
+ def __repr__(self) -> str:
2444
+ return f"<{self.__class__.__name__} {self.name}>"
2445
+
2446
+ @abstractmethod
2447
+ def _parse_decls(
2448
+ self, decls: cabc.Sequence[str], expose_value: bool
2449
+ ) -> tuple[str, list[str], list[str]]: ...
2450
+
2451
+ @property
2452
+ def human_readable_name(self) -> str:
2453
+ """Returns the human readable name of this parameter. This is the
2454
+ same as the name for options, but the metavar for arguments.
2455
+ """
2456
+ return self.name
2457
+
2458
+ def make_metavar(self, ctx: Context) -> str:
2459
+ if self.metavar is not None:
2460
+ return self.metavar
2461
+
2462
+ metavar = self.type.get_metavar(param=self, ctx=ctx)
2463
+
2464
+ if metavar is None:
2465
+ metavar = self.type.name.upper()
2466
+
2467
+ if self.nargs != 1:
2468
+ metavar += "..."
2469
+
2470
+ return metavar
2471
+
2472
+ @t.overload
2473
+ def get_default(
2474
+ self, ctx: Context, call: t.Literal[True] = True
2475
+ ) -> t.Any | None: ...
2476
+
2477
+ @t.overload
2478
+ def get_default(
2479
+ self, ctx: Context, call: bool = ...
2480
+ ) -> t.Any | t.Callable[[], t.Any] | None: ...
2481
+
2482
+ def get_default(
2483
+ self, ctx: Context, call: bool = True
2484
+ ) -> t.Any | t.Callable[[], t.Any] | None:
2485
+ """Get the default for the parameter. Tries
2486
+ :meth:`Context.lookup_default` first, then the local default.
2487
+
2488
+ :param ctx: Current context.
2489
+ :param call: If the default is a callable, call it. Disable to
2490
+ return the callable instead.
2491
+
2492
+ .. versionchanged:: 8.0.2
2493
+ Type casting is no longer performed when getting a default.
2494
+
2495
+ .. versionchanged:: 8.0.1
2496
+ Type casting can fail in resilient parsing mode. Invalid
2497
+ defaults will not prevent showing help text.
2498
+
2499
+ .. versionchanged:: 8.0
2500
+ Looks at ``ctx.default_map`` first.
2501
+
2502
+ .. versionchanged:: 8.0
2503
+ Added the ``call`` parameter.
2504
+ """
2505
+ value = ctx.lookup_default(self.name, call=False)
2506
+
2507
+ if value is None and not ctx._default_map_has(self.name):
2508
+ value = self.default
2509
+
2510
+ if call and callable(value):
2511
+ value = value()
2512
+
2513
+ return value
2514
+
2515
+ @abstractmethod
2516
+ def add_to_parser(self, parser: _OptionParser, ctx: Context) -> None: ...
2517
+
2518
+ def consume_value(
2519
+ self, ctx: Context, opts: cabc.Mapping[str, t.Any]
2520
+ ) -> tuple[t.Any, ParameterSource]:
2521
+ """Returns the parameter value produced by the parser.
2522
+
2523
+ If the parser did not produce a value from user input, the value is either
2524
+ sourced from the environment variable, the default map, or the parameter's
2525
+ default value. In that order of precedence.
2526
+
2527
+ If no value is found, an internal sentinel value is returned.
2528
+
2529
+ :meta private:
2530
+ """
2531
+ # Collect from the parse the value passed by the user to the CLI.
2532
+ value = opts.get(self.name, UNSET)
2533
+ # If the value is set, it means it was sourced from the command line by the
2534
+ # parser, otherwise it left unset by default.
2535
+ source = (
2536
+ ParameterSource.COMMANDLINE
2537
+ if value is not UNSET
2538
+ else ParameterSource.DEFAULT
2539
+ )
2540
+
2541
+ if value is UNSET:
2542
+ envvar_value = self.value_from_envvar(ctx)
2543
+ if envvar_value is not None:
2544
+ value = envvar_value
2545
+ source = ParameterSource.ENVIRONMENT
2546
+
2547
+ if value is UNSET:
2548
+ default_map_value = ctx.lookup_default(self.name)
2549
+ if default_map_value is not None or ctx._default_map_has(self.name):
2550
+ value = default_map_value
2551
+ source = ParameterSource.DEFAULT_MAP
2552
+
2553
+ # A string from default_map must be split for multi-value
2554
+ # parameters, matching value_from_envvar behavior.
2555
+ if isinstance(value, str) and self.nargs != 1:
2556
+ value = self.type.split_envvar_value(value)
2557
+
2558
+ if value is UNSET:
2559
+ default_value = self.get_default(ctx)
2560
+ if default_value is not UNSET:
2561
+ value = default_value
2562
+ source = ParameterSource.DEFAULT
2563
+
2564
+ return value, source
2565
+
2566
+ def type_cast_value(self, ctx: Context, value: t.Any) -> t.Any:
2567
+ """Convert and validate a value against the parameter's
2568
+ :attr:`type`, :attr:`multiple`, and :attr:`nargs`.
2569
+ """
2570
+ if value is None:
2571
+ if self.multiple or self.nargs == -1:
2572
+ return ()
2573
+ else:
2574
+ return value
2575
+
2576
+ def check_iter(value: t.Any) -> cabc.Iterator[t.Any]:
2577
+ try:
2578
+ return _check_iter(value)
2579
+ except TypeError:
2580
+ # This should only happen when passing in args manually,
2581
+ # the parser should construct an iterable when parsing
2582
+ # the command line.
2583
+ raise BadParameter(
2584
+ _("Value must be an iterable."), ctx=ctx, param=self
2585
+ ) from None
2586
+
2587
+ # Define the conversion function based on nargs and type.
2588
+
2589
+ if self.nargs == 1 or self.type.is_composite:
2590
+
2591
+ def convert(value: t.Any) -> t.Any:
2592
+ return self.type(value, param=self, ctx=ctx)
2593
+
2594
+ elif self.nargs == -1:
2595
+
2596
+ def convert(value: t.Any) -> t.Any: # tuple[t.Any, ...]
2597
+ return tuple(self.type(x, self, ctx) for x in check_iter(value))
2598
+
2599
+ else: # nargs > 1
2600
+
2601
+ def convert(value: t.Any) -> t.Any: # tuple[t.Any, ...]
2602
+ value = tuple(check_iter(value))
2603
+
2604
+ if len(value) != self.nargs:
2605
+ raise BadParameter(
2606
+ ngettext(
2607
+ "Takes {nargs} values but 1 was given.",
2608
+ "Takes {nargs} values but {len} were given.",
2609
+ len(value),
2610
+ ).format(nargs=self.nargs, len=len(value)),
2611
+ ctx=ctx,
2612
+ param=self,
2613
+ )
2614
+
2615
+ return tuple(self.type(x, self, ctx) for x in value)
2616
+
2617
+ if self.multiple:
2618
+ return tuple(convert(x) for x in check_iter(value))
2619
+
2620
+ return convert(value)
2621
+
2622
+ def value_is_missing(self, value: t.Any) -> bool:
2623
+ """A value is considered missing if:
2624
+
2625
+ - it is :attr:`UNSET`,
2626
+ - or if it is an empty sequence while the parameter is suppose to have
2627
+ non-single value (i.e. :attr:`nargs` is not ``1`` or :attr:`multiple` is
2628
+ set).
2629
+
2630
+ :meta private:
2631
+ """
2632
+ if value is UNSET:
2633
+ return True
2634
+
2635
+ if (self.nargs != 1 or self.multiple) and value == ():
2636
+ return True
2637
+
2638
+ return False
2639
+
2640
+ def process_value(self, ctx: Context, value: t.Any) -> t.Any:
2641
+ """Process the value of this parameter:
2642
+
2643
+ 1. Type cast the value using :meth:`type_cast_value`.
2644
+ 2. Check if the value is missing (see: :meth:`value_is_missing`), and raise
2645
+ :exc:`MissingParameter` if it is required.
2646
+ 3. If a :attr:`callback` is set, call it to have the value replaced by the
2647
+ result of the callback. If the value was not set, the callback receive
2648
+ ``None``. This keep the legacy behavior as it was before the introduction of
2649
+ the :attr:`UNSET` sentinel.
2650
+
2651
+ :meta private:
2652
+ """
2653
+ # shelter `type_cast_value` from ever seeing an `UNSET` value by handling the
2654
+ # cases in which `UNSET` gets special treatment explicitly at this layer.
2655
+ # Subclasses can override the public `type_cast_value`, so the internal sentinel
2656
+ # must not reach it. A missing value skips the call rather than passing `None`,
2657
+ # which `value_is_missing` would not detect.
2658
+ if value is UNSET:
2659
+ if self.multiple or self.nargs == -1:
2660
+ value = ()
2661
+ else:
2662
+ value = self.type_cast_value(ctx, value)
2663
+
2664
+ if self.required and self.value_is_missing(value):
2665
+ raise MissingParameter(ctx=ctx, param=self)
2666
+
2667
+ if self.callback is not None:
2668
+ # Legacy case: UNSET is not exposed directly to the callback, but converted
2669
+ # to None.
2670
+ if value is UNSET:
2671
+ value = None
2672
+
2673
+ # Search for parameters with UNSET values in the context.
2674
+ unset_keys = {k: None for k, v in ctx.params.items() if v is UNSET}
2675
+ # No UNSET values, call the callback as usual.
2676
+ if not unset_keys:
2677
+ value = self.callback(ctx, self, value)
2678
+
2679
+ # Legacy case: provide a temporarily manipulated context to the callback to
2680
+ # hide UNSET values as None.
2681
+ else:
2682
+ # Add another layer to the context stack to clearly hint that the
2683
+ # context is temporarily modified.
2684
+ with ctx:
2685
+ # Update the context parameters to replace UNSET with None.
2686
+ ctx.params.update(unset_keys)
2687
+ # Feed these fake context parameters to the callback.
2688
+ value = self.callback(ctx, self, value)
2689
+ # Restore the UNSET values in the context parameters.
2690
+ ctx.params.update(
2691
+ {
2692
+ k: UNSET
2693
+ for k in unset_keys
2694
+ # Only restore keys that are present and still None, in case
2695
+ # the callback modified other parameters.
2696
+ if k in ctx.params and ctx.params[k] is None
2697
+ }
2698
+ )
2699
+
2700
+ return value
2701
+
2702
+ def resolve_envvar_value(self, ctx: Context) -> str | None:
2703
+ """Returns the value found in the environment variable(s) attached to this
2704
+ parameter.
2705
+
2706
+ Environment variables values are `always returned as strings
2707
+ <https://docs.python.org/3/library/os.html#os.environ>`_.
2708
+
2709
+ This method returns ``None`` if:
2710
+
2711
+ - the :attr:`envvar` property is not set on the :class:`Parameter`,
2712
+ - the environment variable is not found in the environment,
2713
+ - the variable is found in the environment but its value is empty (i.e. the
2714
+ environment variable is present but has an empty string).
2715
+
2716
+ If :attr:`envvar` is setup with multiple environment variables,
2717
+ then only the first non-empty value is returned.
2718
+
2719
+ .. caution::
2720
+
2721
+ The raw value extracted from the environment is not normalized and is
2722
+ returned as-is. Any normalization or reconciliation is performed later by
2723
+ the :class:`Parameter`'s :attr:`type`.
2724
+
2725
+ :meta private:
2726
+ """
2727
+ if not self.envvar:
2728
+ return None
2729
+
2730
+ if isinstance(self.envvar, str):
2731
+ rv = os.environ.get(self.envvar)
2732
+
2733
+ if rv:
2734
+ return rv
2735
+ else:
2736
+ for envvar in self.envvar:
2737
+ rv = os.environ.get(envvar)
2738
+
2739
+ # Return the first non-empty value of the list of environment variables.
2740
+ if rv:
2741
+ return rv
2742
+ # Else, absence of value is interpreted as an environment variable that
2743
+ # is not set, so proceed to the next one.
2744
+
2745
+ return None
2746
+
2747
+ def value_from_envvar(self, ctx: Context) -> str | cabc.Sequence[str] | None:
2748
+ """Process the raw environment variable string for this parameter.
2749
+
2750
+ Returns the string as-is or splits it into a sequence of strings if the
2751
+ parameter is expecting multiple values (i.e. its :attr:`nargs` property is set
2752
+ to a value other than ``1``).
2753
+
2754
+ :meta private:
2755
+ """
2756
+ rv = self.resolve_envvar_value(ctx)
2757
+
2758
+ if rv is not None and self.nargs != 1:
2759
+ return self.type.split_envvar_value(rv)
2760
+
2761
+ return rv
2762
+
2763
+ def handle_parse_result(
2764
+ self, ctx: Context, opts: cabc.Mapping[str, t.Any], args: list[str]
2765
+ ) -> tuple[t.Any, list[str]]:
2766
+ """Process the value produced by the parser from user input.
2767
+
2768
+ Always process the value through the Parameter's :attr:`type`, wherever it
2769
+ comes from.
2770
+
2771
+ If the parameter is deprecated, this method warn the user about it. But only if
2772
+ the value has been explicitly set by the user (and as such, is not coming from
2773
+ a default).
2774
+
2775
+ :meta private:
2776
+ """
2777
+ # Capture the slot's existing state before we mutate
2778
+ # ``_parameter_source`` so the write decision below can compare our
2779
+ # incoming source against the source of the option that already wrote
2780
+ # the slot (if any).
2781
+ existing_value = ctx.params.get(self.name, UNSET)
2782
+ existing_source = ctx.get_parameter_source(self.name)
2783
+ existing_default_explicit = ctx._param_default_explicit.get(self.name, False)
2784
+
2785
+ with augment_usage_errors(ctx, param=self):
2786
+ value, source = self.consume_value(ctx, opts)
2787
+
2788
+ # Record the source before processing so eager callbacks and type
2789
+ # conversion can inspect it. Restored after arbitration if this
2790
+ # option loses a feature-switch group.
2791
+ ctx.set_parameter_source(self.name, source)
2792
+
2793
+ # Display a deprecation warning if necessary.
2794
+ if (
2795
+ self.deprecated
2796
+ and value is not UNSET
2797
+ and source < ParameterSource.DEFAULT_MAP
2798
+ ):
2799
+ message = _(
2800
+ "DeprecationWarning: The {param_type} {name!r} is deprecated."
2801
+ "{extra_message}"
2802
+ ).format(
2803
+ param_type=self.param_type_name,
2804
+ name=self.human_readable_name,
2805
+ extra_message=_format_deprecated_suffix(self.deprecated),
2806
+ )
2807
+ echo(style(message, fg="red"), err=True)
2808
+
2809
+ # Process the value through the parameter's type.
2810
+ try:
2811
+ value = self.process_value(ctx, value)
2812
+ except Exception:
2813
+ if not ctx.resilient_parsing:
2814
+ raise
2815
+ # In resilient parsing mode, we do not want to fail the command if the
2816
+ # value is incompatible with the parameter type, so we reset the value
2817
+ # to UNSET, which will be interpreted as a missing value.
2818
+ value = UNSET
2819
+
2820
+ # Arbitrate the slot when several parameters target the same variable name
2821
+ # (feature-switch groups).
2822
+ slot_empty = existing_value is UNSET
2823
+ more_explicit = existing_source is not None and source < existing_source
2824
+ same_source = existing_source is not None and source == existing_source
2825
+ auto_would_downgrade_explicit = (
2826
+ same_source
2827
+ and source == ParameterSource.DEFAULT
2828
+ and existing_default_explicit
2829
+ and not self._default_explicit
2830
+ )
2831
+ is_winner = (
2832
+ slot_empty
2833
+ or more_explicit
2834
+ or (same_source and not auto_would_downgrade_explicit)
2835
+ )
2836
+
2837
+ if is_winner:
2838
+ if self.expose_value:
2839
+ ctx.params[self.name] = value
2840
+ ctx._param_default_explicit[self.name] = self._default_explicit
2841
+ elif existing_source is not None:
2842
+ # Lost arbitration; restore the winning option's source.
2843
+ ctx.set_parameter_source(self.name, existing_source)
2844
+ # else: ctx.params[self.name] was populated by code that bypassed
2845
+ # handle_parse_result (from another option's callback for example). Keep
2846
+ # the provisional source recorded before process_value so downstream
2847
+ # lookups don't return ``None``.
2848
+
2849
+ return value, args
2850
+
2851
+ def get_help_record(self, ctx: Context) -> tuple[str, str] | None:
2852
+ return None
2853
+
2854
+ def get_usage_pieces(self, ctx: Context) -> list[str]:
2855
+ return []
2856
+
2857
+ def get_error_hint(self, ctx: Context | None) -> str:
2858
+ """Get a stringified version of the param for use in error messages to
2859
+ indicate which param caused the error.
2860
+
2861
+ .. versionchanged:: 8.4.0
2862
+ ``ctx`` can be ``None``.
2863
+ """
2864
+ hint_list = self.opts or [self.human_readable_name]
2865
+ return " / ".join(f"'{x}'" for x in hint_list)
2866
+
2867
+ def shell_complete(self, ctx: Context, incomplete: str) -> list[CompletionItem]:
2868
+ """Return a list of completions for the incomplete value. If a
2869
+ ``shell_complete`` function was given during init, it is used.
2870
+ Otherwise, the :attr:`type`
2871
+ :meth:`~click.types.ParamType[t.Any].shell_complete` function is used.
2872
+
2873
+ :param ctx: Invocation context for this command.
2874
+ :param incomplete: Value being completed. May be empty.
2875
+
2876
+ .. versionadded:: 8.0
2877
+ """
2878
+ if self._custom_shell_complete is not None:
2879
+ results = self._custom_shell_complete(ctx, self, incomplete)
2880
+
2881
+ if results and isinstance(results[0], str):
2882
+ from click.shell_completion import CompletionItem
2883
+
2884
+ results = [CompletionItem(c) for c in results]
2885
+
2886
+ return t.cast("list[CompletionItem]", results)
2887
+
2888
+ return self.type.shell_complete(ctx, self, incomplete)
2889
+
2890
+
2891
+ class Option(Parameter):
2892
+ """Options are usually optional values on the command line and
2893
+ have some extra features that arguments don't have.
2894
+
2895
+ All other parameters are passed onwards to the parameter constructor.
2896
+
2897
+ :param show_default: Show the default value for this option in its
2898
+ help text. Values are not shown by default, unless
2899
+ :attr:`Context.show_default` is ``True``. If this value is a
2900
+ string, it shows that string in parentheses instead of the
2901
+ actual value. This is particularly useful for dynamic options.
2902
+ For single option boolean flags, the default remains hidden if
2903
+ its value is ``False``.
2904
+ :param show_envvar: Controls if an environment variable should be
2905
+ shown on the help page and error messages.
2906
+ Normally, environment variables are not shown.
2907
+ :param prompt: If set to ``True`` or a non empty string then the
2908
+ user will be prompted for input. If set to ``True`` the prompt
2909
+ will be the option name capitalized. A deprecated option cannot be
2910
+ prompted.
2911
+ :param confirmation_prompt: Prompt a second time to confirm the
2912
+ value if it was prompted for. Can be set to a string instead of
2913
+ ``True`` to customize the message.
2914
+ :param prompt_required: If set to ``False``, the user will be
2915
+ prompted for input only when the option was specified as a flag
2916
+ without a value.
2917
+ :param hide_input: If this is ``True`` then the input on the prompt
2918
+ will be hidden from the user. This is useful for password input.
2919
+ :param is_flag: forces this option to act as a flag. The default is
2920
+ auto detection.
2921
+ :param flag_value: which value should be used for this flag if it's
2922
+ enabled. This is set to a boolean automatically if
2923
+ the option string contains a slash to mark two options.
2924
+ :param multiple: if this is set to `True` then the argument is accepted
2925
+ multiple times and recorded. This is similar to ``nargs``
2926
+ in how it works but supports arbitrary number of
2927
+ arguments.
2928
+ :param count: this flag makes an option increment an integer.
2929
+ :param allow_from_autoenv: if this is enabled then the value of this
2930
+ parameter will be pulled from an environment
2931
+ variable in case a prefix is defined on the
2932
+ context.
2933
+ :param help: the help string.
2934
+ :param hidden: hide this option from help outputs.
2935
+ :param attrs: Other command arguments described in :class:`Parameter`.
2936
+
2937
+ .. versionchanged:: 8.4.0
2938
+ Non-basic ``flag_value`` types (not ``str``, ``int``, ``float``, or
2939
+ ``bool``) are passed through unchanged instead of being stringified.
2940
+ Previously, ``type=click.UNPROCESSED`` was required to preserve them.
2941
+
2942
+ .. versionchanged:: 8.2
2943
+ ``envvar`` used with ``flag_value`` will always use the ``flag_value``,
2944
+ previously it would use the value of the environment variable.
2945
+
2946
+ .. versionchanged:: 8.1
2947
+ Help text indentation is cleaned here instead of only in the
2948
+ ``@option`` decorator.
2949
+
2950
+ .. versionchanged:: 8.1
2951
+ The ``show_default`` parameter overrides
2952
+ ``Context.show_default``.
2953
+
2954
+ .. versionchanged:: 8.1
2955
+ The default of a single option boolean flag is not shown if the
2956
+ default value is ``False``.
2957
+
2958
+ .. versionchanged:: 8.0.1
2959
+ ``type`` is detected from ``flag_value`` if given, for basic Python
2960
+ types (``str``, ``int``, ``float``, ``bool``).
2961
+ """
2962
+
2963
+ param_type_name = "option"
2964
+
2965
+ prompt: str | None
2966
+ confirmation_prompt: bool | str
2967
+ prompt_required: bool
2968
+ hide_input: bool
2969
+ hidden: bool
2970
+
2971
+ _flag_needs_value: bool
2972
+ is_flag: bool
2973
+ flag_value: t.Any
2974
+ type: types.ParamType[t.Any]
2975
+ default: t.Any | t.Callable[[], t.Any] | None
2976
+
2977
+ count: bool
2978
+ allow_from_autoenv: bool
2979
+ show_default: bool | str | None
2980
+ show_choices: bool
2981
+ show_envvar: bool
2982
+
2983
+ def __init__(
2984
+ self,
2985
+ param_decls: cabc.Sequence[str] | None = None,
2986
+ show_default: bool | str | None = None,
2987
+ prompt: bool | str = False,
2988
+ confirmation_prompt: bool | str = False,
2989
+ prompt_required: bool = True,
2990
+ hide_input: bool = False,
2991
+ is_flag: bool | None = None,
2992
+ flag_value: t.Any = UNSET,
2993
+ multiple: bool = False,
2994
+ count: bool = False,
2995
+ allow_from_autoenv: bool = True,
2996
+ type: types.ParamType[t.Any] | t.Any | None = None,
2997
+ help: str | None = None,
2998
+ hidden: bool = False,
2999
+ show_choices: bool = True,
3000
+ show_envvar: bool = False,
3001
+ deprecated: bool | str = False,
3002
+ **attrs: t.Any,
3003
+ ) -> None:
3004
+ super().__init__(
3005
+ param_decls,
3006
+ type=type,
3007
+ multiple=multiple,
3008
+ deprecated=deprecated,
3009
+ help=help,
3010
+ **attrs,
3011
+ )
3012
+
3013
+ # Phase 1: prompt-related attributes. ``_infer_flag_kind`` reads ``self.prompt``
3014
+ # and ``self.prompt_required`` so this must run first.
3015
+ if prompt is True:
3016
+ if not self.name:
3017
+ raise TypeError("'name' is required with 'prompt=True'.")
3018
+
3019
+ prompt_text = self.name.replace("_", " ").capitalize()
3020
+ elif prompt is False:
3021
+ prompt_text = None
3022
+ else:
3023
+ prompt_text = prompt
3024
+
3025
+ self.prompt = prompt_text
3026
+ self.confirmation_prompt = confirmation_prompt
3027
+ self.prompt_required = prompt_required
3028
+ self.hide_input = hide_input
3029
+ self.hidden = hidden
3030
+
3031
+ # Phase 2: flag-kind inference.
3032
+ self.is_flag, self._flag_needs_value = self._infer_flag_kind(
3033
+ is_flag, flag_value
3034
+ )
3035
+
3036
+ # Phase 3: type inference. Override the type set by :meth:`Parameter.__init__`
3037
+ # when this option is a flag or a count.
3038
+ self.type = self._pick_type(type, flag_value, count, self.is_flag)
3039
+
3040
+ # Phase 4: store the raw ``flag_value`` and ``count`` settings.
3041
+ # ``self.flag_value`` and ``self.default`` deliberately keep the :data:`UNSET`
3042
+ # sentinel when the user didn't pass them. Auto-derived values are resolved
3043
+ # lazily in :meth:`_resolve_lazy_default` and :attr:`flag_activation_value`.
3044
+ # Keeping the raw values means ``is UNSET`` reliably answers "did the user pass
3045
+ # this?", and any future feature needing the same distinction can reuse it
3046
+ # without reintroducing parallel "was it explicit?" tracking.
3047
+ self.flag_value = flag_value
3048
+ self.count = count
3049
+ if count and self.default is UNSET:
3050
+ self.default = 0
3051
+
3052
+ self.allow_from_autoenv = allow_from_autoenv
3053
+ self.show_default = show_default
3054
+ self.show_choices = show_choices
3055
+ self.show_envvar = show_envvar
3056
+
3057
+ # Phase 5: validate. Raises on illegal kwarg combinations.
3058
+ self._validate(prompt, deprecated)
3059
+
3060
+ @property
3061
+ def is_bool_flag(self) -> bool:
3062
+ """``True`` when this option is a flag with a boolean type.
3063
+
3064
+ Derived from :attr:`is_flag` and :attr:`type`; computed on access so it cannot
3065
+ drift if a subclass replaces :attr:`type` after construction.
3066
+ """
3067
+ return self.is_flag and isinstance(self.type, types.BoolParamType)
3068
+
3069
+ @property
3070
+ def flag_activation_value(self) -> t.Any:
3071
+ """Value the function receives when this flag is activated on the command line.
3072
+
3073
+ Resolves a missing :attr:`flag_value` to ``True`` for actual flag options and
3074
+ ``None`` otherwise. Used by the parser bridge (:meth:`add_to_parser`) and the
3075
+ runtime (:meth:`consume_value`) so :attr:`flag_value` can keep the :data:`UNSET`
3076
+ sentinel for "did the user pass one?" introspection.
3077
+ """
3078
+ if self.flag_value is UNSET:
3079
+ return True if self.is_flag else None
3080
+ return self.flag_value
3081
+
3082
+ def _infer_flag_kind(
3083
+ self, is_flag: bool | None, flag_value: t.Any
3084
+ ) -> tuple[bool, bool]:
3085
+ """Resolve ``is_flag`` and the parser hint ``_flag_needs_value``.
3086
+
3087
+ Returns ``(is_flag, flag_needs_value)``, where ``_flag_needs_value`` tells the
3088
+ parser that the value of this option can be omitted: the option then prompts for
3089
+ a value if ``prompt`` is set, and otherwise uses its flag value. The parser uses
3090
+ it to decide whether to treat the next CLI token as the option's value or as a
3091
+ new option. If ``prompt`` is enabled with ``prompt_required=False``, it opens
3092
+ the door for an interactive value, hence the initial condition.
3093
+ """
3094
+ needs_value = self.prompt is not None and not self.prompt_required
3095
+
3096
+ if is_flag is None:
3097
+ # Implicitly a flag because flag_value was set.
3098
+ if flag_value is not UNSET:
3099
+ return True, needs_value
3100
+ # Not a flag, but when used as a flag it shows a prompt.
3101
+ if needs_value:
3102
+ return False, needs_value
3103
+ # Implicitly a flag because secondary options names were given.
3104
+ if self.secondary_opts:
3105
+ return True, needs_value
3106
+ return False, needs_value
3107
+
3108
+ if is_flag is False and not needs_value:
3109
+ # Explicit ``is_flag=False`` with a flag-like value/default still makes the
3110
+ # option flag-shaped to the parser.
3111
+ needs_value = flag_value is not UNSET or self.default is UNSET
3112
+
3113
+ return bool(is_flag), needs_value
3114
+
3115
+ def _pick_type(
3116
+ self,
3117
+ type_arg: t.Any,
3118
+ flag_value: t.Any,
3119
+ count: bool,
3120
+ is_flag: bool,
3121
+ ) -> types.ParamType[t.Any]:
3122
+ """Pick the final :class:`ParamType` for this option.
3123
+
3124
+ :meth:`Parameter.__init__` already stored ``self.type`` from the explicit
3125
+ ``type`` argument or from ``default``. This method either returns that as-is, or
3126
+ overrides it for flag and count options (which are inferred from ``flag_value``
3127
+ rather than ``default``).
3128
+ """
3129
+ if type_arg is not None:
3130
+ return self.type
3131
+
3132
+ if count:
3133
+ return types.IntRange(min=0)
3134
+
3135
+ if not is_flag:
3136
+ return self.type
3137
+
3138
+ # A flag without a flag_value is a boolean flag.
3139
+ if flag_value is UNSET or isinstance(flag_value, bool):
3140
+ return types.BoolParamType()
3141
+
3142
+ guessed: types.ParamType[t.Any] = types.convert_type(None, flag_value)
3143
+ if (
3144
+ isinstance(guessed, types.StringParamType)
3145
+ and not isinstance(flag_value, str)
3146
+ and flag_value is not None
3147
+ ):
3148
+ # The flag_value type couldn't be auto-detected (not str, int, float, or
3149
+ # bool). Since flag_value is a programmer-provided Python object, not CLI
3150
+ # input, pass it through unchanged instead of stringifying it.
3151
+ return types.UNPROCESSED
3152
+ return guessed
3153
+
3154
+ def _resolve_lazy_default(self, value: t.Any) -> t.Any:
3155
+ """Apply lazy auto-derivations to a default-style value.
3156
+
3157
+ Shared between :meth:`get_default` (the runtime path) and :meth:`to_info_dict`
3158
+ (the introspection path) so the two views cannot drift apart. Callables are
3159
+ *not* invoked here: that is :meth:`get_default`'s responsibility. Rules:
3160
+
3161
+ * ``UNSET`` resolves to ``False`` for a non-required boolean flag, and to ``()``
3162
+ for a non-required, non-prompted multi flag.
3163
+ * ``True`` resolves to :attr:`flag_value` for a non-boolean flag (the "activate
3164
+ this flag by default" shorthand). Boolean flags keep ``True`` as a literal.
3165
+ """
3166
+ if value is UNSET and self.is_flag:
3167
+ if self.multiple and not self.required and not self.prompt:
3168
+ return ()
3169
+ if self.is_bool_flag and not self.required:
3170
+ return False
3171
+ if value is True and self.is_flag and not self.is_bool_flag:
3172
+ # Use ``flag_activation_value`` so an unset ``flag_value`` resolves to
3173
+ # ``True`` (the bool-flag activation value) rather than leaking the
3174
+ # :data:`UNSET` sentinel.
3175
+ return self.flag_activation_value
3176
+ return value
3177
+
3178
+ def _validate(self, prompt: bool | str, deprecated: bool | str) -> None:
3179
+ """Raise :class:`TypeError` / :class:`ValueError` on illegal kwarg combinations.
3180
+
3181
+ Called once, after every other attribute has been assigned, so each check can
3182
+ read the final state.
3183
+ """
3184
+ if not __debug__:
3185
+ return
3186
+ if deprecated and prompt:
3187
+ raise ValueError("`deprecated` options cannot use `prompt`.")
3188
+ if self.nargs == -1:
3189
+ raise TypeError("nargs=-1 is not supported for options.")
3190
+ if not self.is_bool_flag and self.secondary_opts:
3191
+ raise TypeError("Secondary flag is not valid for non-boolean flag.")
3192
+ if self.is_bool_flag and self.hide_input and self.prompt is not None:
3193
+ raise TypeError("'prompt' with 'hide_input' is not valid for boolean flag.")
3194
+ if self.count:
3195
+ if self.multiple:
3196
+ raise TypeError("'count' is not valid with 'multiple'.")
3197
+ if self.is_flag:
3198
+ raise TypeError("'count' is not valid with 'is_flag'.")
3199
+
3200
+ def to_info_dict(self) -> dict[str, t.Any]:
3201
+ """
3202
+ .. versionchanged:: 8.5.0
3203
+ ``default`` and ``flag_value`` reflect the auto-derived values (``False``
3204
+ for unset boolean-flag defaults, ``True`` for unset boolean-flag activation
3205
+ values, etc.) when no explicit value was passed, matching what the function
3206
+ would receive at call time.
3207
+
3208
+ .. versionchanged:: 8.3.0
3209
+ Returns ``None`` for the :attr:`flag_value` if it was not set.
3210
+ """
3211
+ info_dict = super().to_info_dict()
3212
+ info_dict.update(
3213
+ default=self._hide_unset(self._resolve_lazy_default(self.default)),
3214
+ prompt=self.prompt,
3215
+ is_flag=self.is_flag,
3216
+ flag_value=self.flag_activation_value,
3217
+ count=self.count,
3218
+ hidden=self.hidden,
3219
+ )
3220
+ return info_dict
3221
+
3222
+ def get_default(
3223
+ self, ctx: Context, call: bool = True
3224
+ ) -> t.Any | t.Callable[[], t.Any] | None:
3225
+ """Return the default value for this option.
3226
+
3227
+ Several auto-derived defaults are resolved lazily here rather than eagerly in
3228
+ :meth:`__init__`. This keeps :attr:`default` raw at construction time, so
3229
+ ``self.default is UNSET`` reliably answers "did the user pass a default?" for
3230
+ anything that needs to distinguish "absent" from a chosen value. The resolution
3231
+ rules live in :meth:`_resolve_lazy_default`.
3232
+
3233
+ .. versionchanged:: 8.5.0
3234
+ ``UNSET`` defaults for boolean and multi flags are now resolved here instead
3235
+ of being coerced in :meth:`__init__`. Reading :attr:`default` directly
3236
+ returns the user-supplied value (or ``UNSET`` if none was passed) rather
3237
+ than the auto-derived one.
3238
+
3239
+ .. versionchanged:: 8.3.3
3240
+ ``default=True`` is no longer substituted with ``flag_value`` for boolean
3241
+ flags, fixing negative boolean flags like
3242
+ ``flag_value=False, default=True``.
3243
+ """
3244
+ raw = super().get_default(ctx, call=False)
3245
+ value = self._resolve_lazy_default(raw)
3246
+ # Only invoke the value as a callable when the lazy resolver passed it through
3247
+ # unchanged. If the resolver substituted ``True`` -> :attr:`flag_value`, the
3248
+ # result is the programmer-supplied ``flag_value`` (often a class or enum),
3249
+ # which must NOT be instantiated here.
3250
+ if value is raw and call and callable(value):
3251
+ value = value()
3252
+ return value
3253
+
3254
+ def get_error_hint(self, ctx: Context | None) -> str:
3255
+ result = super().get_error_hint(ctx)
3256
+ if self.show_envvar and self.envvar:
3257
+ envvars = [self.envvar] if isinstance(self.envvar, str) else self.envvar
3258
+ # An environment variable is allowed to feature a space or a comma on all
3259
+ # platforms, hence the quotes around each.
3260
+ var_str = ", ".join(f"'{var}'" for var in envvars)
3261
+ result += f" (env var: {var_str})"
3262
+ return result
3263
+
3264
+ def _parse_decls(
3265
+ self, decls: cabc.Sequence[str], expose_value: bool
3266
+ ) -> tuple[str, list[str], list[str]]:
3267
+ opts = []
3268
+ secondary_opts = []
3269
+ name = None
3270
+ possible_names = []
3271
+
3272
+ for decl in decls:
3273
+ if decl.isidentifier():
3274
+ if name is not None:
3275
+ raise TypeError(_("Name '{name}' defined twice").format(name=name))
3276
+ name = decl
3277
+ else:
3278
+ split_char = ";" if decl[:1] == "/" else "/"
3279
+ if split_char in decl:
3280
+ first, second = decl.split(split_char, 1)
3281
+ first = first.rstrip()
3282
+ if first:
3283
+ possible_names.append(_split_opt(first))
3284
+ opts.append(first)
3285
+ second = second.lstrip()
3286
+ if second:
3287
+ secondary_opts.append(second.lstrip())
3288
+ if first == second:
3289
+ raise ValueError(
3290
+ _(
3291
+ "Boolean option {decl!r} cannot use the"
3292
+ " same flag for true/false."
3293
+ ).format(decl=decl)
3294
+ )
3295
+ else:
3296
+ possible_names.append(_split_opt(decl))
3297
+ opts.append(decl)
3298
+
3299
+ if name is None and possible_names:
3300
+ possible_names.sort(key=lambda x: -len(x[0])) # group long options first
3301
+ name = possible_names[0][1].replace("-", "_").lower()
3302
+ if not name.isidentifier():
3303
+ name = None
3304
+
3305
+ if name is None:
3306
+ if not expose_value:
3307
+ return "", opts, secondary_opts
3308
+ raise TypeError(
3309
+ _(
3310
+ "Could not determine name for option with declarations {decls!r}"
3311
+ ).format(decls=decls)
3312
+ )
3313
+
3314
+ if not opts and not secondary_opts:
3315
+ raise TypeError(
3316
+ _(
3317
+ "No options defined but a name was passed ({name})."
3318
+ " Did you mean to declare an argument instead? Did"
3319
+ " you mean to pass '--{name}'?"
3320
+ ).format(name=name)
3321
+ )
3322
+
3323
+ return name, opts, secondary_opts
3324
+
3325
+ def add_to_parser(self, parser: _OptionParser, ctx: Context) -> None:
3326
+ if self.multiple:
3327
+ action = "append"
3328
+ elif self.count:
3329
+ action = "count"
3330
+ else:
3331
+ action = "store"
3332
+
3333
+ if self.is_flag:
3334
+ action = f"{action}_const"
3335
+
3336
+ if self.is_bool_flag and self.secondary_opts:
3337
+ parser.add_option(
3338
+ obj=self, opts=self.opts, dest=self.name, action=action, const=True
3339
+ )
3340
+ parser.add_option(
3341
+ obj=self,
3342
+ opts=self.secondary_opts,
3343
+ dest=self.name,
3344
+ action=action,
3345
+ const=False,
3346
+ )
3347
+ else:
3348
+ parser.add_option(
3349
+ obj=self,
3350
+ opts=self.opts,
3351
+ dest=self.name,
3352
+ action=action,
3353
+ # ``flag_activation_value`` resolves UNSET to the right parser-store
3354
+ # constant (``True`` for bool flags) so the raw :attr:`flag_value`
3355
+ # can keep the sentinel.
3356
+ const=self.flag_activation_value,
3357
+ )
3358
+ else:
3359
+ parser.add_option(
3360
+ obj=self,
3361
+ opts=self.opts,
3362
+ dest=self.name,
3363
+ action=action,
3364
+ nargs=self.nargs,
3365
+ )
3366
+
3367
+ def get_help_spec(self, ctx: Context) -> str:
3368
+ """Returns the left column of the option's help record: its spellings
3369
+ and metavar, like ``-v, --verbose`` or ``-c, --config TEXT``.
3370
+
3371
+ Unlike :meth:`get_help_record`, the spec is produced even when the
3372
+ option is :attr:`hidden`.
3373
+
3374
+ .. versionadded:: 8.5.1
3375
+ """
3376
+ any_prefix_is_slash = False
3377
+
3378
+ def _write_opts(opts: cabc.Sequence[str]) -> str:
3379
+ nonlocal any_prefix_is_slash
3380
+
3381
+ rv, any_slashes = join_options(opts)
3382
+
3383
+ if any_slashes:
3384
+ any_prefix_is_slash = True
3385
+
3386
+ if not self.is_flag and not self.count:
3387
+ rv += f" {self.make_metavar(ctx=ctx)}"
3388
+
3389
+ return rv
3390
+
3391
+ rv = [_write_opts(self.opts)]
3392
+
3393
+ if self.secondary_opts:
3394
+ rv.append(_write_opts(self.secondary_opts))
3395
+
3396
+ return ("; " if any_prefix_is_slash else " / ").join(rv)
3397
+
3398
+ def get_help_record(self, ctx: Context) -> tuple[str, str] | None:
3399
+ if self.hidden:
3400
+ return None
3401
+
3402
+ help = self.help or ""
3403
+
3404
+ extra = self.get_help_extra(ctx)
3405
+ extra_items = []
3406
+ if "envvars" in extra:
3407
+ extra_items.append(
3408
+ _("env var: {var}").format(var=", ".join(extra["envvars"]))
3409
+ )
3410
+ if "default" in extra:
3411
+ extra_items.append(_("default: {default}").format(default=extra["default"]))
3412
+ if "range" in extra:
3413
+ extra_items.append(extra["range"])
3414
+ if "required" in extra:
3415
+ extra_items.append(_(extra["required"]))
3416
+
3417
+ if extra_items:
3418
+ extra_str = "; ".join(extra_items)
3419
+ help = f"{help} [{extra_str}]" if help else f"[{extra_str}]"
3420
+
3421
+ return self.get_help_spec(ctx), help
3422
+
3423
+ def get_help_extra(self, ctx: Context) -> types.OptionHelpExtra:
3424
+ extra: types.OptionHelpExtra = {}
3425
+
3426
+ if self.show_envvar:
3427
+ envvar = self.envvar
3428
+
3429
+ if not envvar and (
3430
+ self.allow_from_autoenv
3431
+ and ctx.auto_envvar_prefix is not None
3432
+ and self.name
3433
+ ):
3434
+ envvar = f"{ctx.auto_envvar_prefix}_{self.name.upper()}"
3435
+
3436
+ if envvar:
3437
+ if isinstance(envvar, str):
3438
+ extra["envvars"] = (envvar,)
3439
+ else:
3440
+ extra["envvars"] = tuple(str(d) for d in envvar)
3441
+
3442
+ # Temporarily enable resilient parsing to avoid type casting
3443
+ # failing for the default. Might be possible to extend this to
3444
+ # help formatting in general.
3445
+ resilient = ctx.resilient_parsing
3446
+ ctx.resilient_parsing = True
3447
+
3448
+ try:
3449
+ default_value = self.get_default(ctx, call=False)
3450
+ finally:
3451
+ ctx.resilient_parsing = resilient
3452
+
3453
+ show_default = False
3454
+ show_default_is_str = False
3455
+
3456
+ if self.show_default is not None:
3457
+ if isinstance(self.show_default, str):
3458
+ show_default_is_str = show_default = True
3459
+ else:
3460
+ show_default = self.show_default
3461
+ elif ctx.show_default is not None:
3462
+ show_default = ctx.show_default
3463
+
3464
+ if show_default_is_str or (
3465
+ show_default and (default_value not in (None, UNSET))
3466
+ ):
3467
+ if show_default_is_str:
3468
+ default_string = f"({self.show_default})"
3469
+ elif isinstance(default_value, (list, tuple)):
3470
+ default_string = ", ".join(str(d) for d in default_value)
3471
+ elif isinstance(default_value, enum.Enum):
3472
+ default_string = default_value.name
3473
+ elif inspect.isfunction(default_value):
3474
+ default_string = _("(dynamic)")
3475
+ elif self.is_bool_flag and self.secondary_opts:
3476
+ # For boolean flags that have distinct True/False opts,
3477
+ # use the opt without prefix instead of the value.
3478
+ default_string = _split_opt(
3479
+ (self.opts if default_value else self.secondary_opts)[0]
3480
+ )[1]
3481
+ elif self.is_bool_flag and not self.secondary_opts and not default_value:
3482
+ default_string = ""
3483
+ elif isinstance(default_value, str) and default_value == "":
3484
+ default_string = '""'
3485
+ else:
3486
+ default_string = str(default_value)
3487
+
3488
+ if default_string:
3489
+ extra["default"] = default_string
3490
+
3491
+ if (
3492
+ isinstance(self.type, types._NumberRangeBase)
3493
+ # skip count with default range type
3494
+ and not (self.count and self.type.min == 0 and self.type.max is None)
3495
+ ):
3496
+ range_str = self.type._describe_range()
3497
+
3498
+ if range_str:
3499
+ extra["range"] = range_str
3500
+
3501
+ if self.required:
3502
+ extra["required"] = "required"
3503
+
3504
+ return extra
3505
+
3506
+ def prompt_for_value(self, ctx: Context) -> t.Any:
3507
+ """This is an alternative flow that can be activated in the full
3508
+ value processing if a value does not exist. It will prompt the
3509
+ user until a valid value exists and then returns the processed
3510
+ value as result.
3511
+ """
3512
+ assert self.prompt is not None
3513
+
3514
+ # Calculate the default before prompting anything to lock in the value before
3515
+ # attempting any user interaction.
3516
+ default = self.get_default(ctx)
3517
+
3518
+ # A boolean flag can use a simplified [y/n] confirmation prompt.
3519
+ if self.is_bool_flag:
3520
+ # If we have no boolean default, we force the user to explicitly provide
3521
+ # one.
3522
+ if default in (UNSET, None):
3523
+ default = None
3524
+ # Nothing prevent you to declare an option that is simultaneously:
3525
+ # 1) auto-detected as a boolean flag,
3526
+ # 2) allowed to prompt, and
3527
+ # 3) still declare a non-boolean default.
3528
+ # This forced casting into a boolean is necessary to align any non-boolean
3529
+ # default to the prompt, which is going to be a [y/n]-style confirmation
3530
+ # because the option is still a boolean flag. That way, instead of [y/n], we
3531
+ # get [Y/n] or [y/N] depending on the truthy value of the default.
3532
+ else:
3533
+ default = bool(default)
3534
+ return confirm(self.prompt, default)
3535
+
3536
+ # If show_default is given, provide this to `prompt` as well,
3537
+ # otherwise we use `prompt`'s default behavior
3538
+ prompt_kwargs: t.Any = {}
3539
+ if self.show_default is not None:
3540
+ prompt_kwargs["show_default"] = self.show_default
3541
+
3542
+ return prompt(
3543
+ self.prompt,
3544
+ # Use ``None`` to inform the prompt() function to reiterate until a valid
3545
+ # value is provided by the user if we have no default.
3546
+ default=self._hide_unset(default),
3547
+ type=self.type,
3548
+ hide_input=self.hide_input,
3549
+ show_choices=self.show_choices,
3550
+ confirmation_prompt=self.confirmation_prompt,
3551
+ value_proc=lambda x: self.process_value(ctx, x),
3552
+ **prompt_kwargs,
3553
+ )
3554
+
3555
+ def resolve_envvar_value(self, ctx: Context) -> str | None:
3556
+ """:class:`Option` resolves its environment variable the same way as
3557
+ :func:`Parameter.resolve_envvar_value`, but it also supports
3558
+ :attr:`Context.auto_envvar_prefix`. If we could not find an environment from
3559
+ the :attr:`envvar` property, we fallback on :attr:`Context.auto_envvar_prefix`
3560
+ to build dynamiccaly the environment variable name using the
3561
+ :python:`{ctx.auto_envvar_prefix}_{self.name.upper()}` template.
3562
+
3563
+ :meta private:
3564
+ """
3565
+ rv = super().resolve_envvar_value(ctx)
3566
+
3567
+ if rv is not None:
3568
+ return rv
3569
+
3570
+ if self.allow_from_autoenv and ctx.auto_envvar_prefix is not None and self.name:
3571
+ envvar = f"{ctx.auto_envvar_prefix}_{self.name.upper()}"
3572
+ rv = os.environ.get(envvar)
3573
+
3574
+ if rv:
3575
+ return rv
3576
+
3577
+ return None
3578
+
3579
+ def value_from_envvar(self, ctx: Context) -> t.Any:
3580
+ """For :class:`Option`, this method processes the raw environment variable
3581
+ string the same way as :func:`Parameter.value_from_envvar` does.
3582
+
3583
+ But in the case of non-boolean flags, the value is analyzed to determine if the
3584
+ flag is activated or not, and returns a boolean of its activation, or the
3585
+ :attr:`flag_value` if the latter is set.
3586
+
3587
+ This method also takes care of repeated options (i.e. options with
3588
+ :attr:`multiple` set to ``True``).
3589
+
3590
+ :meta private:
3591
+ """
3592
+ rv = self.resolve_envvar_value(ctx)
3593
+
3594
+ # Absent environment variable or an empty string is interpreted as unset.
3595
+ if rv is None:
3596
+ return None
3597
+
3598
+ # Non-boolean flags are more liberal in what they accept. But a flag being a
3599
+ # flag, its envvar value still needs to be analyzed to determine if the flag is
3600
+ # activated or not.
3601
+ if self.is_flag and not self.is_bool_flag:
3602
+ # An exact match against ``flag_value`` (a non-bool flag always has one
3603
+ # explicitly set) returns it directly. Otherwise the value is analyzed as a
3604
+ # boolean: a truthy reading activates the flag and the function receives
3605
+ # ``flag_value``; a falsy reading produces ``False``; an unrecognized
3606
+ # reading falls through as ``None``. Folding the substitution here means
3607
+ # :meth:`consume_value` no longer has to repeat it in a source-checked
3608
+ # branch.
3609
+ if rv == self.flag_value:
3610
+ return self.flag_value
3611
+ parsed = types.BoolParamType.str_to_bool(rv)
3612
+ if parsed is None:
3613
+ return None
3614
+ return self.flag_value if parsed else False
3615
+
3616
+ # Split the envvar value if it is allowed to be repeated.
3617
+ value_depth = (self.nargs != 1) + bool(self.multiple)
3618
+ if value_depth > 0:
3619
+ multi_rv = self.type.split_envvar_value(rv)
3620
+ if self.multiple and self.nargs != 1:
3621
+ multi_rv = batch(multi_rv, self.nargs) # type: ignore[assignment]
3622
+
3623
+ return multi_rv
3624
+
3625
+ return rv
3626
+
3627
+ def consume_value(
3628
+ self, ctx: Context, opts: cabc.Mapping[str, Parameter]
3629
+ ) -> tuple[t.Any, ParameterSource]:
3630
+ """For :class:`Option`, the value can be collected from an interactive prompt
3631
+ if the option is a flag that needs a value (and the :attr:`prompt` property is
3632
+ set).
3633
+
3634
+ Additionally, this method handles flag option that are activated without a
3635
+ value, in which case the :attr:`flag_value` is returned.
3636
+
3637
+ :meta private:
3638
+ """
3639
+ value, source = super().consume_value(ctx, opts)
3640
+
3641
+ # The parser emits a sentinel when a flag is allowed to be used without a value.
3642
+ # Resolve it to a prompt or to the activation value depending on the option's
3643
+ # configuration.
3644
+ if value is FLAG_NEEDS_VALUE:
3645
+ # If the option allows for a prompt, start an interaction with the user.
3646
+ if self.prompt is not None and not ctx.resilient_parsing:
3647
+ value = self.prompt_for_value(ctx)
3648
+ source = ParameterSource.PROMPT
3649
+ # Else the flag takes its activation value (resolves UNSET).
3650
+ else:
3651
+ value = self.flag_activation_value
3652
+ source = ParameterSource.COMMANDLINE
3653
+
3654
+ # Re-interpret a multiple option that the parser sent through as a list still
3655
+ # containing the FLAG_NEEDS_VALUE sentinel, replacing each occurrence with the
3656
+ # activation value.
3657
+ elif (
3658
+ self.multiple
3659
+ and value is not UNSET
3660
+ and isinstance(value, cabc.Iterable)
3661
+ and source < ParameterSource.DEFAULT_MAP
3662
+ and any(v is FLAG_NEEDS_VALUE for v in value)
3663
+ ):
3664
+ value = [
3665
+ self.flag_activation_value if v is FLAG_NEEDS_VALUE else v
3666
+ for v in value
3667
+ ]
3668
+ source = ParameterSource.COMMANDLINE
3669
+
3670
+ # The value wasn't set, or used the param's default, prompt for one to the user
3671
+ # if prompting is enabled.
3672
+ elif (
3673
+ (value is UNSET or source >= ParameterSource.DEFAULT_MAP)
3674
+ and self.prompt is not None
3675
+ and (self.required or self.prompt_required)
3676
+ and not ctx.resilient_parsing
3677
+ ):
3678
+ value = self.prompt_for_value(ctx)
3679
+ source = ParameterSource.PROMPT
3680
+
3681
+ return value, source
3682
+
3683
+ def process_value(self, ctx: Context, value: t.Any) -> t.Any:
3684
+ # process_value has to be overridden on Options in order to capture
3685
+ # `value == UNSET` cases before `type_cast_value()` gets called.
3686
+ if self.is_flag and not self.required and self.is_bool_flag and value is UNSET:
3687
+ value = False
3688
+
3689
+ if self.callback is not None:
3690
+ value = self.callback(ctx, self, value)
3691
+
3692
+ return value
3693
+
3694
+ # in the normal case, rely on Parameter.process_value
3695
+ return super().process_value(ctx, value)
3696
+
3697
+
3698
+ class Argument(Parameter):
3699
+ """Arguments are positional parameters to a command. They generally
3700
+ provide fewer features than options but can have infinite ``nargs``
3701
+ and are required by default.
3702
+
3703
+ All parameters are passed onwards to the constructor of :class:`Parameter`.
3704
+
3705
+ :param help: the help string.
3706
+
3707
+ .. versionchanged:: 8.5.0
3708
+ Added the ``help`` parameter.
3709
+ """
3710
+
3711
+ param_type_name = "argument"
3712
+
3713
+ def __init__(
3714
+ self,
3715
+ param_decls: cabc.Sequence[str],
3716
+ required: bool | None = None,
3717
+ help: str | None = None,
3718
+ **attrs: t.Any,
3719
+ ) -> None:
3720
+ # Auto-detect the requirement status of the argument if not explicitly set.
3721
+ if required is None:
3722
+ # The argument gets automatically required if it has no explicit default
3723
+ # value set and is setup to match at least one value.
3724
+ if attrs.get("default", UNSET) is UNSET:
3725
+ required = attrs.get("nargs", 1) > 0
3726
+ # If the argument has a default value, it is not required.
3727
+ else:
3728
+ required = False
3729
+
3730
+ if "multiple" in attrs:
3731
+ raise TypeError("__init__() got an unexpected keyword argument 'multiple'.")
3732
+
3733
+ super().__init__(param_decls, required=required, help=help, **attrs)
3734
+
3735
+ @property
3736
+ def human_readable_name(self) -> str:
3737
+ if self.metavar is not None:
3738
+ return self.metavar
3739
+ return self.name.upper()
3740
+
3741
+ def make_metavar(self, ctx: Context) -> str:
3742
+ if self.metavar is not None:
3743
+ return self.metavar
3744
+ var = self.type.get_metavar(param=self, ctx=ctx)
3745
+ if not var:
3746
+ var = self.name.upper()
3747
+ # Types like ``Choice`` and ``DateTime`` already surround their metavar
3748
+ # with square brackets to enumerate the allowed values. Reuse those
3749
+ # outer brackets as the optional-argument indicator instead of wrapping
3750
+ # the metavar in a second pair, which would produce ``[[a|b|c]]``.
3751
+ already_bracketed = var.startswith("[") and var.endswith("]")
3752
+ if self.deprecated:
3753
+ var += "!"
3754
+ if not self.required and not already_bracketed:
3755
+ var = f"[{var}]"
3756
+ if self.nargs != 1:
3757
+ var += "..."
3758
+ return var
3759
+
3760
+ def _parse_decls(
3761
+ self, decls: cabc.Sequence[str], expose_value: bool
3762
+ ) -> tuple[str, list[str], list[str]]:
3763
+ if not decls:
3764
+ if not expose_value:
3765
+ return "", [], []
3766
+ raise TypeError("Argument is marked as exposed, but does not have a name.")
3767
+ if len(decls) == 1:
3768
+ name = arg = decls[0]
3769
+ name = name.replace("-", "_").lower()
3770
+ else:
3771
+ raise TypeError(
3772
+ _(
3773
+ "Arguments take exactly one parameter declaration, got"
3774
+ " {length}: {decls}."
3775
+ ).format(length=len(decls), decls=decls)
3776
+ )
3777
+ return name, [arg], []
3778
+
3779
+ def get_usage_pieces(self, ctx: Context) -> list[str]:
3780
+ return [self.make_metavar(ctx)]
3781
+
3782
+ def get_help_record(self, ctx: Context) -> tuple[str, str]:
3783
+ """Returns the argument's help row: its metavar and its help text.
3784
+
3785
+ Unlike :meth:`Option.get_help_record`, this never returns ``None``. An
3786
+ argument cannot be hidden, so an undocumented one still gets a row, with
3787
+ an empty description.
3788
+
3789
+ .. versionchanged:: 8.5.1
3790
+ Always returns a tuple. It used to return ``None`` when ``help`` was
3791
+ not set.
3792
+ """
3793
+ return self.make_metavar(ctx), self.help or ""
3794
+
3795
+ def get_error_hint(self, ctx: Context | None) -> str:
3796
+ if ctx is not None:
3797
+ return f"'{self.make_metavar(ctx)}'"
3798
+ return f"'{self.human_readable_name}'"
3799
+
3800
+ def add_to_parser(self, parser: _OptionParser, ctx: Context) -> None:
3801
+ parser.add_argument(dest=self.name, nargs=self.nargs, obj=self)
3802
+
3803
+
3804
+ def __getattr__(name: str) -> object:
3805
+ import warnings
3806
+
3807
+ if name == "BaseCommand":
3808
+ warnings.warn(
3809
+ "'BaseCommand' is deprecated and will be removed in Click 9.0. Use"
3810
+ " 'Command' instead.",
3811
+ DeprecationWarning,
3812
+ stacklevel=2,
3813
+ )
3814
+ return _BaseCommand
3815
+
3816
+ if name == "MultiCommand":
3817
+ warnings.warn(
3818
+ "'MultiCommand' is deprecated and will be removed in Click 9.0. Use"
3819
+ " 'Group' instead.",
3820
+ DeprecationWarning,
3821
+ stacklevel=2,
3822
+ )
3823
+ return _MultiCommand
3824
+
3825
+ raise AttributeError(name)