doctyper 0.15.2__tar.gz

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (613) hide show
  1. doctyper-0.15.2/LICENSE +21 -0
  2. doctyper-0.15.2/PKG-INFO +471 -0
  3. doctyper-0.15.2/README.md +432 -0
  4. doctyper-0.15.2/docs_src/app_dir/tutorial001.py +16 -0
  5. doctyper-0.15.2/docs_src/arguments/default/tutorial001.py +9 -0
  6. doctyper-0.15.2/docs_src/arguments/default/tutorial001_an.py +10 -0
  7. doctyper-0.15.2/docs_src/arguments/default/tutorial002.py +15 -0
  8. doctyper-0.15.2/docs_src/arguments/default/tutorial002_an.py +16 -0
  9. doctyper-0.15.2/docs_src/arguments/envvar/tutorial001.py +9 -0
  10. doctyper-0.15.2/docs_src/arguments/envvar/tutorial001_an.py +10 -0
  11. doctyper-0.15.2/docs_src/arguments/envvar/tutorial002.py +9 -0
  12. doctyper-0.15.2/docs_src/arguments/envvar/tutorial002_an.py +14 -0
  13. doctyper-0.15.2/docs_src/arguments/envvar/tutorial003.py +11 -0
  14. doctyper-0.15.2/docs_src/arguments/envvar/tutorial003_an.py +14 -0
  15. doctyper-0.15.2/docs_src/arguments/help/tutorial001.py +9 -0
  16. doctyper-0.15.2/docs_src/arguments/help/tutorial001_an.py +12 -0
  17. doctyper-0.15.2/docs_src/arguments/help/tutorial002.py +12 -0
  18. doctyper-0.15.2/docs_src/arguments/help/tutorial002_an.py +15 -0
  19. doctyper-0.15.2/docs_src/arguments/help/tutorial003.py +12 -0
  20. doctyper-0.15.2/docs_src/arguments/help/tutorial003_an.py +13 -0
  21. doctyper-0.15.2/docs_src/arguments/help/tutorial004.py +14 -0
  22. doctyper-0.15.2/docs_src/arguments/help/tutorial004_an.py +17 -0
  23. doctyper-0.15.2/docs_src/arguments/help/tutorial005.py +13 -0
  24. doctyper-0.15.2/docs_src/arguments/help/tutorial005_an.py +17 -0
  25. doctyper-0.15.2/docs_src/arguments/help/tutorial006.py +9 -0
  26. doctyper-0.15.2/docs_src/arguments/help/tutorial006_an.py +10 -0
  27. doctyper-0.15.2/docs_src/arguments/help/tutorial007.py +20 -0
  28. doctyper-0.15.2/docs_src/arguments/help/tutorial007_an.py +23 -0
  29. doctyper-0.15.2/docs_src/arguments/help/tutorial008.py +12 -0
  30. doctyper-0.15.2/docs_src/arguments/help/tutorial008_an.py +13 -0
  31. doctyper-0.15.2/docs_src/arguments/optional/tutorial001.py +9 -0
  32. doctyper-0.15.2/docs_src/arguments/optional/tutorial001_an.py +10 -0
  33. doctyper-0.15.2/docs_src/arguments/optional/tutorial002.py +9 -0
  34. doctyper-0.15.2/docs_src/arguments/optional/tutorial002_an.py +10 -0
  35. doctyper-0.15.2/docs_src/arguments/optional/tutorial003.py +9 -0
  36. doctyper-0.15.2/docs_src/commands/arguments/tutorial001.py +17 -0
  37. doctyper-0.15.2/docs_src/commands/callback/tutorial001.py +36 -0
  38. doctyper-0.15.2/docs_src/commands/callback/tutorial002.py +17 -0
  39. doctyper-0.15.2/docs_src/commands/callback/tutorial003.py +22 -0
  40. doctyper-0.15.2/docs_src/commands/callback/tutorial004.py +23 -0
  41. doctyper-0.15.2/docs_src/commands/context/tutorial001.py +25 -0
  42. doctyper-0.15.2/docs_src/commands/context/tutorial002.py +25 -0
  43. doctyper-0.15.2/docs_src/commands/context/tutorial003.py +26 -0
  44. doctyper-0.15.2/docs_src/commands/context/tutorial004.py +15 -0
  45. doctyper-0.15.2/docs_src/commands/help/tutorial001.py +62 -0
  46. doctyper-0.15.2/docs_src/commands/help/tutorial001_an.py +67 -0
  47. doctyper-0.15.2/docs_src/commands/help/tutorial002.py +23 -0
  48. doctyper-0.15.2/docs_src/commands/help/tutorial003.py +25 -0
  49. doctyper-0.15.2/docs_src/commands/help/tutorial004.py +36 -0
  50. doctyper-0.15.2/docs_src/commands/help/tutorial004_an.py +37 -0
  51. doctyper-0.15.2/docs_src/commands/help/tutorial005.py +36 -0
  52. doctyper-0.15.2/docs_src/commands/help/tutorial005_an.py +39 -0
  53. doctyper-0.15.2/docs_src/commands/help/tutorial006.py +55 -0
  54. doctyper-0.15.2/docs_src/commands/help/tutorial007.py +39 -0
  55. doctyper-0.15.2/docs_src/commands/help/tutorial007_an.py +50 -0
  56. doctyper-0.15.2/docs_src/commands/help/tutorial008.py +15 -0
  57. doctyper-0.15.2/docs_src/commands/index/tutorial001.py +12 -0
  58. doctyper-0.15.2/docs_src/commands/index/tutorial002.py +17 -0
  59. doctyper-0.15.2/docs_src/commands/index/tutorial003.py +17 -0
  60. doctyper-0.15.2/docs_src/commands/index/tutorial004.py +17 -0
  61. doctyper-0.15.2/docs_src/commands/name/tutorial001.py +17 -0
  62. doctyper-0.15.2/docs_src/commands/one_or_multiple/tutorial001.py +17 -0
  63. doctyper-0.15.2/docs_src/commands/one_or_multiple/tutorial002.py +21 -0
  64. doctyper-0.15.2/docs_src/commands/options/tutorial001.py +42 -0
  65. doctyper-0.15.2/docs_src/commands/options/tutorial001_an.py +43 -0
  66. doctyper-0.15.2/docs_src/exceptions/tutorial001.py +9 -0
  67. doctyper-0.15.2/docs_src/exceptions/tutorial002.py +12 -0
  68. doctyper-0.15.2/docs_src/exceptions/tutorial003.py +12 -0
  69. doctyper-0.15.2/docs_src/exceptions/tutorial004.py +12 -0
  70. doctyper-0.15.2/docs_src/first_steps/tutorial001.py +9 -0
  71. doctyper-0.15.2/docs_src/first_steps/tutorial002.py +9 -0
  72. doctyper-0.15.2/docs_src/first_steps/tutorial003.py +9 -0
  73. doctyper-0.15.2/docs_src/first_steps/tutorial004.py +12 -0
  74. doctyper-0.15.2/docs_src/first_steps/tutorial005.py +12 -0
  75. doctyper-0.15.2/docs_src/first_steps/tutorial006.py +17 -0
  76. doctyper-0.15.2/docs_src/launch/tutorial001.py +10 -0
  77. doctyper-0.15.2/docs_src/launch/tutorial002.py +21 -0
  78. doctyper-0.15.2/docs_src/multiple_values/arguments_with_multiple_values/tutorial001.py +15 -0
  79. doctyper-0.15.2/docs_src/multiple_values/arguments_with_multiple_values/tutorial002.py +16 -0
  80. doctyper-0.15.2/docs_src/multiple_values/arguments_with_multiple_values/tutorial002_an.py +18 -0
  81. doctyper-0.15.2/docs_src/multiple_values/multiple_options/tutorial001.py +15 -0
  82. doctyper-0.15.2/docs_src/multiple_values/multiple_options/tutorial001_an.py +16 -0
  83. doctyper-0.15.2/docs_src/multiple_values/multiple_options/tutorial002.py +11 -0
  84. doctyper-0.15.2/docs_src/multiple_values/multiple_options/tutorial002_an.py +12 -0
  85. doctyper-0.15.2/docs_src/multiple_values/options_with_multiple_values/tutorial001.py +17 -0
  86. doctyper-0.15.2/docs_src/multiple_values/options_with_multiple_values/tutorial001_an.py +20 -0
  87. doctyper-0.15.2/docs_src/one_file_per_command/__init__.py +0 -0
  88. doctyper-0.15.2/docs_src/one_file_per_command/main.py +13 -0
  89. doctyper-0.15.2/docs_src/one_file_per_command/users/__init__.py +9 -0
  90. doctyper-0.15.2/docs_src/one_file_per_command/users/add.py +8 -0
  91. doctyper-0.15.2/docs_src/one_file_per_command/users/delete.py +8 -0
  92. doctyper-0.15.2/docs_src/one_file_per_command/version.py +8 -0
  93. doctyper-0.15.2/docs_src/options/callback/tutorial001.py +17 -0
  94. doctyper-0.15.2/docs_src/options/callback/tutorial001_an.py +20 -0
  95. doctyper-0.15.2/docs_src/options/callback/tutorial002.py +18 -0
  96. doctyper-0.15.2/docs_src/options/callback/tutorial002_an.py +21 -0
  97. doctyper-0.15.2/docs_src/options/callback/tutorial003.py +20 -0
  98. doctyper-0.15.2/docs_src/options/callback/tutorial003_an.py +23 -0
  99. doctyper-0.15.2/docs_src/options/callback/tutorial004.py +20 -0
  100. doctyper-0.15.2/docs_src/options/callback/tutorial004_an.py +23 -0
  101. doctyper-0.15.2/docs_src/options/help/tutorial001.py +21 -0
  102. doctyper-0.15.2/docs_src/options/help/tutorial001_an.py +24 -0
  103. doctyper-0.15.2/docs_src/options/help/tutorial002.py +26 -0
  104. doctyper-0.15.2/docs_src/options/help/tutorial002_an.py +35 -0
  105. doctyper-0.15.2/docs_src/options/help/tutorial003.py +9 -0
  106. doctyper-0.15.2/docs_src/options/help/tutorial003_an.py +12 -0
  107. doctyper-0.15.2/docs_src/options/help/tutorial004.py +13 -0
  108. doctyper-0.15.2/docs_src/options/help/tutorial004_an.py +14 -0
  109. doctyper-0.15.2/docs_src/options/name/tutorial001.py +9 -0
  110. doctyper-0.15.2/docs_src/options/name/tutorial001_an.py +10 -0
  111. doctyper-0.15.2/docs_src/options/name/tutorial002.py +9 -0
  112. doctyper-0.15.2/docs_src/options/name/tutorial002_an.py +10 -0
  113. doctyper-0.15.2/docs_src/options/name/tutorial003.py +9 -0
  114. doctyper-0.15.2/docs_src/options/name/tutorial003_an.py +10 -0
  115. doctyper-0.15.2/docs_src/options/name/tutorial004.py +9 -0
  116. doctyper-0.15.2/docs_src/options/name/tutorial004_an.py +10 -0
  117. doctyper-0.15.2/docs_src/options/name/tutorial005.py +15 -0
  118. doctyper-0.15.2/docs_src/options/name/tutorial005_an.py +16 -0
  119. doctyper-0.15.2/docs_src/options/password/tutorial001.py +11 -0
  120. doctyper-0.15.2/docs_src/options/password/tutorial001_an.py +13 -0
  121. doctyper-0.15.2/docs_src/options/password/tutorial002.py +15 -0
  122. doctyper-0.15.2/docs_src/options/password/tutorial002_an.py +16 -0
  123. doctyper-0.15.2/docs_src/options/prompt/tutorial001.py +9 -0
  124. doctyper-0.15.2/docs_src/options/prompt/tutorial001_an.py +10 -0
  125. doctyper-0.15.2/docs_src/options/prompt/tutorial002.py +12 -0
  126. doctyper-0.15.2/docs_src/options/prompt/tutorial002_an.py +13 -0
  127. doctyper-0.15.2/docs_src/options/prompt/tutorial003.py +11 -0
  128. doctyper-0.15.2/docs_src/options/prompt/tutorial003_an.py +14 -0
  129. doctyper-0.15.2/docs_src/options/required/tutorial001.py +9 -0
  130. doctyper-0.15.2/docs_src/options/required/tutorial001_an.py +10 -0
  131. doctyper-0.15.2/docs_src/options/required/tutorial002.py +9 -0
  132. doctyper-0.15.2/docs_src/options/version/tutorial001.py +24 -0
  133. doctyper-0.15.2/docs_src/options/version/tutorial001_an.py +25 -0
  134. doctyper-0.15.2/docs_src/options/version/tutorial002.py +29 -0
  135. doctyper-0.15.2/docs_src/options/version/tutorial002_an.py +30 -0
  136. doctyper-0.15.2/docs_src/options/version/tutorial003.py +30 -0
  137. doctyper-0.15.2/docs_src/options/version/tutorial003_an.py +32 -0
  138. doctyper-0.15.2/docs_src/options_autocompletion/tutorial001.py +12 -0
  139. doctyper-0.15.2/docs_src/options_autocompletion/tutorial001_an.py +15 -0
  140. doctyper-0.15.2/docs_src/options_autocompletion/tutorial002.py +21 -0
  141. doctyper-0.15.2/docs_src/options_autocompletion/tutorial002_an.py +23 -0
  142. doctyper-0.15.2/docs_src/options_autocompletion/tutorial003.py +27 -0
  143. doctyper-0.15.2/docs_src/options_autocompletion/tutorial003_an.py +29 -0
  144. doctyper-0.15.2/docs_src/options_autocompletion/tutorial004.py +32 -0
  145. doctyper-0.15.2/docs_src/options_autocompletion/tutorial004_an.py +34 -0
  146. doctyper-0.15.2/docs_src/options_autocompletion/tutorial005.py +29 -0
  147. doctyper-0.15.2/docs_src/options_autocompletion/tutorial005_an.py +31 -0
  148. doctyper-0.15.2/docs_src/options_autocompletion/tutorial006.py +15 -0
  149. doctyper-0.15.2/docs_src/options_autocompletion/tutorial006_an.py +20 -0
  150. doctyper-0.15.2/docs_src/options_autocompletion/tutorial007.py +33 -0
  151. doctyper-0.15.2/docs_src/options_autocompletion/tutorial007_an.py +35 -0
  152. doctyper-0.15.2/docs_src/options_autocompletion/tutorial008.py +36 -0
  153. doctyper-0.15.2/docs_src/options_autocompletion/tutorial008_an.py +38 -0
  154. doctyper-0.15.2/docs_src/options_autocompletion/tutorial009.py +37 -0
  155. doctyper-0.15.2/docs_src/options_autocompletion/tutorial009_an.py +39 -0
  156. doctyper-0.15.2/docs_src/parameter_types/bool/__init__.py +0 -0
  157. doctyper-0.15.2/docs_src/parameter_types/bool/tutorial001.py +12 -0
  158. doctyper-0.15.2/docs_src/parameter_types/bool/tutorial001_an.py +13 -0
  159. doctyper-0.15.2/docs_src/parameter_types/bool/tutorial002.py +16 -0
  160. doctyper-0.15.2/docs_src/parameter_types/bool/tutorial002_an.py +19 -0
  161. doctyper-0.15.2/docs_src/parameter_types/bool/tutorial003.py +12 -0
  162. doctyper-0.15.2/docs_src/parameter_types/bool/tutorial003_an.py +15 -0
  163. doctyper-0.15.2/docs_src/parameter_types/bool/tutorial004.py +12 -0
  164. doctyper-0.15.2/docs_src/parameter_types/bool/tutorial004_an.py +13 -0
  165. doctyper-0.15.2/docs_src/parameter_types/custom_types/__init__.py +0 -0
  166. doctyper-0.15.2/docs_src/parameter_types/custom_types/tutorial001.py +25 -0
  167. doctyper-0.15.2/docs_src/parameter_types/custom_types/tutorial001_an.py +28 -0
  168. doctyper-0.15.2/docs_src/parameter_types/custom_types/tutorial002.py +29 -0
  169. doctyper-0.15.2/docs_src/parameter_types/custom_types/tutorial002_an.py +34 -0
  170. doctyper-0.15.2/docs_src/parameter_types/datetime/__init__.py +0 -0
  171. doctyper-0.15.2/docs_src/parameter_types/datetime/tutorial001.py +12 -0
  172. doctyper-0.15.2/docs_src/parameter_types/datetime/tutorial002.py +15 -0
  173. doctyper-0.15.2/docs_src/parameter_types/datetime/tutorial002_an.py +19 -0
  174. doctyper-0.15.2/docs_src/parameter_types/enum/__init__.py +0 -0
  175. doctyper-0.15.2/docs_src/parameter_types/enum/tutorial001.py +17 -0
  176. doctyper-0.15.2/docs_src/parameter_types/enum/tutorial002.py +21 -0
  177. doctyper-0.15.2/docs_src/parameter_types/enum/tutorial002_an.py +22 -0
  178. doctyper-0.15.2/docs_src/parameter_types/enum/tutorial003.py +18 -0
  179. doctyper-0.15.2/docs_src/parameter_types/enum/tutorial003_an.py +21 -0
  180. doctyper-0.15.2/docs_src/parameter_types/file/__init__.py +0 -0
  181. doctyper-0.15.2/docs_src/parameter_types/file/tutorial001.py +10 -0
  182. doctyper-0.15.2/docs_src/parameter_types/file/tutorial001_an.py +11 -0
  183. doctyper-0.15.2/docs_src/parameter_types/file/tutorial002.py +10 -0
  184. doctyper-0.15.2/docs_src/parameter_types/file/tutorial002_an.py +11 -0
  185. doctyper-0.15.2/docs_src/parameter_types/file/tutorial003.py +13 -0
  186. doctyper-0.15.2/docs_src/parameter_types/file/tutorial003_an.py +14 -0
  187. doctyper-0.15.2/docs_src/parameter_types/file/tutorial004.py +17 -0
  188. doctyper-0.15.2/docs_src/parameter_types/file/tutorial004_an.py +18 -0
  189. doctyper-0.15.2/docs_src/parameter_types/file/tutorial005.py +10 -0
  190. doctyper-0.15.2/docs_src/parameter_types/file/tutorial005_an.py +11 -0
  191. doctyper-0.15.2/docs_src/parameter_types/index/__init__.py +0 -0
  192. doctyper-0.15.2/docs_src/parameter_types/index/tutorial001.py +12 -0
  193. doctyper-0.15.2/docs_src/parameter_types/number/__init__.py +0 -0
  194. doctyper-0.15.2/docs_src/parameter_types/number/tutorial001.py +15 -0
  195. doctyper-0.15.2/docs_src/parameter_types/number/tutorial001_an.py +16 -0
  196. doctyper-0.15.2/docs_src/parameter_types/number/tutorial002.py +15 -0
  197. doctyper-0.15.2/docs_src/parameter_types/number/tutorial002_an.py +16 -0
  198. doctyper-0.15.2/docs_src/parameter_types/number/tutorial003.py +9 -0
  199. doctyper-0.15.2/docs_src/parameter_types/number/tutorial003_an.py +10 -0
  200. doctyper-0.15.2/docs_src/parameter_types/path/__init__.py +0 -0
  201. doctyper-0.15.2/docs_src/parameter_types/path/tutorial001.py +21 -0
  202. doctyper-0.15.2/docs_src/parameter_types/path/tutorial001_an.py +22 -0
  203. doctyper-0.15.2/docs_src/parameter_types/path/tutorial002.py +22 -0
  204. doctyper-0.15.2/docs_src/parameter_types/path/tutorial002_an.py +25 -0
  205. doctyper-0.15.2/docs_src/parameter_types/uuid/__init__.py +0 -0
  206. doctyper-0.15.2/docs_src/parameter_types/uuid/tutorial001.py +12 -0
  207. doctyper-0.15.2/docs_src/printing/tutorial001.py +19 -0
  208. doctyper-0.15.2/docs_src/printing/tutorial002.py +10 -0
  209. doctyper-0.15.2/docs_src/printing/tutorial003.py +16 -0
  210. doctyper-0.15.2/docs_src/printing/tutorial004.py +12 -0
  211. doctyper-0.15.2/docs_src/printing/tutorial005.py +15 -0
  212. doctyper-0.15.2/docs_src/printing/tutorial006.py +9 -0
  213. doctyper-0.15.2/docs_src/progressbar/tutorial001.py +17 -0
  214. doctyper-0.15.2/docs_src/progressbar/tutorial002.py +20 -0
  215. doctyper-0.15.2/docs_src/progressbar/tutorial003.py +17 -0
  216. doctyper-0.15.2/docs_src/progressbar/tutorial004.py +23 -0
  217. doctyper-0.15.2/docs_src/progressbar/tutorial005.py +17 -0
  218. doctyper-0.15.2/docs_src/progressbar/tutorial006.py +19 -0
  219. doctyper-0.15.2/docs_src/prompt/tutorial001.py +10 -0
  220. doctyper-0.15.2/docs_src/prompt/tutorial002.py +13 -0
  221. doctyper-0.15.2/docs_src/prompt/tutorial003.py +10 -0
  222. doctyper-0.15.2/docs_src/prompt/tutorial004.py +11 -0
  223. doctyper-0.15.2/docs_src/subcommands/callback_override/tutorial001.py +20 -0
  224. doctyper-0.15.2/docs_src/subcommands/callback_override/tutorial002.py +20 -0
  225. doctyper-0.15.2/docs_src/subcommands/callback_override/tutorial003.py +25 -0
  226. doctyper-0.15.2/docs_src/subcommands/callback_override/tutorial004.py +31 -0
  227. doctyper-0.15.2/docs_src/subcommands/name_help/tutorial001.py +15 -0
  228. doctyper-0.15.2/docs_src/subcommands/name_help/tutorial002.py +22 -0
  229. doctyper-0.15.2/docs_src/subcommands/name_help/tutorial003.py +22 -0
  230. doctyper-0.15.2/docs_src/subcommands/name_help/tutorial004.py +29 -0
  231. doctyper-0.15.2/docs_src/subcommands/name_help/tutorial005.py +37 -0
  232. doctyper-0.15.2/docs_src/subcommands/name_help/tutorial006.py +39 -0
  233. doctyper-0.15.2/docs_src/subcommands/name_help/tutorial007.py +37 -0
  234. doctyper-0.15.2/docs_src/subcommands/name_help/tutorial008.py +44 -0
  235. doctyper-0.15.2/docs_src/subcommands/tutorial001/__init__.py +0 -0
  236. doctyper-0.15.2/docs_src/subcommands/tutorial001/items.py +22 -0
  237. doctyper-0.15.2/docs_src/subcommands/tutorial001/main.py +11 -0
  238. doctyper-0.15.2/docs_src/subcommands/tutorial001/users.py +17 -0
  239. doctyper-0.15.2/docs_src/subcommands/tutorial002/main.py +36 -0
  240. doctyper-0.15.2/docs_src/subcommands/tutorial003/__init__.py +0 -0
  241. doctyper-0.15.2/docs_src/subcommands/tutorial003/items.py +22 -0
  242. doctyper-0.15.2/docs_src/subcommands/tutorial003/lands.py +11 -0
  243. doctyper-0.15.2/docs_src/subcommands/tutorial003/main.py +13 -0
  244. doctyper-0.15.2/docs_src/subcommands/tutorial003/reigns.py +17 -0
  245. doctyper-0.15.2/docs_src/subcommands/tutorial003/towns.py +17 -0
  246. doctyper-0.15.2/docs_src/subcommands/tutorial003/users.py +17 -0
  247. doctyper-0.15.2/docs_src/terminating/tutorial001.py +25 -0
  248. doctyper-0.15.2/docs_src/terminating/tutorial002.py +12 -0
  249. doctyper-0.15.2/docs_src/terminating/tutorial003.py +12 -0
  250. doctyper-0.15.2/docs_src/testing/app01/__init__.py +0 -0
  251. doctyper-0.15.2/docs_src/testing/app01/main.py +16 -0
  252. doctyper-0.15.2/docs_src/testing/app01/test_main.py +12 -0
  253. doctyper-0.15.2/docs_src/testing/app02/__init__.py +0 -0
  254. doctyper-0.15.2/docs_src/testing/app02/main.py +12 -0
  255. doctyper-0.15.2/docs_src/testing/app02/test_main.py +11 -0
  256. doctyper-0.15.2/docs_src/testing/app02_an/__init__.py +0 -0
  257. doctyper-0.15.2/docs_src/testing/app02_an/main.py +13 -0
  258. doctyper-0.15.2/docs_src/testing/app02_an/test_main.py +11 -0
  259. doctyper-0.15.2/docs_src/testing/app03/__init__.py +0 -0
  260. doctyper-0.15.2/docs_src/testing/app03/main.py +9 -0
  261. doctyper-0.15.2/docs_src/testing/app03/test_main.py +15 -0
  262. doctyper-0.15.2/docs_src/using_click/tutorial001.py +14 -0
  263. doctyper-0.15.2/docs_src/using_click/tutorial002.py +24 -0
  264. doctyper-0.15.2/docs_src/using_click/tutorial003.py +34 -0
  265. doctyper-0.15.2/docs_src/using_click/tutorial004.py +36 -0
  266. doctyper-0.15.2/doctyper/__init__.py +40 -0
  267. doctyper-0.15.2/doctyper/__main__.py +3 -0
  268. doctyper-0.15.2/doctyper/_completion_classes.py +203 -0
  269. doctyper-0.15.2/doctyper/_completion_shared.py +240 -0
  270. doctyper-0.15.2/doctyper/_typing.py +113 -0
  271. doctyper-0.15.2/doctyper/cli.py +317 -0
  272. doctyper-0.15.2/doctyper/colors.py +20 -0
  273. doctyper-0.15.2/doctyper/completion.py +149 -0
  274. doctyper-0.15.2/doctyper/core.py +764 -0
  275. doctyper-0.15.2/doctyper/main.py +1174 -0
  276. doctyper-0.15.2/doctyper/models.py +544 -0
  277. doctyper-0.15.2/doctyper/params.py +479 -0
  278. doctyper-0.15.2/doctyper/py.typed +0 -0
  279. doctyper-0.15.2/doctyper/rich_utils.py +735 -0
  280. doctyper-0.15.2/doctyper/testing.py +29 -0
  281. doctyper-0.15.2/doctyper/utils.py +215 -0
  282. doctyper-0.15.2/pdm_build.py +55 -0
  283. doctyper-0.15.2/pyproject.toml +234 -0
  284. doctyper-0.15.2/requirements-docs-insiders.txt +3 -0
  285. doctyper-0.15.2/requirements-docs.txt +19 -0
  286. doctyper-0.15.2/requirements-github-actions.txt +5 -0
  287. doctyper-0.15.2/requirements-tests.txt +12 -0
  288. doctyper-0.15.2/requirements.txt +6 -0
  289. doctyper-0.15.2/scripts/deploy_docs_status.py +103 -0
  290. doctyper-0.15.2/scripts/docker/Dockerfile +28 -0
  291. doctyper-0.15.2/scripts/docker/compose.yaml +8 -0
  292. doctyper-0.15.2/scripts/docs.py +135 -0
  293. doctyper-0.15.2/scripts/format.sh +6 -0
  294. doctyper-0.15.2/scripts/get-pwsh-activate.sh +1 -0
  295. doctyper-0.15.2/scripts/lint.sh +8 -0
  296. doctyper-0.15.2/scripts/mkdocs_hooks.py +38 -0
  297. doctyper-0.15.2/scripts/test-cov-html.sh +6 -0
  298. doctyper-0.15.2/scripts/test-files.sh +8 -0
  299. doctyper-0.15.2/scripts/test.sh +13 -0
  300. doctyper-0.15.2/tests/__init__.py +0 -0
  301. doctyper-0.15.2/tests/assets/__init__.py +0 -0
  302. doctyper-0.15.2/tests/assets/cli/__init__.py +0 -0
  303. doctyper-0.15.2/tests/assets/cli/app_other_name.py +8 -0
  304. doctyper-0.15.2/tests/assets/cli/empty_script.py +0 -0
  305. doctyper-0.15.2/tests/assets/cli/extended_app_cli.py +31 -0
  306. doctyper-0.15.2/tests/assets/cli/extended_empty_app_cli.py +15 -0
  307. doctyper-0.15.2/tests/assets/cli/func_other_name.py +2 -0
  308. doctyper-0.15.2/tests/assets/cli/multi_app.py +42 -0
  309. doctyper-0.15.2/tests/assets/cli/multi_app_cli.py +22 -0
  310. doctyper-0.15.2/tests/assets/cli/multi_func.py +12 -0
  311. doctyper-0.15.2/tests/assets/cli/multiapp-docs-title.md +102 -0
  312. doctyper-0.15.2/tests/assets/cli/multiapp-docs.md +102 -0
  313. doctyper-0.15.2/tests/assets/cli/not_python.txt +1 -0
  314. doctyper-0.15.2/tests/assets/cli/rich_formatted_app.py +24 -0
  315. doctyper-0.15.2/tests/assets/cli/richformattedapp-docs.md +21 -0
  316. doctyper-0.15.2/tests/assets/cli/sample.py +25 -0
  317. doctyper-0.15.2/tests/assets/completion_argument.py +22 -0
  318. doctyper-0.15.2/tests/assets/completion_no_types.py +23 -0
  319. doctyper-0.15.2/tests/assets/completion_no_types_order.py +23 -0
  320. doctyper-0.15.2/tests/assets/corner_cases.py +19 -0
  321. doctyper-0.15.2/tests/assets/prog_name.py +12 -0
  322. doctyper-0.15.2/tests/assets/type_error_no_rich.py +11 -0
  323. doctyper-0.15.2/tests/assets/type_error_no_rich_short_disable.py +15 -0
  324. doctyper-0.15.2/tests/assets/type_error_normal_traceback.py +22 -0
  325. doctyper-0.15.2/tests/test_ambiguous_params.py +233 -0
  326. doctyper-0.15.2/tests/test_annotated.py +78 -0
  327. doctyper-0.15.2/tests/test_callback_warning.py +44 -0
  328. doctyper-0.15.2/tests/test_cli/__init__.py +0 -0
  329. doctyper-0.15.2/tests/test_cli/test_app_other_name.py +41 -0
  330. doctyper-0.15.2/tests/test_cli/test_completion_run.py +19 -0
  331. doctyper-0.15.2/tests/test_cli/test_doc.py +174 -0
  332. doctyper-0.15.2/tests/test_cli/test_empty_script.py +20 -0
  333. doctyper-0.15.2/tests/test_cli/test_extending_app.py +120 -0
  334. doctyper-0.15.2/tests/test_cli/test_extending_empty_app.py +59 -0
  335. doctyper-0.15.2/tests/test_cli/test_func_other_name.py +22 -0
  336. doctyper-0.15.2/tests/test_cli/test_help.py +38 -0
  337. doctyper-0.15.2/tests/test_cli/test_multi_app.py +123 -0
  338. doctyper-0.15.2/tests/test_cli/test_multi_app_cli.py +102 -0
  339. doctyper-0.15.2/tests/test_cli/test_multi_app_sub.py +46 -0
  340. doctyper-0.15.2/tests/test_cli/test_multi_func.py +106 -0
  341. doctyper-0.15.2/tests/test_cli/test_not_python.py +20 -0
  342. doctyper-0.15.2/tests/test_cli/test_sub.py +139 -0
  343. doctyper-0.15.2/tests/test_cli/test_sub_completion.py +19 -0
  344. doctyper-0.15.2/tests/test_cli/test_sub_help.py +24 -0
  345. doctyper-0.15.2/tests/test_cli/test_version.py +11 -0
  346. doctyper-0.15.2/tests/test_completion/__init__.py +0 -0
  347. doctyper-0.15.2/tests/test_completion/colon_example.py +25 -0
  348. doctyper-0.15.2/tests/test_completion/example_rich_tags.py +31 -0
  349. doctyper-0.15.2/tests/test_completion/path_example.py +14 -0
  350. doctyper-0.15.2/tests/test_completion/test_completion.py +164 -0
  351. doctyper-0.15.2/tests/test_completion/test_completion_complete.py +160 -0
  352. doctyper-0.15.2/tests/test_completion/test_completion_complete_no_help.py +63 -0
  353. doctyper-0.15.2/tests/test_completion/test_completion_complete_rich.py +113 -0
  354. doctyper-0.15.2/tests/test_completion/test_completion_install.py +172 -0
  355. doctyper-0.15.2/tests/test_completion/test_completion_option_colon.py +219 -0
  356. doctyper-0.15.2/tests/test_completion/test_completion_path.py +30 -0
  357. doctyper-0.15.2/tests/test_completion/test_completion_show.py +149 -0
  358. doctyper-0.15.2/tests/test_completion/test_sanitization.py +39 -0
  359. doctyper-0.15.2/tests/test_corner_cases.py +35 -0
  360. doctyper-0.15.2/tests/test_deprecation.py +27 -0
  361. doctyper-0.15.2/tests/test_doctyper.py +119 -0
  362. doctyper-0.15.2/tests/test_exit_errors.py +58 -0
  363. doctyper-0.15.2/tests/test_future_annotations.py +26 -0
  364. doctyper-0.15.2/tests/test_launch.py +51 -0
  365. doctyper-0.15.2/tests/test_others.py +280 -0
  366. doctyper-0.15.2/tests/test_param_meta_empty.py +36 -0
  367. doctyper-0.15.2/tests/test_prog_name.py +13 -0
  368. doctyper-0.15.2/tests/test_rich_markup_mode.py +288 -0
  369. doctyper-0.15.2/tests/test_rich_utils.py +52 -0
  370. doctyper-0.15.2/tests/test_tracebacks.py +52 -0
  371. doctyper-0.15.2/tests/test_tutorial/__init__.py +0 -0
  372. doctyper-0.15.2/tests/test_tutorial/test_arguments/__init__.py +0 -0
  373. doctyper-0.15.2/tests/test_tutorial/test_arguments/test_default/__init__.py +0 -0
  374. doctyper-0.15.2/tests/test_tutorial/test_arguments/test_default/test_tutorial001.py +41 -0
  375. doctyper-0.15.2/tests/test_tutorial/test_arguments/test_default/test_tutorial001_an.py +41 -0
  376. doctyper-0.15.2/tests/test_tutorial/test_arguments/test_default/test_tutorial002.py +43 -0
  377. doctyper-0.15.2/tests/test_tutorial/test_arguments/test_default/test_tutorial002_an.py +43 -0
  378. doctyper-0.15.2/tests/test_tutorial/test_arguments/test_envvar/__init__.py +0 -0
  379. doctyper-0.15.2/tests/test_tutorial/test_arguments/test_envvar/test_tutorial001.py +61 -0
  380. doctyper-0.15.2/tests/test_tutorial/test_arguments/test_envvar/test_tutorial001_an.py +61 -0
  381. doctyper-0.15.2/tests/test_tutorial/test_arguments/test_envvar/test_tutorial002.py +48 -0
  382. doctyper-0.15.2/tests/test_tutorial/test_arguments/test_envvar/test_tutorial002_an.py +48 -0
  383. doctyper-0.15.2/tests/test_tutorial/test_arguments/test_envvar/test_tutorial003.py +48 -0
  384. doctyper-0.15.2/tests/test_tutorial/test_arguments/test_envvar/test_tutorial003_an.py +48 -0
  385. doctyper-0.15.2/tests/test_tutorial/test_arguments/test_help/__init__.py +0 -0
  386. doctyper-0.15.2/tests/test_tutorial/test_arguments/test_help/test_tutorial001.py +51 -0
  387. doctyper-0.15.2/tests/test_tutorial/test_arguments/test_help/test_tutorial001_an.py +51 -0
  388. doctyper-0.15.2/tests/test_tutorial/test_arguments/test_help/test_tutorial002.py +38 -0
  389. doctyper-0.15.2/tests/test_tutorial/test_arguments/test_help/test_tutorial002_an.py +38 -0
  390. doctyper-0.15.2/tests/test_tutorial/test_arguments/test_help/test_tutorial003.py +38 -0
  391. doctyper-0.15.2/tests/test_tutorial/test_arguments/test_help/test_tutorial003_an.py +38 -0
  392. doctyper-0.15.2/tests/test_tutorial/test_arguments/test_help/test_tutorial004.py +38 -0
  393. doctyper-0.15.2/tests/test_tutorial/test_arguments/test_help/test_tutorial004_an.py +38 -0
  394. doctyper-0.15.2/tests/test_tutorial/test_arguments/test_help/test_tutorial005.py +36 -0
  395. doctyper-0.15.2/tests/test_tutorial/test_arguments/test_help/test_tutorial005_an.py +36 -0
  396. doctyper-0.15.2/tests/test_tutorial/test_arguments/test_help/test_tutorial006.py +36 -0
  397. doctyper-0.15.2/tests/test_tutorial/test_arguments/test_help/test_tutorial006_an.py +36 -0
  398. doctyper-0.15.2/tests/test_tutorial/test_arguments/test_help/test_tutorial007.py +36 -0
  399. doctyper-0.15.2/tests/test_tutorial/test_arguments/test_help/test_tutorial007_an.py +36 -0
  400. doctyper-0.15.2/tests/test_tutorial/test_arguments/test_help/test_tutorial008.py +49 -0
  401. doctyper-0.15.2/tests/test_tutorial/test_arguments/test_help/test_tutorial008_an.py +49 -0
  402. doctyper-0.15.2/tests/test_tutorial/test_arguments/test_optional/__init__.py +0 -0
  403. doctyper-0.15.2/tests/test_tutorial/test_arguments/test_optional/test_tutorial001.py +50 -0
  404. doctyper-0.15.2/tests/test_tutorial/test_arguments/test_optional/test_tutorial001_an.py +50 -0
  405. doctyper-0.15.2/tests/test_tutorial/test_arguments/test_optional/test_tutorial002.py +39 -0
  406. doctyper-0.15.2/tests/test_tutorial/test_arguments/test_optional/test_tutorial002_an.py +39 -0
  407. doctyper-0.15.2/tests/test_tutorial/test_arguments/test_optional/test_tutorial003.py +50 -0
  408. doctyper-0.15.2/tests/test_tutorial/test_commands/__init__.py +0 -0
  409. doctyper-0.15.2/tests/test_tutorial/test_commands/test_arguments/__init__.py +0 -0
  410. doctyper-0.15.2/tests/test_tutorial/test_commands/test_arguments/test_tutorial001.py +43 -0
  411. doctyper-0.15.2/tests/test_tutorial/test_commands/test_callback/__init__.py +0 -0
  412. doctyper-0.15.2/tests/test_tutorial/test_commands/test_callback/test_tutorial001.py +75 -0
  413. doctyper-0.15.2/tests/test_tutorial/test_commands/test_callback/test_tutorial002.py +26 -0
  414. doctyper-0.15.2/tests/test_tutorial/test_commands/test_callback/test_tutorial003.py +31 -0
  415. doctyper-0.15.2/tests/test_tutorial/test_commands/test_callback/test_tutorial004.py +33 -0
  416. doctyper-0.15.2/tests/test_tutorial/test_commands/test_context/__init__.py +0 -0
  417. doctyper-0.15.2/tests/test_tutorial/test_commands/test_context/test_tutorial001.py +33 -0
  418. doctyper-0.15.2/tests/test_tutorial/test_commands/test_context/test_tutorial002.py +39 -0
  419. doctyper-0.15.2/tests/test_tutorial/test_commands/test_context/test_tutorial003.py +39 -0
  420. doctyper-0.15.2/tests/test_tutorial/test_commands/test_context/test_tutorial004.py +28 -0
  421. doctyper-0.15.2/tests/test_tutorial/test_commands/test_help/__init__.py +0 -0
  422. doctyper-0.15.2/tests/test_tutorial/test_commands/test_help/test_tutorial001.py +109 -0
  423. doctyper-0.15.2/tests/test_tutorial/test_commands/test_help/test_tutorial001_an.py +109 -0
  424. doctyper-0.15.2/tests/test_tutorial/test_commands/test_help/test_tutorial002.py +56 -0
  425. doctyper-0.15.2/tests/test_tutorial/test_commands/test_help/test_tutorial003.py +44 -0
  426. doctyper-0.15.2/tests/test_tutorial/test_commands/test_help/test_tutorial004.py +61 -0
  427. doctyper-0.15.2/tests/test_tutorial/test_commands/test_help/test_tutorial004_an.py +61 -0
  428. doctyper-0.15.2/tests/test_tutorial/test_commands/test_help/test_tutorial005.py +62 -0
  429. doctyper-0.15.2/tests/test_tutorial/test_commands/test_help/test_tutorial005_an.py +62 -0
  430. doctyper-0.15.2/tests/test_tutorial/test_commands/test_help/test_tutorial006.py +53 -0
  431. doctyper-0.15.2/tests/test_tutorial/test_commands/test_help/test_tutorial007.py +57 -0
  432. doctyper-0.15.2/tests/test_tutorial/test_commands/test_help/test_tutorial007_an.py +57 -0
  433. doctyper-0.15.2/tests/test_tutorial/test_commands/test_help/test_tutorial008.py +32 -0
  434. doctyper-0.15.2/tests/test_tutorial/test_commands/test_index/__init__.py +0 -0
  435. doctyper-0.15.2/tests/test_tutorial/test_commands/test_index/test_tutorial001.py +31 -0
  436. doctyper-0.15.2/tests/test_tutorial/test_commands/test_index/test_tutorial002.py +40 -0
  437. doctyper-0.15.2/tests/test_tutorial/test_commands/test_index/test_tutorial003.py +40 -0
  438. doctyper-0.15.2/tests/test_tutorial/test_commands/test_index/test_tutorial004.py +45 -0
  439. doctyper-0.15.2/tests/test_tutorial/test_commands/test_name/__init__.py +0 -0
  440. doctyper-0.15.2/tests/test_tutorial/test_commands/test_name/test_tutorial001.py +39 -0
  441. doctyper-0.15.2/tests/test_tutorial/test_commands/test_one_or_multiple/__init__.py +0 -0
  442. doctyper-0.15.2/tests/test_tutorial/test_commands/test_one_or_multiple/test_tutorial001.py +32 -0
  443. doctyper-0.15.2/tests/test_tutorial/test_commands/test_one_or_multiple/test_tutorial002.py +34 -0
  444. doctyper-0.15.2/tests/test_tutorial/test_commands/test_options/__init__.py +0 -0
  445. doctyper-0.15.2/tests/test_tutorial/test_commands/test_options/test_tutorial001.py +76 -0
  446. doctyper-0.15.2/tests/test_tutorial/test_commands/test_options/test_tutorial001_an.py +76 -0
  447. doctyper-0.15.2/tests/test_tutorial/test_exceptions/__init__.py +0 -0
  448. doctyper-0.15.2/tests/test_tutorial/test_exceptions/test_tutorial001.py +51 -0
  449. doctyper-0.15.2/tests/test_tutorial/test_exceptions/test_tutorial002.py +51 -0
  450. doctyper-0.15.2/tests/test_tutorial/test_exceptions/test_tutorial003.py +35 -0
  451. doctyper-0.15.2/tests/test_tutorial/test_exceptions/test_tutorial004.py +34 -0
  452. doctyper-0.15.2/tests/test_tutorial/test_first_steps/__init__.py +0 -0
  453. doctyper-0.15.2/tests/test_tutorial/test_first_steps/test_tutorial001.py +25 -0
  454. doctyper-0.15.2/tests/test_tutorial/test_first_steps/test_tutorial002.py +33 -0
  455. doctyper-0.15.2/tests/test_tutorial/test_first_steps/test_tutorial003.py +33 -0
  456. doctyper-0.15.2/tests/test_tutorial/test_first_steps/test_tutorial004.py +57 -0
  457. doctyper-0.15.2/tests/test_tutorial/test_first_steps/test_tutorial005.py +57 -0
  458. doctyper-0.15.2/tests/test_tutorial/test_first_steps/test_tutorial006.py +52 -0
  459. doctyper-0.15.2/tests/test_tutorial/test_multiple_values/__init__.py +0 -0
  460. doctyper-0.15.2/tests/test_tutorial/test_multiple_values/test_arguments_with_multiple_values/__init__.py +0 -0
  461. doctyper-0.15.2/tests/test_tutorial/test_multiple_values/test_arguments_with_multiple_values/test_tutorial001.py +27 -0
  462. doctyper-0.15.2/tests/test_tutorial/test_multiple_values/test_arguments_with_multiple_values/test_tutorial002.py +50 -0
  463. doctyper-0.15.2/tests/test_tutorial/test_multiple_values/test_arguments_with_multiple_values/test_tutorial002_an.py +52 -0
  464. doctyper-0.15.2/tests/test_tutorial/test_multiple_values/test_multiple_options/__init__.py +0 -0
  465. doctyper-0.15.2/tests/test_tutorial/test_multiple_values/test_multiple_options/test_tutorial001.py +44 -0
  466. doctyper-0.15.2/tests/test_tutorial/test_multiple_values/test_multiple_options/test_tutorial001_an.py +44 -0
  467. doctyper-0.15.2/tests/test_tutorial/test_multiple_values/test_multiple_options/test_tutorial002.py +38 -0
  468. doctyper-0.15.2/tests/test_tutorial/test_multiple_values/test_multiple_options/test_tutorial002_an.py +38 -0
  469. doctyper-0.15.2/tests/test_tutorial/test_multiple_values/test_options_with_multiple_values/__init__.py +0 -0
  470. doctyper-0.15.2/tests/test_tutorial/test_multiple_values/test_options_with_multiple_values/test_tutorial001.py +47 -0
  471. doctyper-0.15.2/tests/test_tutorial/test_multiple_values/test_options_with_multiple_values/test_tutorial001_an.py +47 -0
  472. doctyper-0.15.2/tests/test_tutorial/test_one_file_per_command/__init__.py +0 -0
  473. doctyper-0.15.2/tests/test_tutorial/test_one_file_per_command/test_tutorial.py +44 -0
  474. doctyper-0.15.2/tests/test_tutorial/test_options/__init__.py +0 -0
  475. doctyper-0.15.2/tests/test_tutorial/test_options/test_callback/__init__.py +0 -0
  476. doctyper-0.15.2/tests/test_tutorial/test_options/test_callback/test_tutorial001.py +33 -0
  477. doctyper-0.15.2/tests/test_tutorial/test_options/test_callback/test_tutorial001_an.py +33 -0
  478. doctyper-0.15.2/tests/test_tutorial/test_options/test_callback/test_tutorial003.py +50 -0
  479. doctyper-0.15.2/tests/test_tutorial/test_options/test_callback/test_tutorial003_an.py +50 -0
  480. doctyper-0.15.2/tests/test_tutorial/test_options/test_callback/test_tutorial004.py +50 -0
  481. doctyper-0.15.2/tests/test_tutorial/test_options/test_callback/test_tutorial004_an.py +50 -0
  482. doctyper-0.15.2/tests/test_tutorial/test_options/test_help/__init__.py +0 -0
  483. doctyper-0.15.2/tests/test_tutorial/test_options/test_help/test_tutorial001.py +48 -0
  484. doctyper-0.15.2/tests/test_tutorial/test_options/test_help/test_tutorial001_an.py +48 -0
  485. doctyper-0.15.2/tests/test_tutorial/test_options/test_help/test_tutorial002.py +44 -0
  486. doctyper-0.15.2/tests/test_tutorial/test_options/test_help/test_tutorial002_an.py +44 -0
  487. doctyper-0.15.2/tests/test_tutorial/test_options/test_help/test_tutorial003.py +35 -0
  488. doctyper-0.15.2/tests/test_tutorial/test_options/test_help/test_tutorial003_an.py +35 -0
  489. doctyper-0.15.2/tests/test_tutorial/test_options/test_name/__init__.py +0 -0
  490. doctyper-0.15.2/tests/test_tutorial/test_options/test_name/test_tutorial001.py +41 -0
  491. doctyper-0.15.2/tests/test_tutorial/test_options/test_name/test_tutorial001_an.py +41 -0
  492. doctyper-0.15.2/tests/test_tutorial/test_options/test_name/test_tutorial002.py +42 -0
  493. doctyper-0.15.2/tests/test_tutorial/test_options/test_name/test_tutorial002_an.py +42 -0
  494. doctyper-0.15.2/tests/test_tutorial/test_options/test_name/test_tutorial003.py +36 -0
  495. doctyper-0.15.2/tests/test_tutorial/test_options/test_name/test_tutorial003_an.py +36 -0
  496. doctyper-0.15.2/tests/test_tutorial/test_options/test_name/test_tutorial004.py +42 -0
  497. doctyper-0.15.2/tests/test_tutorial/test_options/test_name/test_tutorial004_an.py +42 -0
  498. doctyper-0.15.2/tests/test_tutorial/test_options/test_name/test_tutorial005.py +54 -0
  499. doctyper-0.15.2/tests/test_tutorial/test_options/test_name/test_tutorial005_an.py +54 -0
  500. doctyper-0.15.2/tests/test_tutorial/test_options/test_prompt/__init__.py +0 -0
  501. doctyper-0.15.2/tests/test_tutorial/test_options/test_prompt/test_tutorial001.py +42 -0
  502. doctyper-0.15.2/tests/test_tutorial/test_options/test_prompt/test_tutorial001_an.py +42 -0
  503. doctyper-0.15.2/tests/test_tutorial/test_options/test_prompt/test_tutorial002.py +42 -0
  504. doctyper-0.15.2/tests/test_tutorial/test_options/test_prompt/test_tutorial002_an.py +42 -0
  505. doctyper-0.15.2/tests/test_tutorial/test_options/test_prompt/test_tutorial003.py +51 -0
  506. doctyper-0.15.2/tests/test_tutorial/test_options/test_prompt/test_tutorial003_an.py +51 -0
  507. doctyper-0.15.2/tests/test_tutorial/test_options/test_required/__init__.py +0 -0
  508. doctyper-0.15.2/tests/test_tutorial/test_options/test_required/test_tutorial001.py +53 -0
  509. doctyper-0.15.2/tests/test_tutorial/test_options/test_required/test_tutorial001_an.py +53 -0
  510. doctyper-0.15.2/tests/test_tutorial/test_options/test_version/__init__.py +0 -0
  511. doctyper-0.15.2/tests/test_tutorial/test_options/test_version/test_tutorial003.py +55 -0
  512. doctyper-0.15.2/tests/test_tutorial/test_options/test_version/test_tutorial003_an.py +55 -0
  513. doctyper-0.15.2/tests/test_tutorial/test_options_autocompletion/__init__.py +0 -0
  514. doctyper-0.15.2/tests/test_tutorial/test_options_autocompletion/test_tutorial002.py +40 -0
  515. doctyper-0.15.2/tests/test_tutorial/test_options_autocompletion/test_tutorial002_an.py +40 -0
  516. doctyper-0.15.2/tests/test_tutorial/test_options_autocompletion/test_tutorial003.py +57 -0
  517. doctyper-0.15.2/tests/test_tutorial/test_options_autocompletion/test_tutorial003_an.py +57 -0
  518. doctyper-0.15.2/tests/test_tutorial/test_options_autocompletion/test_tutorial004.py +40 -0
  519. doctyper-0.15.2/tests/test_tutorial/test_options_autocompletion/test_tutorial004_an.py +40 -0
  520. doctyper-0.15.2/tests/test_tutorial/test_options_autocompletion/test_tutorial007.py +41 -0
  521. doctyper-0.15.2/tests/test_tutorial/test_options_autocompletion/test_tutorial007_an.py +41 -0
  522. doctyper-0.15.2/tests/test_tutorial/test_options_autocompletion/test_tutorial008.py +42 -0
  523. doctyper-0.15.2/tests/test_tutorial/test_options_autocompletion/test_tutorial008_an.py +42 -0
  524. doctyper-0.15.2/tests/test_tutorial/test_options_autocompletion/test_tutorial009.py +42 -0
  525. doctyper-0.15.2/tests/test_tutorial/test_options_autocompletion/test_tutorial009_an.py +42 -0
  526. doctyper-0.15.2/tests/test_tutorial/test_parameter_types/__init__.py +0 -0
  527. doctyper-0.15.2/tests/test_tutorial/test_parameter_types/test_bool/__init__.py +0 -0
  528. doctyper-0.15.2/tests/test_tutorial/test_parameter_types/test_bool/test_tutorial001.py +46 -0
  529. doctyper-0.15.2/tests/test_tutorial/test_parameter_types/test_bool/test_tutorial001_an.py +46 -0
  530. doctyper-0.15.2/tests/test_tutorial/test_parameter_types/test_bool/test_tutorial002.py +65 -0
  531. doctyper-0.15.2/tests/test_tutorial/test_parameter_types/test_bool/test_tutorial002_an.py +65 -0
  532. doctyper-0.15.2/tests/test_tutorial/test_parameter_types/test_bool/test_tutorial003.py +42 -0
  533. doctyper-0.15.2/tests/test_tutorial/test_parameter_types/test_bool/test_tutorial003_an.py +42 -0
  534. doctyper-0.15.2/tests/test_tutorial/test_parameter_types/test_bool/test_tutorial004.py +46 -0
  535. doctyper-0.15.2/tests/test_tutorial/test_parameter_types/test_bool/test_tutorial004_an.py +46 -0
  536. doctyper-0.15.2/tests/test_tutorial/test_parameter_types/test_custom_types/__init__.py +0 -0
  537. doctyper-0.15.2/tests/test_tutorial/test_parameter_types/test_custom_types/test_tutorial001.py +38 -0
  538. doctyper-0.15.2/tests/test_tutorial/test_parameter_types/test_custom_types/test_tutorial001_an.py +38 -0
  539. doctyper-0.15.2/tests/test_tutorial/test_parameter_types/test_custom_types/test_tutorial002.py +38 -0
  540. doctyper-0.15.2/tests/test_tutorial/test_parameter_types/test_custom_types/test_tutorial002_an.py +38 -0
  541. doctyper-0.15.2/tests/test_tutorial/test_parameter_types/test_datetime/__init__.py +0 -0
  542. doctyper-0.15.2/tests/test_tutorial/test_parameter_types/test_datetime/test_tutorial001.py +47 -0
  543. doctyper-0.15.2/tests/test_tutorial/test_parameter_types/test_datetime/test_tutorial002.py +33 -0
  544. doctyper-0.15.2/tests/test_tutorial/test_parameter_types/test_datetime/test_tutorial002_an.py +33 -0
  545. doctyper-0.15.2/tests/test_tutorial/test_parameter_types/test_enum/__init__.py +0 -0
  546. doctyper-0.15.2/tests/test_tutorial/test_parameter_types/test_enum/test_tutorial001.py +53 -0
  547. doctyper-0.15.2/tests/test_tutorial/test_parameter_types/test_enum/test_tutorial002.py +33 -0
  548. doctyper-0.15.2/tests/test_tutorial/test_parameter_types/test_enum/test_tutorial002_an.py +33 -0
  549. doctyper-0.15.2/tests/test_tutorial/test_parameter_types/test_enum/test_tutorial003.py +47 -0
  550. doctyper-0.15.2/tests/test_tutorial/test_parameter_types/test_enum/test_tutorial003_an.py +47 -0
  551. doctyper-0.15.2/tests/test_tutorial/test_parameter_types/test_file/__init__.py +0 -0
  552. doctyper-0.15.2/tests/test_tutorial/test_parameter_types/test_file/test_tutorial001.py +32 -0
  553. doctyper-0.15.2/tests/test_tutorial/test_parameter_types/test_file/test_tutorial001_an.py +32 -0
  554. doctyper-0.15.2/tests/test_tutorial/test_parameter_types/test_file/test_tutorial002.py +34 -0
  555. doctyper-0.15.2/tests/test_tutorial/test_parameter_types/test_file/test_tutorial002_an.py +34 -0
  556. doctyper-0.15.2/tests/test_tutorial/test_parameter_types/test_file/test_tutorial003.py +31 -0
  557. doctyper-0.15.2/tests/test_tutorial/test_parameter_types/test_file/test_tutorial003_an.py +31 -0
  558. doctyper-0.15.2/tests/test_tutorial/test_parameter_types/test_file/test_tutorial004.py +35 -0
  559. doctyper-0.15.2/tests/test_tutorial/test_parameter_types/test_file/test_tutorial004_an.py +35 -0
  560. doctyper-0.15.2/tests/test_tutorial/test_parameter_types/test_file/test_tutorial005.py +37 -0
  561. doctyper-0.15.2/tests/test_tutorial/test_parameter_types/test_file/test_tutorial005_an.py +37 -0
  562. doctyper-0.15.2/tests/test_tutorial/test_parameter_types/test_index/__init__.py +0 -0
  563. doctyper-0.15.2/tests/test_tutorial/test_parameter_types/test_index/test_tutorial001.py +47 -0
  564. doctyper-0.15.2/tests/test_tutorial/test_parameter_types/test_number/__init__.py +0 -0
  565. doctyper-0.15.2/tests/test_tutorial/test_parameter_types/test_number/test_tutorial001.py +82 -0
  566. doctyper-0.15.2/tests/test_tutorial/test_parameter_types/test_number/test_tutorial001_an.py +82 -0
  567. doctyper-0.15.2/tests/test_tutorial/test_parameter_types/test_number/test_tutorial002.py +37 -0
  568. doctyper-0.15.2/tests/test_tutorial/test_parameter_types/test_number/test_tutorial002_an.py +37 -0
  569. doctyper-0.15.2/tests/test_tutorial/test_parameter_types/test_number/test_tutorial003.py +57 -0
  570. doctyper-0.15.2/tests/test_tutorial/test_parameter_types/test_number/test_tutorial003_an.py +57 -0
  571. doctyper-0.15.2/tests/test_tutorial/test_parameter_types/test_path/__init__.py +0 -0
  572. doctyper-0.15.2/tests/test_tutorial/test_parameter_types/test_path/test_tutorial001.py +54 -0
  573. doctyper-0.15.2/tests/test_tutorial/test_parameter_types/test_path/test_tutorial001_an.py +54 -0
  574. doctyper-0.15.2/tests/test_tutorial/test_parameter_types/test_path/test_tutorial002.py +47 -0
  575. doctyper-0.15.2/tests/test_tutorial/test_parameter_types/test_path/test_tutorial002_an.py +47 -0
  576. doctyper-0.15.2/tests/test_tutorial/test_parameter_types/test_uuid/__init__.py +0 -0
  577. doctyper-0.15.2/tests/test_tutorial/test_parameter_types/test_uuid/test_tutorial001.py +37 -0
  578. doctyper-0.15.2/tests/test_tutorial/test_prompt/__init__.py +0 -0
  579. doctyper-0.15.2/tests/test_tutorial/test_prompt/test_tutorial001.py +28 -0
  580. doctyper-0.15.2/tests/test_tutorial/test_prompt/test_tutorial002.py +36 -0
  581. doctyper-0.15.2/tests/test_tutorial/test_prompt/test_tutorial003.py +35 -0
  582. doctyper-0.15.2/tests/test_tutorial/test_subcommands/__init__.py +0 -0
  583. doctyper-0.15.2/tests/test_tutorial/test_subcommands/test_callback_override/__init__.py +0 -0
  584. doctyper-0.15.2/tests/test_tutorial/test_subcommands/test_callback_override/test_tutorial001.py +26 -0
  585. doctyper-0.15.2/tests/test_tutorial/test_subcommands/test_callback_override/test_tutorial002.py +26 -0
  586. doctyper-0.15.2/tests/test_tutorial/test_subcommands/test_callback_override/test_tutorial003.py +31 -0
  587. doctyper-0.15.2/tests/test_tutorial/test_subcommands/test_callback_override/test_tutorial004.py +33 -0
  588. doctyper-0.15.2/tests/test_tutorial/test_subcommands/test_name_help/__init__.py +0 -0
  589. doctyper-0.15.2/tests/test_tutorial/test_subcommands/test_name_help/test_tutorial001.py +39 -0
  590. doctyper-0.15.2/tests/test_tutorial/test_subcommands/test_name_help/test_tutorial002.py +39 -0
  591. doctyper-0.15.2/tests/test_tutorial/test_subcommands/test_name_help/test_tutorial003.py +39 -0
  592. doctyper-0.15.2/tests/test_tutorial/test_subcommands/test_name_help/test_tutorial004.py +39 -0
  593. doctyper-0.15.2/tests/test_tutorial/test_subcommands/test_name_help/test_tutorial005.py +39 -0
  594. doctyper-0.15.2/tests/test_tutorial/test_subcommands/test_name_help/test_tutorial006.py +39 -0
  595. doctyper-0.15.2/tests/test_tutorial/test_subcommands/test_name_help/test_tutorial007.py +39 -0
  596. doctyper-0.15.2/tests/test_tutorial/test_subcommands/test_name_help/test_tutorial008.py +39 -0
  597. doctyper-0.15.2/tests/test_tutorial/test_subcommands/test_tutorial001.py +99 -0
  598. doctyper-0.15.2/tests/test_tutorial/test_subcommands/test_tutorial002.py +77 -0
  599. doctyper-0.15.2/tests/test_tutorial/test_subcommands/test_tutorial003.py +172 -0
  600. doctyper-0.15.2/tests/test_tutorial/test_terminating/__init__.py +0 -0
  601. doctyper-0.15.2/tests/test_tutorial/test_terminating/test_tutorial001.py +43 -0
  602. doctyper-0.15.2/tests/test_tutorial/test_terminating/test_tutorial002.py +33 -0
  603. doctyper-0.15.2/tests/test_tutorial/test_terminating/test_tutorial003.py +52 -0
  604. doctyper-0.15.2/tests/test_tutorial/test_testing/__init__.py +0 -0
  605. doctyper-0.15.2/tests/test_tutorial/test_testing/test_app01.py +18 -0
  606. doctyper-0.15.2/tests/test_tutorial/test_testing/test_app02.py +18 -0
  607. doctyper-0.15.2/tests/test_tutorial/test_testing/test_app02_an.py +18 -0
  608. doctyper-0.15.2/tests/test_tutorial/test_testing/test_app03.py +18 -0
  609. doctyper-0.15.2/tests/test_tutorial/test_using_click/__init__.py +0 -0
  610. doctyper-0.15.2/tests/test_tutorial/test_using_click/test_tutorial003.py +40 -0
  611. doctyper-0.15.2/tests/test_tutorial/test_using_click/test_tutorial004.py +39 -0
  612. doctyper-0.15.2/tests/test_type_conversion.py +171 -0
  613. doctyper-0.15.2/tests/utils.py +33 -0
@@ -0,0 +1,21 @@
1
+ The MIT License (MIT)
2
+
3
+ Copyright (c) 2019 Sebastián Ramírez
4
+
5
+ Permission is hereby granted, free of charge, to any person obtaining a copy
6
+ of this software and associated documentation files (the "Software"), to deal
7
+ in the Software without restriction, including without limitation the rights
8
+ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9
+ copies of the Software, and to permit persons to whom the Software is
10
+ furnished to do so, subject to the following conditions:
11
+
12
+ The above copyright notice and this permission notice shall be included in
13
+ all copies or substantial portions of the Software.
14
+
15
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17
+ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18
+ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19
+ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20
+ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
21
+ THE SOFTWARE.
@@ -0,0 +1,471 @@
1
+ Metadata-Version: 2.1
2
+ Name: doctyper
3
+ Version: 0.15.2
4
+ Summary: Wrapper around Typer using Google-Doc strings for CLI descriptions.
5
+ Author-Email: =?utf-8?q?Sebasti=C3=A1n_Ram=C3=ADrez?= <tiangolo@gmail.com>
6
+ Classifier: Intended Audience :: Information Technology
7
+ Classifier: Intended Audience :: System Administrators
8
+ Classifier: Operating System :: OS Independent
9
+ Classifier: Programming Language :: Python :: 3
10
+ Classifier: Programming Language :: Python
11
+ Classifier: Topic :: Software Development :: Libraries :: Application Frameworks
12
+ Classifier: Topic :: Software Development :: Libraries :: Python Modules
13
+ Classifier: Topic :: Software Development :: Libraries
14
+ Classifier: Topic :: Software Development
15
+ Classifier: Typing :: Typed
16
+ Classifier: Development Status :: 4 - Beta
17
+ Classifier: Intended Audience :: Developers
18
+ Classifier: Programming Language :: Python :: 3 :: Only
19
+ Classifier: Programming Language :: Python :: 3.7
20
+ Classifier: Programming Language :: Python :: 3.8
21
+ Classifier: Programming Language :: Python :: 3.9
22
+ Classifier: Programming Language :: Python :: 3.10
23
+ Classifier: Programming Language :: Python :: 3.11
24
+ Classifier: Programming Language :: Python :: 3.12
25
+ Classifier: Programming Language :: Python :: 3.13
26
+ Classifier: License :: OSI Approved :: MIT License
27
+ Project-URL: Homepage, https://github.com/fastapi/typer
28
+ Project-URL: Documentation, https://typer.tiangolo.com
29
+ Project-URL: Repository, https://github.com/fastapi/typer
30
+ Project-URL: Issues, https://github.com/fastapi/typer/issues
31
+ Project-URL: Changelog, https://typer.tiangolo.com/release-notes/
32
+ Requires-Python: >=3.7
33
+ Requires-Dist: click>=8.0.0
34
+ Requires-Dist: docstring-parser
35
+ Requires-Dist: typing-extensions>=3.7.4.3
36
+ Requires-Dist: shellingham>=1.3.0
37
+ Requires-Dist: rich>=10.11.0
38
+ Description-Content-Type: text/markdown
39
+
40
+ # doctyper
41
+
42
+ A wrapper around [Typer](https://typer.tiangolo.com) to simplify the creation of command-line interfaces (CLIs).
43
+ It use parsed docstrings to extract the arguments and options for the CLI commands.
44
+
45
+ - Features:
46
+ - Use Google-style docstrings to create help strings for arguments and options.
47
+ - Use type-aliased identifiers
48
+ - Interpret Literals (for choices)
49
+ - `SlimTyper` disables completion and pretty traceback
50
+
51
+ ```python
52
+ from typing import Literal
53
+
54
+ import doctyper
55
+ from typing_extensions import TypeAlias
56
+
57
+ Alias: TypeAlias = int
58
+
59
+
60
+ def main(
61
+ arg: str,
62
+ alias: Alias, # output uses original name
63
+ lit_arg: Literal["arg", "other"], # only strings allowed for literals
64
+ lit_opt: Literal["opt", "other"] = "opt",
65
+ other: int = 1,
66
+ flag: bool = False,
67
+ ) -> None:
68
+ """Run the main application.
69
+
70
+ Args:
71
+ arg: String argument.
72
+ alias: Argument using a aliased identifier.
73
+ other: Integer argument with default.
74
+ lit_arg: Argument with choices.
75
+ lit_opt: Option with choices and a default.
76
+ flag: Boolean flag.
77
+ """
78
+
79
+
80
+ if __name__ == "__main__":
81
+ app = doctyper.SlimTyper()
82
+ app.command()(main)
83
+ app()
84
+ ```
85
+
86
+ ![image](doctyper_output.png)
87
+
88
+ <p align="center">
89
+ <a href="https://typer.tiangolo.com"><img src="https://typer.tiangolo.com/img/logo-margin/logo-margin-vector.svg#only-light" alt="Typer"></a>
90
+
91
+ </p>
92
+ <p align="center">
93
+ <em>Typer, build great CLIs. Easy to code. Based on Python type hints.</em>
94
+ </p>
95
+ <p align="center">
96
+ <a href="https://github.com/fastapi/typer/actions?query=workflow%3ATest" target="_blank">
97
+ <img src="https://github.com/fastapi/typer/workflows/Test/badge.svg" alt="Test">
98
+ </a>
99
+ <a href="https://github.com/fastapi/typer/actions?query=workflow%3APublish" target="_blank">
100
+ <img src="https://github.com/fastapi/typer/workflows/Publish/badge.svg" alt="Publish">
101
+ </a>
102
+ <a href="https://coverage-badge.samuelcolvin.workers.dev/redirect/fastapi/typer" target="_blank">
103
+ <img src="https://coverage-badge.samuelcolvin.workers.dev/fastapi/typer.svg" alt="Coverage">
104
+ <a href="https://pypi.org/project/typer" target="_blank">
105
+ <img src="https://img.shields.io/pypi/v/typer?color=%2334D058&label=pypi%20package" alt="Package version">
106
+ </a>
107
+ </p>
108
+
109
+ ---
110
+
111
+ **Documentation**: <a href="https://typer.tiangolo.com" target="_blank">https://typer.tiangolo.com</a>
112
+
113
+ **Source Code**: <a href="https://github.com/fastapi/typer" target="_blank">https://github.com/fastapi/typer</a>
114
+
115
+ ---
116
+
117
+ Typer is a library for building <abbr title="command line interface, programs executed from a terminal">CLI</abbr> applications that users will **love using** and developers will **love creating**. Based on Python type hints.
118
+
119
+ It's also a command line tool to run scripts, automatically converting them to CLI applications.
120
+
121
+ The key features are:
122
+
123
+ * **Intuitive to write**: Great editor support. <abbr title="also known as auto-complete, autocompletion, IntelliSense">Completion</abbr> everywhere. Less time debugging. Designed to be easy to use and learn. Less time reading docs.
124
+ * **Easy to use**: It's easy to use for the final users. Automatic help, and automatic completion for all shells.
125
+ * **Short**: Minimize code duplication. Multiple features from each parameter declaration. Fewer bugs.
126
+ * **Start simple**: The simplest example adds only 2 lines of code to your app: **1 import, 1 function call**.
127
+ * **Grow large**: Grow in complexity as much as you want, create arbitrarily complex trees of commands and groups of subcommands, with options and arguments.
128
+ * **Run scripts**: Typer includes a `typer` command/program that you can use to run scripts, automatically converting them to CLIs, even if they don't use Typer internally.
129
+
130
+ ## FastAPI of CLIs
131
+
132
+ **Typer** is <a href="https://fastapi.tiangolo.com" class="external-link" target="_blank">FastAPI</a>'s little sibling, it's the FastAPI of CLIs.
133
+
134
+ ## Installation
135
+
136
+ Create and activate a <a href="https://typer.tiangolo.com/virtual-environments/" class="external-link" target="_blank">virtual environment</a> and then install **Typer**:
137
+
138
+ <div class="termy">
139
+
140
+ ```console
141
+ $ pip install typer
142
+ ---> 100%
143
+ Successfully installed typer rich shellingham
144
+ ```
145
+
146
+ </div>
147
+
148
+ ## Example
149
+
150
+ ### The absolute minimum
151
+
152
+ * Create a file `main.py` with:
153
+
154
+ ```Python
155
+ def main(name: str):
156
+ print(f"Hello {name}")
157
+ ```
158
+
159
+ This script doesn't even use Typer internally. But you can use the `typer` command to run it as a CLI application.
160
+
161
+ ### Run it
162
+
163
+ Run your application with the `typer` command:
164
+
165
+ <div class="termy">
166
+
167
+ ```console
168
+ // Run your application
169
+ $ typer main.py run
170
+
171
+ // You get a nice error, you are missing NAME
172
+ Usage: typer [PATH_OR_MODULE] run [OPTIONS] NAME
173
+ Try 'typer [PATH_OR_MODULE] run --help' for help.
174
+ ╭─ Error ───────────────────────────────────────────╮
175
+ │ Missing argument 'NAME'. │
176
+ ╰───────────────────────────────────────────────────╯
177
+
178
+
179
+ // You get a --help for free
180
+ $ typer main.py run --help
181
+
182
+ Usage: typer [PATH_OR_MODULE] run [OPTIONS] NAME
183
+
184
+ Run the provided Typer app.
185
+
186
+ ╭─ Arguments ───────────────────────────────────────╮
187
+ │ * name TEXT [default: None] [required] |
188
+ ╰───────────────────────────────────────────────────╯
189
+ ╭─ Options ─────────────────────────────────────────╮
190
+ │ --help Show this message and exit. │
191
+ ╰───────────────────────────────────────────────────╯
192
+
193
+ // Now pass the NAME argument
194
+ $ typer main.py run Camila
195
+
196
+ Hello Camila
197
+
198
+ // It works! 🎉
199
+ ```
200
+
201
+ </div>
202
+
203
+ This is the simplest use case, not even using Typer internally, but it can already be quite useful for simple scripts.
204
+
205
+ **Note**: auto-completion works when you create a Python package and run it with `--install-completion` or when you use the `typer` command.
206
+
207
+ ## Use Typer in your code
208
+
209
+ Now let's start using Typer in your own code, update `main.py` with:
210
+
211
+ ```Python
212
+ import typer
213
+
214
+
215
+ def main(name: str):
216
+ print(f"Hello {name}")
217
+
218
+
219
+ if __name__ == "__main__":
220
+ typer.run(main)
221
+ ```
222
+
223
+ Now you could run it with Python directly:
224
+
225
+ <div class="termy">
226
+
227
+ ```console
228
+ // Run your application
229
+ $ python main.py
230
+
231
+ // You get a nice error, you are missing NAME
232
+ Usage: main.py [OPTIONS] NAME
233
+ Try 'main.py --help' for help.
234
+ ╭─ Error ───────────────────────────────────────────╮
235
+ │ Missing argument 'NAME'. │
236
+ ╰───────────────────────────────────────────────────╯
237
+
238
+
239
+ // You get a --help for free
240
+ $ python main.py --help
241
+
242
+ Usage: main.py [OPTIONS] NAME
243
+
244
+ ╭─ Arguments ───────────────────────────────────────╮
245
+ │ * name TEXT [default: None] [required] |
246
+ ╰───────────────────────────────────────────────────╯
247
+ ╭─ Options ─────────────────────────────────────────╮
248
+ │ --help Show this message and exit. │
249
+ ╰───────────────────────────────────────────────────╯
250
+
251
+ // Now pass the NAME argument
252
+ $ python main.py Camila
253
+
254
+ Hello Camila
255
+
256
+ // It works! 🎉
257
+ ```
258
+
259
+ </div>
260
+
261
+ **Note**: you can also call this same script with the `typer` command, but you don't need to.
262
+
263
+ ## Example upgrade
264
+
265
+ This was the simplest example possible.
266
+
267
+ Now let's see one a bit more complex.
268
+
269
+ ### An example with two subcommands
270
+
271
+ Modify the file `main.py`.
272
+
273
+ Create a `typer.Typer()` app, and create two subcommands with their parameters.
274
+
275
+ ```Python hl_lines="3 6 11 20"
276
+ import typer
277
+
278
+ app = typer.Typer()
279
+
280
+
281
+ @app.command()
282
+ def hello(name: str):
283
+ print(f"Hello {name}")
284
+
285
+
286
+ @app.command()
287
+ def goodbye(name: str, formal: bool = False):
288
+ if formal:
289
+ print(f"Goodbye Ms. {name}. Have a good day.")
290
+ else:
291
+ print(f"Bye {name}!")
292
+
293
+
294
+ if __name__ == "__main__":
295
+ app()
296
+ ```
297
+
298
+ And that will:
299
+
300
+ * Explicitly create a `typer.Typer` app.
301
+ * The previous `typer.run` actually creates one implicitly for you.
302
+ * Add two subcommands with `@app.command()`.
303
+ * Execute the `app()` itself, as if it was a function (instead of `typer.run`).
304
+
305
+ ### Run the upgraded example
306
+
307
+ Check the new help:
308
+
309
+ <div class="termy">
310
+
311
+ ```console
312
+ $ python main.py --help
313
+
314
+ Usage: main.py [OPTIONS] COMMAND [ARGS]...
315
+
316
+ ╭─ Options ─────────────────────────────────────────╮
317
+ │ --install-completion Install completion │
318
+ │ for the current │
319
+ │ shell. │
320
+ │ --show-completion Show completion for │
321
+ │ the current shell, │
322
+ │ to copy it or │
323
+ │ customize the │
324
+ │ installation. │
325
+ │ --help Show this message │
326
+ │ and exit. │
327
+ ╰───────────────────────────────────────────────────╯
328
+ ╭─ Commands ────────────────────────────────────────╮
329
+ │ goodbye │
330
+ │ hello │
331
+ ╰───────────────────────────────────────────────────╯
332
+
333
+ // When you create a package you get ✨ auto-completion ✨ for free, installed with --install-completion
334
+
335
+ // You have 2 subcommands (the 2 functions): goodbye and hello
336
+ ```
337
+
338
+ </div>
339
+
340
+ Now check the help for the `hello` command:
341
+
342
+ <div class="termy">
343
+
344
+ ```console
345
+ $ python main.py hello --help
346
+
347
+ Usage: main.py hello [OPTIONS] NAME
348
+
349
+ ╭─ Arguments ───────────────────────────────────────╮
350
+ │ * name TEXT [default: None] [required] │
351
+ ╰───────────────────────────────────────────────────╯
352
+ ╭─ Options ─────────────────────────────────────────╮
353
+ │ --help Show this message and exit. │
354
+ ╰───────────────────────────────────────────────────╯
355
+ ```
356
+
357
+ </div>
358
+
359
+ And now check the help for the `goodbye` command:
360
+
361
+ <div class="termy">
362
+
363
+ ```console
364
+ $ python main.py goodbye --help
365
+
366
+ Usage: main.py goodbye [OPTIONS] NAME
367
+
368
+ ╭─ Arguments ───────────────────────────────────────╮
369
+ │ * name TEXT [default: None] [required] │
370
+ ╰───────────────────────────────────────────────────╯
371
+ ╭─ Options ─────────────────────────────────────────╮
372
+ │ --formal --no-formal [default: no-formal] │
373
+ │ --help Show this message │
374
+ │ and exit. │
375
+ ╰───────────────────────────────────────────────────╯
376
+
377
+ // Automatic --formal and --no-formal for the bool option 🎉
378
+ ```
379
+
380
+ </div>
381
+
382
+ Now you can try out the new command line application:
383
+
384
+ <div class="termy">
385
+
386
+ ```console
387
+ // Use it with the hello command
388
+
389
+ $ python main.py hello Camila
390
+
391
+ Hello Camila
392
+
393
+ // And with the goodbye command
394
+
395
+ $ python main.py goodbye Camila
396
+
397
+ Bye Camila!
398
+
399
+ // And with --formal
400
+
401
+ $ python main.py goodbye --formal Camila
402
+
403
+ Goodbye Ms. Camila. Have a good day.
404
+ ```
405
+
406
+ </div>
407
+
408
+ ### Recap
409
+
410
+ In summary, you declare **once** the types of parameters (*CLI arguments* and *CLI options*) as function parameters.
411
+
412
+ You do that with standard modern Python types.
413
+
414
+ You don't have to learn a new syntax, the methods or classes of a specific library, etc.
415
+
416
+ Just standard **Python**.
417
+
418
+ For example, for an `int`:
419
+
420
+ ```Python
421
+ total: int
422
+ ```
423
+
424
+ or for a `bool` flag:
425
+
426
+ ```Python
427
+ force: bool
428
+ ```
429
+
430
+ And similarly for **files**, **paths**, **enums** (choices), etc. And there are tools to create **groups of subcommands**, add metadata, extra **validation**, etc.
431
+
432
+ **You get**: great editor support, including **completion** and **type checks** everywhere.
433
+
434
+ **Your users get**: automatic **`--help`**, **auto-completion** in their terminal (Bash, Zsh, Fish, PowerShell) when they install your package or when using the `typer` command.
435
+
436
+ For a more complete example including more features, see the <a href="https://typer.tiangolo.com/tutorial/">Tutorial - User Guide</a>.
437
+
438
+ ## Dependencies
439
+
440
+ **Typer** stands on the shoulders of a giant. Its only internal required dependency is <a href="https://click.palletsprojects.com/" class="external-link" target="_blank">Click</a>.
441
+
442
+ By default it also comes with extra standard dependencies:
443
+
444
+ * <a href="https://rich.readthedocs.io/en/stable/index.html" class="external-link" target="_blank"><code>rich</code></a>: to show nicely formatted errors automatically.
445
+ * <a href="https://github.com/sarugaku/shellingham" class="external-link" target="_blank"><code>shellingham</code></a>: to automatically detect the current shell when installing completion.
446
+ * With `shellingham` you can just use `--install-completion`.
447
+ * Without `shellingham`, you have to pass the name of the shell to install completion for, e.g. `--install-completion bash`.
448
+
449
+ ### `typer-slim`
450
+
451
+ If you don't want the extra standard optional dependencies, install `typer-slim` instead.
452
+
453
+ When you install with:
454
+
455
+ ```bash
456
+ pip install typer
457
+ ```
458
+
459
+ ...it includes the same code and dependencies as:
460
+
461
+ ```bash
462
+ pip install "typer-slim[standard]"
463
+ ```
464
+
465
+ The `standard` extra dependencies are `rich` and `shellingham`.
466
+
467
+ **Note**: The `typer` command is only included in the `typer` package.
468
+
469
+ ## License
470
+
471
+ This project is licensed under the terms of the MIT license.