chutils 2.8.0__tar.gz → 3.0.0__tar.gz

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (472) hide show
  1. chutils-3.0.0/.gitattributes +2 -0
  2. chutils-3.0.0/.github/workflows/ci.yml +45 -0
  3. chutils-3.0.0/.github/workflows/publish-docs.yml +34 -0
  4. chutils-3.0.0/.gitignore +0 -0
  5. chutils-3.0.0/CODE_OF_CONDUCT.md +125 -0
  6. chutils-3.0.0/CONTRIBUTING.md +70 -0
  7. chutils-3.0.0/GEMINI.md +49 -0
  8. {chutils-2.8.0 → chutils-3.0.0}/PKG-INFO +52 -44
  9. {chutils-2.8.0 → chutils-3.0.0}/README.md +381 -380
  10. chutils-3.0.0/api_map.md +166 -0
  11. chutils-3.0.0/benchmarks/cold_start.py +61 -0
  12. chutils-3.0.0/changelog.txt +370 -0
  13. chutils-3.0.0/conductor/GEMINI.md +2 -0
  14. chutils-3.0.0/conductor/archive/ai_lint_inline_ignore_20260707/index.md +5 -0
  15. chutils-3.0.0/conductor/archive/ai_lint_inline_ignore_20260707/metadata.json +8 -0
  16. chutils-3.0.0/conductor/archive/ai_lint_inline_ignore_20260707/plan.md +22 -0
  17. chutils-3.0.0/conductor/archive/ai_lint_inline_ignore_20260707/spec.md +39 -0
  18. chutils-3.0.0/conductor/archive/captcha_20260707/index.md +5 -0
  19. chutils-3.0.0/conductor/archive/captcha_20260707/metadata.json +8 -0
  20. chutils-3.0.0/conductor/archive/captcha_20260707/plan.md +41 -0
  21. chutils-3.0.0/conductor/archive/captcha_20260707/spec.md +52 -0
  22. chutils-3.0.0/conductor/archive/chat_context_20260610/index.md +5 -0
  23. chutils-3.0.0/conductor/archive/chat_context_20260610/metadata.json +8 -0
  24. chutils-3.0.0/conductor/archive/chat_context_20260610/plan.md +39 -0
  25. chutils-3.0.0/conductor/archive/chat_context_20260610/spec.md +36 -0
  26. chutils-3.0.0/conductor/archive/circuit_breaker_20260521/index.md +5 -0
  27. chutils-3.0.0/conductor/archive/circuit_breaker_20260521/metadata.json +8 -0
  28. chutils-3.0.0/conductor/archive/circuit_breaker_20260521/plan.md +45 -0
  29. chutils-3.0.0/conductor/archive/circuit_breaker_20260521/spec.md +50 -0
  30. chutils-3.0.0/conductor/archive/cli_scaffold_20260610/index.md +5 -0
  31. chutils-3.0.0/conductor/archive/cli_scaffold_20260610/metadata.json +8 -0
  32. chutils-3.0.0/conductor/archive/cli_scaffold_20260610/plan.md +40 -0
  33. chutils-3.0.0/conductor/archive/cli_scaffold_20260610/spec.md +50 -0
  34. chutils-3.0.0/conductor/archive/config_required_20260708/index.md +5 -0
  35. chutils-3.0.0/conductor/archive/config_required_20260708/metadata.json +8 -0
  36. chutils-3.0.0/conductor/archive/config_required_20260708/plan.md +27 -0
  37. chutils-3.0.0/conductor/archive/config_required_20260708/spec.md +52 -0
  38. chutils-3.0.0/conductor/archive/dependency_errors_20260707/index.md +5 -0
  39. chutils-3.0.0/conductor/archive/dependency_errors_20260707/metadata.json +8 -0
  40. chutils-3.0.0/conductor/archive/dependency_errors_20260707/plan.md +27 -0
  41. chutils-3.0.0/conductor/archive/dependency_errors_20260707/spec.md +37 -0
  42. chutils-3.0.0/conductor/archive/dev_install_hooks_20260707/index.md +5 -0
  43. chutils-3.0.0/conductor/archive/dev_install_hooks_20260707/metadata.json +8 -0
  44. chutils-3.0.0/conductor/archive/dev_install_hooks_20260707/plan.md +23 -0
  45. chutils-3.0.0/conductor/archive/dev_install_hooks_20260707/spec.md +50 -0
  46. chutils-3.0.0/conductor/archive/drop_python39_20260610/index.md +5 -0
  47. chutils-3.0.0/conductor/archive/drop_python39_20260610/metadata.json +8 -0
  48. chutils-3.0.0/conductor/archive/drop_python39_20260610/plan.md +43 -0
  49. chutils-3.0.0/conductor/archive/drop_python39_20260610/spec.md +44 -0
  50. chutils-3.0.0/conductor/archive/exception_groups_20260708/index.md +5 -0
  51. chutils-3.0.0/conductor/archive/exception_groups_20260708/metadata.json +8 -0
  52. chutils-3.0.0/conductor/archive/exception_groups_20260708/plan.md +22 -0
  53. chutils-3.0.0/conductor/archive/exception_groups_20260708/spec.md +71 -0
  54. chutils-3.0.0/conductor/archive/generate_few_shot_20260610/index.md +5 -0
  55. chutils-3.0.0/conductor/archive/generate_few_shot_20260610/metadata.json +8 -0
  56. chutils-3.0.0/conductor/archive/generate_few_shot_20260610/plan.md +42 -0
  57. chutils-3.0.0/conductor/archive/generate_few_shot_20260610/spec.md +44 -0
  58. chutils-3.0.0/conductor/archive/mock_server_20260610/index.md +5 -0
  59. chutils-3.0.0/conductor/archive/mock_server_20260610/metadata.json +8 -0
  60. chutils-3.0.0/conductor/archive/mock_server_20260610/plan.md +43 -0
  61. chutils-3.0.0/conductor/archive/mock_server_20260610/spec.md +40 -0
  62. chutils-3.0.0/conductor/archive/optional_dependencies_20260515/index.md +5 -0
  63. chutils-3.0.0/conductor/archive/optional_dependencies_20260515/metadata.json +8 -0
  64. chutils-3.0.0/conductor/archive/optional_dependencies_20260515/plan.md +38 -0
  65. chutils-3.0.0/conductor/archive/optional_dependencies_20260515/spec.md +25 -0
  66. chutils-3.0.0/conductor/archive/scraping_humanize_20260707/index.md +5 -0
  67. chutils-3.0.0/conductor/archive/scraping_humanize_20260707/metadata.json +8 -0
  68. chutils-3.0.0/conductor/archive/scraping_humanize_20260707/plan.md +50 -0
  69. chutils-3.0.0/conductor/archive/scraping_humanize_20260707/spec.md +51 -0
  70. chutils-3.0.0/conductor/archive/secrets_unification_20260708/index.md +5 -0
  71. chutils-3.0.0/conductor/archive/secrets_unification_20260708/metadata.json +8 -0
  72. chutils-3.0.0/conductor/archive/secrets_unification_20260708/plan.md +31 -0
  73. chutils-3.0.0/conductor/archive/secrets_unification_20260708/spec.md +47 -0
  74. chutils-3.0.0/conductor/archive/web_20260707/index.md +5 -0
  75. chutils-3.0.0/conductor/archive/web_20260707/metadata.json +8 -0
  76. chutils-3.0.0/conductor/archive/web_20260707/plan.md +45 -0
  77. chutils-3.0.0/conductor/archive/web_20260707/spec.md +49 -0
  78. chutils-3.0.0/conductor/code_styleguides/python.md +72 -0
  79. chutils-3.0.0/conductor/index.md +14 -0
  80. chutils-3.0.0/conductor/product-guidelines.md +37 -0
  81. chutils-3.0.0/conductor/product.md +196 -0
  82. chutils-3.0.0/conductor/setup_state.json +1 -0
  83. chutils-3.0.0/conductor/tech-stack.md +135 -0
  84. chutils-3.0.0/conductor/tracks/audit_20260702/index.md +5 -0
  85. chutils-3.0.0/conductor/tracks/audit_20260702/metadata.json +8 -0
  86. chutils-3.0.0/conductor/tracks/audit_20260702/plan.md +31 -0
  87. chutils-3.0.0/conductor/tracks/audit_20260702/spec.md +53 -0
  88. chutils-3.0.0/conductor/tracks/bulkhead_20260702/index.md +5 -0
  89. chutils-3.0.0/conductor/tracks/bulkhead_20260702/metadata.json +8 -0
  90. chutils-3.0.0/conductor/tracks/bulkhead_20260702/plan.md +25 -0
  91. chutils-3.0.0/conductor/tracks/bulkhead_20260702/spec.md +46 -0
  92. chutils-3.0.0/conductor/tracks/cloud_secret_managers_20260511/index.md +5 -0
  93. chutils-3.0.0/conductor/tracks/cloud_secret_managers_20260511/metadata.json +8 -0
  94. chutils-3.0.0/conductor/tracks/cloud_secret_managers_20260511/plan.md +44 -0
  95. chutils-3.0.0/conductor/tracks/cloud_secret_managers_20260511/spec.md +42 -0
  96. chutils-3.0.0/conductor/tracks/config_remote_push_20260702/index.md +5 -0
  97. chutils-3.0.0/conductor/tracks/config_remote_push_20260702/metadata.json +8 -0
  98. chutils-3.0.0/conductor/tracks/config_remote_push_20260702/plan.md +29 -0
  99. chutils-3.0.0/conductor/tracks/config_remote_push_20260702/spec.md +47 -0
  100. chutils-3.0.0/conductor/tracks/db_manager_20260707/index.md +5 -0
  101. chutils-3.0.0/conductor/tracks/db_manager_20260707/metadata.json +8 -0
  102. chutils-3.0.0/conductor/tracks/db_manager_20260707/plan.md +29 -0
  103. chutils-3.0.0/conductor/tracks/db_manager_20260707/spec.md +41 -0
  104. chutils-3.0.0/conductor/tracks/db_migrations_cli_20260707/index.md +5 -0
  105. chutils-3.0.0/conductor/tracks/db_migrations_cli_20260707/metadata.json +8 -0
  106. chutils-3.0.0/conductor/tracks/db_migrations_cli_20260707/plan.md +27 -0
  107. chutils-3.0.0/conductor/tracks/db_migrations_cli_20260707/spec.md +40 -0
  108. chutils-3.0.0/conductor/tracks/dev_clean_20260707/index.md +5 -0
  109. chutils-3.0.0/conductor/tracks/dev_clean_20260707/metadata.json +8 -0
  110. chutils-3.0.0/conductor/tracks/dev_clean_20260707/plan.md +44 -0
  111. chutils-3.0.0/conductor/tracks/dev_clean_20260707/spec.md +55 -0
  112. chutils-3.0.0/conductor/tracks/dev_dashboard_20260610/index.md +5 -0
  113. chutils-3.0.0/conductor/tracks/dev_dashboard_20260610/metadata.json +8 -0
  114. chutils-3.0.0/conductor/tracks/dev_dashboard_20260610/plan.md +39 -0
  115. chutils-3.0.0/conductor/tracks/dev_dashboard_20260610/spec.md +43 -0
  116. chutils-3.0.0/conductor/tracks/dev_watch_20260702/index.md +5 -0
  117. chutils-3.0.0/conductor/tracks/dev_watch_20260702/metadata.json +8 -0
  118. chutils-3.0.0/conductor/tracks/dev_watch_20260702/plan.md +29 -0
  119. chutils-3.0.0/conductor/tracks/dev_watch_20260702/spec.md +52 -0
  120. chutils-3.0.0/conductor/tracks/diagnostics_20260610/index.md +5 -0
  121. chutils-3.0.0/conductor/tracks/diagnostics_20260610/metadata.json +8 -0
  122. chutils-3.0.0/conductor/tracks/diagnostics_20260610/plan.md +42 -0
  123. chutils-3.0.0/conductor/tracks/diagnostics_20260610/spec.md +40 -0
  124. chutils-3.0.0/conductor/tracks/docstring_audit_20260521/index.md +5 -0
  125. chutils-3.0.0/conductor/tracks/docstring_audit_20260521/metadata.json +8 -0
  126. chutils-3.0.0/conductor/tracks/docstring_audit_20260521/plan.md +38 -0
  127. chutils-3.0.0/conductor/tracks/docstring_audit_20260521/spec.md +34 -0
  128. chutils-3.0.0/conductor/tracks/env_20260702/index.md +5 -0
  129. chutils-3.0.0/conductor/tracks/env_20260702/metadata.json +8 -0
  130. chutils-3.0.0/conductor/tracks/env_20260702/plan.md +33 -0
  131. chutils-3.0.0/conductor/tracks/env_20260702/spec.md +53 -0
  132. chutils-3.0.0/conductor/tracks/fallback_alias_20260707/index.md +5 -0
  133. chutils-3.0.0/conductor/tracks/fallback_alias_20260707/metadata.json +8 -0
  134. chutils-3.0.0/conductor/tracks/fallback_alias_20260707/plan.md +27 -0
  135. chutils-3.0.0/conductor/tracks/fallback_alias_20260707/spec.md +37 -0
  136. chutils-3.0.0/conductor/tracks/http_20260702/index.md +5 -0
  137. chutils-3.0.0/conductor/tracks/http_20260702/metadata.json +8 -0
  138. chutils-3.0.0/conductor/tracks/http_20260702/plan.md +28 -0
  139. chutils-3.0.0/conductor/tracks/http_20260702/spec.md +44 -0
  140. chutils-3.0.0/conductor/tracks/plan.md +1 -0
  141. chutils-3.0.0/conductor/tracks/profile_imports_20260610/index.md +5 -0
  142. chutils-3.0.0/conductor/tracks/profile_imports_20260610/metadata.json +8 -0
  143. chutils-3.0.0/conductor/tracks/profile_imports_20260610/plan.md +42 -0
  144. chutils-3.0.0/conductor/tracks/profile_imports_20260610/spec.md +40 -0
  145. chutils-3.0.0/conductor/tracks/qt_integration_20260521/index.md +5 -0
  146. chutils-3.0.0/conductor/tracks/qt_integration_20260521/metadata.json +8 -0
  147. chutils-3.0.0/conductor/tracks/qt_integration_20260521/plan.md +30 -0
  148. chutils-3.0.0/conductor/tracks/qt_integration_20260521/spec.md +31 -0
  149. chutils-3.0.0/conductor/tracks/qt_typed_signals_20260521/index.md +5 -0
  150. chutils-3.0.0/conductor/tracks/qt_typed_signals_20260521/metadata.json +8 -0
  151. chutils-3.0.0/conductor/tracks/qt_typed_signals_20260521/plan.md +27 -0
  152. chutils-3.0.0/conductor/tracks/qt_typed_signals_20260521/spec.md +22 -0
  153. chutils-3.0.0/conductor/tracks/scraping_concurrency_20260707/index.md +5 -0
  154. chutils-3.0.0/conductor/tracks/scraping_concurrency_20260707/metadata.json +8 -0
  155. chutils-3.0.0/conductor/tracks/scraping_concurrency_20260707/plan.md +45 -0
  156. chutils-3.0.0/conductor/tracks/scraping_concurrency_20260707/spec.md +46 -0
  157. chutils-3.0.0/conductor/tracks/store_20260702/index.md +5 -0
  158. chutils-3.0.0/conductor/tracks/store_20260702/metadata.json +8 -0
  159. chutils-3.0.0/conductor/tracks/store_20260702/plan.md +32 -0
  160. chutils-3.0.0/conductor/tracks/store_20260702/spec.md +42 -0
  161. chutils-3.0.0/conductor/tracks/sync_env_20260707/index.md +5 -0
  162. chutils-3.0.0/conductor/tracks/sync_env_20260707/metadata.json +8 -0
  163. chutils-3.0.0/conductor/tracks/sync_env_20260707/plan.md +37 -0
  164. chutils-3.0.0/conductor/tracks/sync_env_20260707/spec.md +45 -0
  165. chutils-3.0.0/conductor/tracks/validation_20260702/index.md +5 -0
  166. chutils-3.0.0/conductor/tracks/validation_20260702/metadata.json +8 -0
  167. chutils-3.0.0/conductor/tracks/validation_20260702/plan.md +29 -0
  168. chutils-3.0.0/conductor/tracks/validation_20260702/spec.md +42 -0
  169. chutils-3.0.0/conductor/tracks.md +112 -0
  170. chutils-3.0.0/conductor/workflow.md +33 -0
  171. chutils-3.0.0/docs/CODE_OF_CONDUCT_RU.md +62 -0
  172. chutils-3.0.0/docs/CONTRIBUTING_RU.md +73 -0
  173. chutils-3.0.0/docs/INTEGRATION_AI.md +90 -0
  174. chutils-3.0.0/docs/README_RU.md +393 -0
  175. chutils-3.0.0/docs/ai_examples/README.md +78 -0
  176. chutils-3.0.0/docs/ai_examples/configuration/README.md +65 -0
  177. chutils-3.0.0/docs/ai_examples/configuration/bad_pattern.py +20 -0
  178. chutils-3.0.0/docs/ai_examples/configuration/good_pattern.py +83 -0
  179. chutils-3.0.0/docs/ai_examples/error_handling/README.md +71 -0
  180. chutils-3.0.0/docs/ai_examples/error_handling/bad_pattern.py +26 -0
  181. chutils-3.0.0/docs/ai_examples/error_handling/good_pattern.py +91 -0
  182. chutils-3.0.0/docs/ai_examples/logging/README.md +74 -0
  183. chutils-3.0.0/docs/ai_examples/logging/bad_pattern.py +25 -0
  184. chutils-3.0.0/docs/ai_examples/logging/good_pattern.py +38 -0
  185. chutils-3.0.0/docs/ai_examples/optional_deps/README.md +93 -0
  186. chutils-3.0.0/docs/ai_examples/optional_deps/bad_pattern.py +46 -0
  187. chutils-3.0.0/docs/ai_examples/optional_deps/good_pattern.py +65 -0
  188. chutils-3.0.0/docs/ai_examples/secrets/README.md +66 -0
  189. chutils-3.0.0/docs/ai_examples/secrets/bad_pattern.py +34 -0
  190. chutils-3.0.0/docs/ai_examples/secrets/good_pattern.py +55 -0
  191. chutils-3.0.0/docs/ai_hints.md +49 -0
  192. chutils-3.0.0/docs/ai_lint.md +339 -0
  193. chutils-3.0.0/docs/api.md +287 -0
  194. chutils-3.0.0/docs/captcha.md +110 -0
  195. chutils-3.0.0/docs/cli/config.md +97 -0
  196. chutils-3.0.0/docs/cli/dev.md +402 -0
  197. chutils-3.0.0/docs/cli/index.md +59 -0
  198. chutils-3.0.0/docs/cli/init.md +89 -0
  199. chutils-3.0.0/docs/cli/secrets.md +193 -0
  200. chutils-3.0.0/docs/cli/show_paths.md +90 -0
  201. chutils-3.0.0/docs/cli/template.md +87 -0
  202. chutils-3.0.0/docs/cli/validate.md +78 -0
  203. chutils-3.0.0/docs/dependencies.md +104 -0
  204. chutils-3.0.0/docs/index.md +24 -0
  205. chutils-3.0.0/docs/migration.md +237 -0
  206. chutils-3.0.0/docs/plugins.md +189 -0
  207. chutils-3.0.0/docs/recipes.md +1243 -0
  208. chutils-3.0.0/docs/scraping.md +160 -0
  209. chutils-3.0.0/docs/testing.md +102 -0
  210. chutils-3.0.0/docs/web.md +126 -0
  211. chutils-3.0.0/examples/.env +13 -0
  212. chutils-3.0.0/examples/01_configuration.py +50 -0
  213. chutils-3.0.0/examples/02_logging.py +46 -0
  214. chutils-3.0.0/examples/03_secrets.py +74 -0
  215. chutils-3.0.0/examples/04_full_example.py +66 -0
  216. chutils-3.0.0/examples/05_different_log_levels.py +50 -0
  217. chutils-3.0.0/examples/06_local_config_override.py +75 -0
  218. chutils-3.0.0/examples/07_decorators_example.py +41 -0
  219. chutils-3.0.0/examples/08_multiple_loggers_example.py +34 -0
  220. chutils-3.0.0/examples/09_disable_keyring.py +42 -0
  221. chutils-3.0.0/examples/10_universal_env_override.py +43 -0
  222. chutils-3.0.0/examples/11_retry_decorator.py +57 -0
  223. chutils-3.0.0/examples/12_secret_masking.py +51 -0
  224. chutils-3.0.0/examples/13_pydantic_validation.py +85 -0
  225. chutils-3.0.0/examples/15_context_logging.py +90 -0
  226. chutils-3.0.0/examples/17_timeout_decorator.py +62 -0
  227. chutils-3.0.0/examples/18_config_hot_reload.py +97 -0
  228. chutils-3.0.0/examples/19_remote_config.py +95 -0
  229. chutils-3.0.0/examples/20_opentelemetry_tracing.py +49 -0
  230. chutils-3.0.0/examples/21_config_diagnostics.py +45 -0
  231. chutils-3.0.0/examples/22_circuit_breaker_decorator.py +83 -0
  232. chutils-3.0.0/examples/22_safe_path_resolution.py +88 -0
  233. chutils-3.0.0/examples/23_event_bus.py +121 -0
  234. chutils-3.0.0/examples/24_task_scheduler.py +61 -0
  235. chutils-3.0.0/examples/25_testing_fixtures_example.py +85 -0
  236. chutils-3.0.0/examples/26_metrics_prometheus.py +69 -0
  237. chutils-3.0.0/examples/27_rate_limiting.py +77 -0
  238. chutils-3.0.0/examples/28_dependency_injection.py +78 -0
  239. chutils-3.0.0/examples/captcha_solvers_usage.py +67 -0
  240. chutils-3.0.0/examples/config.yml +63 -0
  241. chutils-3.0.0/examples/scraping_humanize_usage.py +67 -0
  242. chutils-3.0.0/examples/web_client_usage.py +86 -0
  243. chutils-3.0.0/mkdocs.yml +56 -0
  244. chutils-3.0.0/project_index.json +18684 -0
  245. chutils-3.0.0/pyproject.toml +124 -0
  246. {chutils-2.8.0 → chutils-3.0.0}/src/chutils/__init__.py +94 -0
  247. chutils-3.0.0/src/chutils/__init__.pyi +771 -0
  248. {chutils-2.8.0 → chutils-3.0.0}/src/chutils/cache/base.py +5 -5
  249. {chutils-2.8.0 → chutils-3.0.0}/src/chutils/cache/decorator.py +3 -2
  250. {chutils-2.8.0 → chutils-3.0.0}/src/chutils/cache/in_memory.py +44 -5
  251. {chutils-2.8.0 → chutils-3.0.0}/src/chutils/cache/utils.py +4 -4
  252. {chutils-2.8.0 → chutils-3.0.0}/src/chutils/cli.py +10 -4
  253. {chutils-2.8.0 → chutils-3.0.0}/src/chutils/cli_booster.py +5 -4
  254. {chutils-2.8.0 → chutils-3.0.0}/src/chutils/cli_utils.py +5 -7
  255. {chutils-2.8.0 → chutils-3.0.0}/src/chutils/commands/__init__.py +1 -1
  256. {chutils-2.8.0 → chutils-3.0.0}/src/chutils/commands/config.py +18 -0
  257. chutils-3.0.0/src/chutils/commands/dev.py +704 -0
  258. {chutils-2.8.0 → chutils-3.0.0}/src/chutils/commands/init.py +4 -5
  259. chutils-3.0.0/src/chutils/commands/secrets.py +198 -0
  260. {chutils-2.8.0 → chutils-3.0.0}/src/chutils/config/__init__.py +8 -66
  261. chutils-3.0.0/src/chutils/config/ast_fallback_parser.py +137 -0
  262. {chutils-2.8.0 → chutils-3.0.0}/src/chutils/config/core.py +62 -12
  263. {chutils-2.8.0 → chutils-3.0.0}/src/chutils/config/dev.py +2 -3
  264. {chutils-2.8.0 → chutils-3.0.0}/src/chutils/config/diagnostics.py +6 -6
  265. {chutils-2.8.0 → chutils-3.0.0}/src/chutils/config/generator.py +4 -5
  266. {chutils-2.8.0 → chutils-3.0.0}/src/chutils/config/getters.py +148 -52
  267. {chutils-2.8.0 → chutils-3.0.0}/src/chutils/config/manager.py +37 -36
  268. {chutils-2.8.0 → chutils-3.0.0}/src/chutils/config/providers.py +17 -16
  269. {chutils-2.8.0 → chutils-3.0.0}/src/chutils/config/schema.py +3 -4
  270. {chutils-2.8.0 → chutils-3.0.0}/src/chutils/config/utils.py +37 -18
  271. {chutils-2.8.0 → chutils-3.0.0}/src/chutils/config/watcher.py +3 -2
  272. chutils-3.0.0/src/chutils/crypto.py +164 -0
  273. chutils-3.0.0/src/chutils/decorators.py +586 -0
  274. chutils-3.0.0/src/chutils/dev/__init__.py +21 -0
  275. {chutils-2.8.0 → chutils-3.0.0}/src/chutils/dev/ai_lint.py +62 -9
  276. {chutils-2.8.0 → chutils-3.0.0}/src/chutils/dev/ast_indexer.py +127 -21
  277. chutils-3.0.0/src/chutils/dev/chat_context.py +355 -0
  278. chutils-3.0.0/src/chutils/dev/generate_few_shot.py +1004 -0
  279. chutils-3.0.0/src/chutils/dev/mock_server.py +464 -0
  280. {chutils-2.8.0 → chutils-3.0.0}/src/chutils/dev/models.py +13 -13
  281. {chutils-2.8.0 → chutils-3.0.0}/src/chutils/dev/rules.py +6 -6
  282. chutils-3.0.0/src/chutils/dev/scaffold.py +410 -0
  283. chutils-3.0.0/src/chutils/di/__init__.py +9 -0
  284. chutils-3.0.0/src/chutils/di/container.py +303 -0
  285. chutils-3.0.0/src/chutils/events/__init__.py +22 -0
  286. chutils-3.0.0/src/chutils/events/core.py +255 -0
  287. chutils-3.0.0/src/chutils/exceptions.py +240 -0
  288. {chutils-2.8.0 → chutils-3.0.0}/src/chutils/features.py +11 -10
  289. chutils-3.0.0/src/chutils/fs.py +462 -0
  290. {chutils-2.8.0 → chutils-3.0.0}/src/chutils/lifecycle.py +8 -7
  291. {chutils-2.8.0 → chutils-3.0.0}/src/chutils/logger/__init__.py +2 -0
  292. {chutils-2.8.0 → chutils-3.0.0}/src/chutils/logger/core.py +61 -16
  293. {chutils-2.8.0 → chutils-3.0.0}/src/chutils/logger/internal/builder.py +50 -28
  294. {chutils-2.8.0 → chutils-3.0.0}/src/chutils/logger/internal/utils.py +3 -4
  295. {chutils-2.8.0 → chutils-3.0.0}/src/chutils/logger/masking.py +4 -4
  296. chutils-3.0.0/src/chutils/metrics/__init__.py +135 -0
  297. chutils-3.0.0/src/chutils/metrics/base.py +42 -0
  298. chutils-3.0.0/src/chutils/metrics/in_memory.py +141 -0
  299. chutils-3.0.0/src/chutils/metrics/prometheus.py +88 -0
  300. chutils-3.0.0/src/chutils/metrics/timer.py +73 -0
  301. chutils-3.0.0/src/chutils/plugins/__init__.py +24 -0
  302. chutils-3.0.0/src/chutils/plugins/core.py +115 -0
  303. chutils-3.0.0/src/chutils/plugins/interfaces.py +74 -0
  304. chutils-3.0.0/src/chutils/scraping/__init__.py +4 -0
  305. chutils-3.0.0/src/chutils/scraping/captcha/__init__.py +69 -0
  306. chutils-3.0.0/src/chutils/scraping/captcha/anticaptcha.py +227 -0
  307. chutils-3.0.0/src/chutils/scraping/captcha/base.py +61 -0
  308. chutils-3.0.0/src/chutils/scraping/captcha/capmonster.py +227 -0
  309. chutils-3.0.0/src/chutils/scraping/captcha/exceptions.py +21 -0
  310. chutils-3.0.0/src/chutils/scraping/captcha/rucaptcha.py +245 -0
  311. chutils-3.0.0/src/chutils/scraping/humanize/__init__.py +33 -0
  312. chutils-3.0.0/src/chutils/scraping/humanize/actions.py +206 -0
  313. chutils-3.0.0/src/chutils/scraping/humanize/antidetect.py +111 -0
  314. chutils-3.0.0/src/chutils/scraping/humanize/math_utils.py +209 -0
  315. {chutils-2.8.0 → chutils-3.0.0}/src/chutils/secret_manager/core.py +88 -44
  316. {chutils-2.8.0 → chutils-3.0.0}/src/chutils/secret_manager/providers.py +44 -9
  317. chutils-3.0.0/src/chutils/tasks/__init__.py +22 -0
  318. chutils-3.0.0/src/chutils/tasks/core.py +255 -0
  319. {chutils-2.8.0 → chutils-3.0.0}/src/chutils/testing/fixtures.py +12 -10
  320. chutils-3.0.0/src/chutils/text.py +59 -0
  321. {chutils-2.8.0 → chutils-3.0.0}/src/chutils/time.py +3 -3
  322. {chutils-2.8.0 → chutils-3.0.0}/src/chutils/tracing.py +6 -6
  323. {chutils-2.8.0 → chutils-3.0.0}/src/chutils/typing.py +5 -16
  324. chutils-3.0.0/src/chutils/web/__init__.py +17 -0
  325. chutils-3.0.0/src/chutils/web/client.py +377 -0
  326. chutils-3.0.0/src/chutils/web/proxy_pool.py +174 -0
  327. chutils-3.0.0/src/chutils/web/user_agent.py +61 -0
  328. chutils-3.0.0/tests/conftest.py +54 -0
  329. chutils-3.0.0/tests/integration/test_ai_lint_integration.py +58 -0
  330. chutils-3.0.0/tests/integration/test_cli_e2e.py +35 -0
  331. chutils-3.0.0/tests/integration/test_event_loops.py +110 -0
  332. chutils-3.0.0/tests/integration/test_examples.py +159 -0
  333. chutils-3.0.0/tests/integration/test_hooks_integration.py +41 -0
  334. chutils-3.0.0/tests/integration/test_masking_integration.py +61 -0
  335. chutils-3.0.0/tests/integration/test_otel_tracing.py +159 -0
  336. chutils-3.0.0/tests/integration/test_remote_config_integration.py +49 -0
  337. chutils-3.0.0/tests/manual/manual_test_cli_booster.py +23 -0
  338. chutils-3.0.0/tests/unit/cli/conftest.py +69 -0
  339. chutils-3.0.0/tests/unit/cli/test_cli.py +229 -0
  340. chutils-3.0.0/tests/unit/cli/test_cli_booster.py +105 -0
  341. chutils-3.0.0/tests/unit/cli/test_cli_config.py +81 -0
  342. chutils-3.0.0/tests/unit/cli/test_cli_config_cmd.py +91 -0
  343. chutils-3.0.0/tests/unit/cli/test_cli_config_schema.py +77 -0
  344. chutils-3.0.0/tests/unit/cli/test_cli_dev.py +79 -0
  345. chutils-3.0.0/tests/unit/cli/test_cli_dev_cmd.py +307 -0
  346. chutils-3.0.0/tests/unit/cli/test_cli_dev_tree.py +41 -0
  347. chutils-3.0.0/tests/unit/cli/test_cli_diagnostics.py +139 -0
  348. chutils-3.0.0/tests/unit/cli/test_cli_extras_suggestion.py +31 -0
  349. chutils-3.0.0/tests/unit/cli/test_cli_init.py +99 -0
  350. chutils-3.0.0/tests/unit/cli/test_cli_paths.py +46 -0
  351. chutils-3.0.0/tests/unit/cli/test_cli_rich.py +54 -0
  352. chutils-3.0.0/tests/unit/cli/test_cli_rich_width.py +50 -0
  353. chutils-3.0.0/tests/unit/cli/test_cli_secrets.py +125 -0
  354. chutils-3.0.0/tests/unit/cli/test_cli_template.py +81 -0
  355. chutils-3.0.0/tests/unit/cli/test_cli_utils_internal.py +50 -0
  356. chutils-3.0.0/tests/unit/cli/test_cli_validate.py +99 -0
  357. chutils-3.0.0/tests/unit/config/test_config.py +502 -0
  358. chutils-3.0.0/tests/unit/config/test_config_ast_parser.py +106 -0
  359. chutils-3.0.0/tests/unit/config/test_config_dev.py +185 -0
  360. chutils-3.0.0/tests/unit/config/test_config_diagnostics.py +52 -0
  361. chutils-3.0.0/tests/unit/config/test_config_env.py +90 -0
  362. chutils-3.0.0/tests/unit/config/test_config_env_loading.py +80 -0
  363. chutils-3.0.0/tests/unit/config/test_config_generator.py +55 -0
  364. chutils-3.0.0/tests/unit/config/test_config_json.py +95 -0
  365. chutils-3.0.0/tests/unit/config/test_config_pydantic.py +155 -0
  366. chutils-3.0.0/tests/unit/config/test_config_required.py +145 -0
  367. chutils-3.0.0/tests/unit/config/test_config_schema.py +101 -0
  368. chutils-3.0.0/tests/unit/config/test_config_tracing.py +80 -0
  369. chutils-3.0.0/tests/unit/config/test_config_universal_env.py +53 -0
  370. chutils-3.0.0/tests/unit/config/test_config_utils.py +40 -0
  371. chutils-3.0.0/tests/unit/config/test_config_watcher.py +157 -0
  372. chutils-3.0.0/tests/unit/config/test_priority_unification.py +72 -0
  373. chutils-3.0.0/tests/unit/config/test_remote_config.py +130 -0
  374. chutils-3.0.0/tests/unit/core/test_ast_indexer.py +190 -0
  375. chutils-3.0.0/tests/unit/core/test_ast_indexer_abstract.py +58 -0
  376. chutils-3.0.0/tests/unit/core/test_ast_indexer_graph.py +54 -0
  377. chutils-3.0.0/tests/unit/core/test_ast_indexer_layers.py +79 -0
  378. chutils-3.0.0/tests/unit/core/test_ast_indexer_metadata.py +58 -0
  379. chutils-3.0.0/tests/unit/core/test_cache.py +155 -0
  380. chutils-3.0.0/tests/unit/core/test_dev_models.py +62 -0
  381. chutils-3.0.0/tests/unit/core/test_exceptions.py +74 -0
  382. chutils-3.0.0/tests/unit/core/test_features.py +150 -0
  383. chutils-3.0.0/tests/unit/core/test_fs.py +584 -0
  384. chutils-3.0.0/tests/unit/core/test_lifecycle.py +127 -0
  385. chutils-3.0.0/tests/unit/core/test_thread_safety.py +217 -0
  386. chutils-3.0.0/tests/unit/core/test_time.py +103 -0
  387. chutils-3.0.0/tests/unit/decorators/test_decorator_circuit_breaker.py +193 -0
  388. chutils-3.0.0/tests/unit/decorators/test_decorator_retry.py +129 -0
  389. chutils-3.0.0/tests/unit/decorators/test_decorator_timeout.py +146 -0
  390. chutils-3.0.0/tests/unit/decorators/test_decorators.py +48 -0
  391. chutils-3.0.0/tests/unit/decorators/test_rate_limit.py +148 -0
  392. chutils-3.0.0/tests/unit/dev/test_ai_lint.py +341 -0
  393. chutils-3.0.0/tests/unit/dev/test_chat_context.py +252 -0
  394. chutils-3.0.0/tests/unit/dev/test_generate_few_shot.py +473 -0
  395. chutils-3.0.0/tests/unit/dev/test_mock_server.py +298 -0
  396. chutils-3.0.0/tests/unit/dev/test_scaffold.py +139 -0
  397. chutils-3.0.0/tests/unit/di/test_di.py +251 -0
  398. chutils-3.0.0/tests/unit/events/test_event_bus.py +315 -0
  399. chutils-3.0.0/tests/unit/logger/conftest.py +129 -0
  400. chutils-3.0.0/tests/unit/logger/test_basics.py +84 -0
  401. chutils-3.0.0/tests/unit/logger/test_compression.py +39 -0
  402. chutils-3.0.0/tests/unit/logger/test_config_sections.py +115 -0
  403. chutils-3.0.0/tests/unit/logger/test_configuration.py +120 -0
  404. chutils-3.0.0/tests/unit/logger/test_context.py +90 -0
  405. chutils-3.0.0/tests/unit/logger/test_env_control.py +75 -0
  406. chutils-3.0.0/tests/unit/logger/test_files.py +101 -0
  407. chutils-3.0.0/tests/unit/logger/test_json_format.py +122 -0
  408. chutils-3.0.0/tests/unit/logger/test_logger_rich_width.py +30 -0
  409. chutils-3.0.0/tests/unit/logger/test_masking.py +54 -0
  410. chutils-3.0.0/tests/unit/logger/test_performance_security.py +86 -0
  411. chutils-3.0.0/tests/unit/logger/test_rich.py +99 -0
  412. chutils-3.0.0/tests/unit/logger/test_rotation.py +169 -0
  413. chutils-3.0.0/tests/unit/metrics/test_metrics.py +185 -0
  414. chutils-3.0.0/tests/unit/plugins/test_integration.py +198 -0
  415. chutils-3.0.0/tests/unit/plugins/test_interfaces.py +109 -0
  416. chutils-3.0.0/tests/unit/plugins/test_plugins.py +120 -0
  417. chutils-3.0.0/tests/unit/secret_manager/test_secret_manager.py +225 -0
  418. chutils-3.0.0/tests/unit/secret_manager/test_secret_manager_env.py +117 -0
  419. chutils-3.0.0/tests/unit/secret_manager/test_secret_manager_providers.py +105 -0
  420. chutils-3.0.0/tests/unit/secret_manager/test_secrets_required.py +85 -0
  421. chutils-3.0.0/tests/unit/tasks/test_scheduler.py +204 -0
  422. chutils-3.0.0/tests/unit/test_ai_lint_ignore.py +77 -0
  423. chutils-3.0.0/tests/unit/test_anticaptcha.py +127 -0
  424. chutils-3.0.0/tests/unit/test_antidetect.py +41 -0
  425. chutils-3.0.0/tests/unit/test_async_web_client.py +86 -0
  426. chutils-3.0.0/tests/unit/test_capmonster.py +89 -0
  427. chutils-3.0.0/tests/unit/test_captcha_base.py +41 -0
  428. chutils-3.0.0/tests/unit/test_captcha_imports.py +22 -0
  429. chutils-3.0.0/tests/unit/test_crypto.py +131 -0
  430. chutils-3.0.0/tests/unit/test_crypto_dependencies.py +47 -0
  431. chutils-3.0.0/tests/unit/test_events_exception_group.py +42 -0
  432. chutils-3.0.0/tests/unit/test_humanize_math.py +78 -0
  433. chutils-3.0.0/tests/unit/test_install_hooks.py +95 -0
  434. chutils-3.0.0/tests/unit/test_minimal_imports.py +75 -0
  435. chutils-3.0.0/tests/unit/test_playwright_humanize.py +71 -0
  436. chutils-3.0.0/tests/unit/test_proxy_pool.py +85 -0
  437. chutils-3.0.0/tests/unit/test_rucaptcha.py +117 -0
  438. chutils-3.0.0/tests/unit/test_scraping_imports.py +39 -0
  439. chutils-3.0.0/tests/unit/test_selenium_humanize.py +102 -0
  440. chutils-3.0.0/tests/unit/test_text.py +74 -0
  441. chutils-3.0.0/tests/unit/test_text_dependencies.py +21 -0
  442. chutils-3.0.0/tests/unit/test_user_agent.py +38 -0
  443. chutils-3.0.0/tests/unit/test_web_client.py +81 -0
  444. chutils-3.0.0/tests/unit/test_web_imports.py +38 -0
  445. chutils-3.0.0/tests/unit/testing/test_fixtures.py +88 -0
  446. chutils-3.0.0/uv.lock +2349 -0
  447. chutils-2.8.0/pyproject.toml +0 -118
  448. chutils-2.8.0/src/chutils/__init__.pyi +0 -313
  449. chutils-2.8.0/src/chutils/commands/dev.py +0 -307
  450. chutils-2.8.0/src/chutils/commands/secrets.py +0 -102
  451. chutils-2.8.0/src/chutils/decorators.py +0 -214
  452. chutils-2.8.0/src/chutils/dev/__init__.py +0 -12
  453. chutils-2.8.0/src/chutils/exceptions.py +0 -128
  454. chutils-2.8.0/src/chutils/fs.py +0 -179
  455. {chutils-2.8.0 → chutils-3.0.0}/LICENSE +0 -0
  456. {chutils-2.8.0 → chutils-3.0.0}/src/chutils/__main__.py +0 -0
  457. {chutils-2.8.0 → chutils-3.0.0}/src/chutils/cache/__init__.py +0 -0
  458. {chutils-2.8.0 → chutils-3.0.0}/src/chutils/commands/base.py +0 -0
  459. {chutils-2.8.0 → chutils-3.0.0}/src/chutils/commands/paths.py +0 -0
  460. {chutils-2.8.0 → chutils-3.0.0}/src/chutils/commands/template.py +0 -0
  461. {chutils-2.8.0 → chutils-3.0.0}/src/chutils/commands/utils.py +0 -0
  462. {chutils-2.8.0 → chutils-3.0.0}/src/chutils/commands/validate.py +0 -0
  463. {chutils-2.8.0 → chutils-3.0.0}/src/chutils/config/GEMINI.md +0 -0
  464. {chutils-2.8.0 → chutils-3.0.0}/src/chutils/context.py +0 -0
  465. {chutils-2.8.0 → chutils-3.0.0}/src/chutils/env.py +0 -0
  466. {chutils-2.8.0 → chutils-3.0.0}/src/chutils/logger/GEMINI.md +0 -0
  467. {chutils-2.8.0 → chutils-3.0.0}/src/chutils/logger/formatters.py +0 -0
  468. {chutils-2.8.0 → chutils-3.0.0}/src/chutils/logger/handlers.py +0 -0
  469. {chutils-2.8.0 → chutils-3.0.0}/src/chutils/logger/internal/levels.py +0 -0
  470. {chutils-2.8.0 → chutils-3.0.0}/src/chutils/secret_manager/GEMINI.md +0 -0
  471. {chutils-2.8.0 → chutils-3.0.0}/src/chutils/secret_manager/__init__.py +0 -0
  472. {chutils-2.8.0 → chutils-3.0.0}/src/chutils/testing/__init__.py +0 -0
@@ -0,0 +1,2 @@
1
+ poetry.lock binary
2
+ uv.lock binary
@@ -0,0 +1,45 @@
1
+ name: CI
2
+
3
+ on:
4
+ push:
5
+ branches: [ main, master ]
6
+ pull_request:
7
+ branches: [ main, master ]
8
+
9
+ jobs:
10
+ test-and-lint:
11
+ runs-on: ubuntu-latest
12
+ strategy:
13
+ matrix:
14
+ python-version: [ '3.10', '3.11', '3.12', '3.13', '3.14' ]
15
+
16
+ steps:
17
+ - uses: actions/checkout@v4
18
+
19
+ - name: Set up Python ${{ matrix.python-version }}
20
+ uses: actions/setup-python@v5
21
+ with:
22
+ python-version: ${{ matrix.python-version }}
23
+
24
+ - name: Install uv
25
+ uses: astral-sh/setup-uv@v5
26
+ with:
27
+ enable-cache: true
28
+ version: "latest"
29
+
30
+ - name: Install dependencies
31
+ run: |
32
+ uv sync --all-extras
33
+
34
+ - name: Run Tests
35
+ run: |
36
+ uv run pytest
37
+
38
+ - name: Run Type Checking (Mypy)
39
+ run: |
40
+ uv run mypy src
41
+
42
+ - name: Run AI-Readiness Audit
43
+ run: |
44
+ uv run python -m chutils dev ai-lint --soft-mode
45
+
@@ -0,0 +1,34 @@
1
+ name: Publish Documentation
2
+
3
+ on:
4
+ push:
5
+ branches:
6
+ - main
7
+
8
+ permissions:
9
+ contents: write
10
+
11
+ jobs:
12
+ deploy:
13
+ name: Deploy Documentation
14
+ runs-on: ubuntu-latest
15
+ steps:
16
+ - name: Checkout repository
17
+ uses: actions/checkout@v4
18
+
19
+ - name: Set up Python
20
+ uses: actions/setup-python@v5
21
+ with:
22
+ python-version: '3.11'
23
+
24
+ - name: Install uv
25
+ uses: astral-sh/setup-uv@v5
26
+ with:
27
+ enable-cache: true
28
+ version: "latest"
29
+
30
+ - name: Install dependencies
31
+ run: uv sync --all-extras
32
+
33
+ - name: Deploy to GitHub Pages
34
+ run: uv run mkdocs gh-deploy --force --clean
Binary file
@@ -0,0 +1,125 @@
1
+ [Русская версия](docs/CODE_OF_CONDUCT_RU.md)
2
+
3
+ # Contributor Covenant Code of Conduct
4
+
5
+ ## Our Pledge
6
+
7
+ We as members, contributors, and leaders pledge to make participation in our
8
+ community a harassment-free experience for everyone, regardless of age, body
9
+ size, visible or invisible disability, ethnicity, sex characteristics, gender
10
+ identity and expression, level of experience, education, socio-economic status,
11
+ nationality, personal appearance, race, caste, color, religion, or sexual
12
+ identity and orientation.
13
+
14
+ We pledge to act and interact in ways that contribute to an open, welcoming,
15
+ diverse, inclusive, and healthy community.
16
+
17
+ ## Our Standards
18
+
19
+ Examples of behavior that contributes to a positive environment for our
20
+ community include:
21
+
22
+ * Demonstrating empathy and kindness toward other people
23
+ * Being respectful of differing opinions, viewpoints, and experiences
24
+ * Giving and gracefully accepting constructive feedback
25
+ * Accepting responsibility and apologizing to those affected by our mistakes,
26
+ and learning from the experience
27
+ * Focusing on what is best not just for us as individuals, but for the
28
+ overall community
29
+
30
+ Examples of unacceptable behavior include:
31
+
32
+ * The use of sexualized language or imagery, and sexual attention or
33
+ advances of any kind
34
+ * Trolling, insulting or derogatory comments, and personal or political
35
+ attacks
36
+ * Public or private harassment
37
+ * Publishing others' private information, such as a physical or email
38
+ address, without their explicit permission
39
+ * Other conduct which could reasonably be considered inappropriate in a
40
+ professional setting
41
+
42
+ ## Enforcement Responsibilities
43
+
44
+ Community leaders are responsible for clarifying and enforcing our standards of
45
+ acceptable behavior and will take appropriate and fair corrective action in
46
+ response to any behavior that they deem inappropriate, threatening, offensive,
47
+ or harmful.
48
+
49
+ Community leaders have the right and responsibility to remove, edit, or reject
50
+ comments, commits, code, wiki edits, issues, and other contributions that are
51
+ not aligned to this Code of Conduct, and will communicate reasons for
52
+ moderation decisions when appropriate.
53
+
54
+ ## Scope
55
+
56
+ This Code of Conduct applies within all community spaces, and also applies when
57
+ an individual is officially representing the community in public spaces.
58
+ Examples of representing our community include using an official e-mail address,
59
+ posting via an official social media account, or acting as an appointed
60
+ representative at an online or offline event.
61
+
62
+ ## Enforcement
63
+
64
+ Instances of abusive, harassing, or otherwise unacceptable behavior may be
65
+ reported to the community leaders responsible for enforcement at
66
+ `sergeiivanov636@gmail.com`.
67
+ All complaints will be reviewed and investigated promptly and fairly.
68
+
69
+ All community leaders are obligated to respect the privacy and security of the
70
+ reporter of any incident.
71
+
72
+ ## Enforcement Guidelines
73
+
74
+ Community leaders will follow these Community Impact Guidelines in determining
75
+ the consequences for any action they deem in violation of this Code of Conduct:
76
+
77
+ ### 1. Correction
78
+
79
+ **Community Impact**: Use of inappropriate language or other behavior deemed
80
+ unprofessional or unwelcome in the community.
81
+
82
+ **Consequence**: A private, written warning from community leaders, providing
83
+ clarity around the nature of the violation and an explanation of why the
84
+ behavior was inappropriate. A public apology may be requested.
85
+
86
+ ### 2. Warning
87
+
88
+ **Community Impact**: A violation through a single incident or series of
89
+ actions.
90
+
91
+ **Consequence**: A warning with consequences for continued behavior. No
92
+ interaction with the people involved, including unsolicited interaction with
93
+ those enforcing the Code of Conduct, for a specified period of time. This
94
+ includes avoiding interactions in community spaces as well as external channels
95
+ like social media. Violating these terms may lead to a temporary or permanent
96
+ ban.
97
+
98
+ ### 3. Temporary Ban
99
+
100
+ **Community Impact**: A serious violation of community standards, including
101
+ sustained inappropriate behavior.
102
+
103
+ **Consequence**: A temporary ban from any sort of interaction or public
104
+ communication with the community for a specified period of time. No public or
105
+ private interaction with the people involved, including unsolicited interaction
106
+ with those enforcing the Code of Conduct, is allowed during this period.
107
+ Violating these terms may lead to a permanent ban.
108
+
109
+ ### 4. Permanent Ban
110
+
111
+ **Community Impact**: Demonstrating a pattern of violation of community
112
+ standards, including sustained inappropriate behavior, harassment of an
113
+ individual, or aggression toward or disparagement of classes of individuals.
114
+
115
+ **Consequence**: A permanent ban from any sort of public interaction within the
116
+ community.
117
+
118
+ ## Attribution
119
+
120
+ This Code of Conduct is adapted from the [Contributor Covenant][homepage],
121
+ version 2.1, available at
122
+ [https://www.contributor-covenant.org/version/2/1/code_of_conduct.html][v2.1].
123
+
124
+ [homepage]: https://www.contributor-covenant.org
125
+ [v2.1]: https://www.contributor-covenant.org/version/2/1/code_of_conduct.html
@@ -0,0 +1,70 @@
1
+ [Русская версия](docs/CONTRIBUTING_RU.md)
2
+
3
+ # How to Contribute to chutils
4
+
5
+ We're excited that you want to help improve the project! Every contribution is highly valued.
6
+
7
+ This document provides a set of guidelines for contributing to `chutils`.
8
+
9
+ ## Code of Conduct
10
+
11
+ First and foremost, please review our [Code of Conduct](./CODE_OF_CONDUCT.md). We expect all participants to adhere to it.
12
+
13
+ ## How Can You Help?
14
+
15
+ ### Reporting Bugs
16
+
17
+ - Ensure the bug hasn't already been reported by checking the [Issues](https://github.com/Chu4hel/chutils/issues) section.
18
+ - If you don't find a similar issue, create a new one. Be sure to include a clear title, a detailed description, and, if possible, a small code sample to reproduce the error.
19
+
20
+ ### Suggesting Enhancements
21
+
22
+ - Create a new issue with your suggestion. Describe in detail the problem your enhancement solves and how it should work.
23
+
24
+ ### Pull Requests
25
+
26
+ We welcome your pull requests! Here’s how to do it right:
27
+
28
+ 1. Fork the repository.
29
+ 2. Create a new branch for your changes (`git checkout -b feature/amazing-feature`).
30
+ 3. Make your changes and write tests for them if necessary.
31
+ 4. Ensure all tests pass.
32
+ 5. Submit a pull request to the `main` branch of our repository.
33
+
34
+ ## Development Environment Setup
35
+
36
+ 1. Clone your forked repository:
37
+ ```bash
38
+ git clone https://github.com/YOUR_USERNAME/chutils.git
39
+ ```
40
+
41
+ 2. Navigate to the project directory:
42
+ ```bash
43
+ cd chutils
44
+ ```
45
+
46
+ 3. Install dependencies using Poetry:
47
+ ```bash
48
+ poetry install
49
+ ```
50
+
51
+ ## Testing and Documentation
52
+
53
+ - **Run tests**:
54
+ ```bash
55
+ poetry run pytest
56
+ ```
57
+
58
+ - **View documentation locally**:
59
+ ```bash
60
+ poetry run mkdocs serve
61
+ ```
62
+
63
+ ## Code and Commit Style
64
+
65
+ - **Code Style**: We adhere to the PEP 8 standard. Please ensure your code complies with it.
66
+ - **Docstrings**: All docstrings are written in **Google style**. Please follow this convention.
67
+ - **Commits**: We use [Conventional Commits](https://www.conventionalcommits.org/). This helps us maintain a clean and understandable change history.
68
+ *Example: `feat(config): add support for .toml format` or `fix(logger): correct log rotation error`*
69
+
70
+ Thank you for your contribution!
@@ -0,0 +1,49 @@
1
+ # chutils: Project Identity & Conventions
2
+
3
+ Этот файл содержит глобальные инструкции для AI-агентов (Gemini CLI и др.) по работе с кодовой базой проекта `chutils`.
4
+
5
+ ## 1. Архитектура и структура
6
+
7
+ Проект построен по модульному принципу с ленивой загрузкой в корневом `__init__.py`.
8
+
9
+ - **src/chutils/config/**: Ядро управления конфигурацией (Hot-Reload, многоуровневое слияние).
10
+ - **src/chutils/logger/**: Продвинутый логгер на базе `rich` с поддержкой маскировки секретов.
11
+ - **src/chutils/secret_manager/**: Абстракция над системными хранилищами (keyring) и облачными провайдерами.
12
+ - **src/chutils/commands/**: Реализации CLI команд (argparse).
13
+
14
+ ## 2. Кодирование и Conventions (Rules)
15
+
16
+ - **Публичное API**: Почти всё публичное API экспортируется через `src/chutils/__init__.py`. При использовании
17
+ библиотеки извне, импортируйте напрямую из `chutils`.
18
+ - **Lazy Loading**: Библиотека активно использует ленивую загрузку (PEP 562). Избегайте прямых импортов из глубоких
19
+ подмодулей, если это не обосновано внутренней реализацией.
20
+ - **Опциональные зависимости (Безопасный экспорт)**: При импорте сторонних библиотек (особенно опциональных),
21
+ экспортируемый символ ОБЯЗАТЕЛЬНО должен быть определен в модуле, даже если его функционал зависит от отсутствующей
22
+ библиотеки (например, `Feature = None`). Это предотвращает каскадные `ImportError`.
23
+ - **Rich Integration**: При выводе в консоль всегда используйте `chutils.cli_utils.get_console()`. Это гарантирует
24
+ корректный fallback, если `rich` не установлен.
25
+ - **Строгая типизация (Zero-Any Strategy)**:
26
+ - Запрещено использование `Any` в аннотациях типов бизнес-логики.
27
+ - Запрещено использование `# type: ignore` без крайне веского обоснования и комментария.
28
+ - **Исключение:** В инфраструктурных модулях и сложных декораторах (например, `chutils/decorators.py`,
29
+ `chutils/features.py`) **разрешается** использовать `Any` и `# type: ignore` вместо сложных конструкций
30
+ `ParamSpec`/`cast`, если строгая типизация приводит к нечитаемому коду. Читаемость важнее идеального отчета Mypy.
31
+ - **Типизация Python 3.10+**:
32
+ - Запрещено импортировать и использовать устаревшие типы из модуля `typing`, такие как `Optional`, `List`, `Dict`,
33
+ `Tuple` и др.
34
+ - Вместо `Optional[T]` обязательно используйте `T | None`.
35
+ - Вместо `List[T]`, `Dict[K, V]`, `Tuple[T, ...]` используйте встроенные типы `list[T]`, `dict[K, V]`,
36
+ `tuple[T, ...]` без импорта из `typing`.
37
+ - **Документация**: Подробные советы для AI находятся в `docs/ai_hints.md` и `docs/INTEGRATION_AI.md`.
38
+
39
+ ## 3. Тестирование
40
+
41
+ - Используется `pytest` с `pytest-mock`.
42
+ - Новая функциональность всегда должна сопровождаться тестами в `tests/unit/`.
43
+ - Тесты CLI команд должны проверяться через `sys.argv` mocking и `capsys` для проверки вывода.
44
+
45
+ ## 4. Ссылки
46
+
47
+ - [AI Hints](./docs/ai_hints.md)
48
+ - [Integration Guide](./docs/INTEGRATION_AI.md)
49
+ - [Public API Map](./api_map.md) (генерируется через `chutils dev generate-context -o api_map.md`)
@@ -1,54 +1,62 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: chutils
3
- Version: 2.8.0
3
+ Version: 3.0.0
4
4
  Summary: Набор простых и удобных утилит для Python, который избавляет от рутины при работе с конфигурацией и логированием в новых проектах.
5
+ Author-email: Chu4hel <sergeiivanov636@gmail.com>
5
6
  License-Expression: MIT
6
7
  License-File: LICENSE
7
- Author: Chu4hel
8
- Author-email: sergeiivanov636@gmail.com
9
- Requires-Python: >=3.9, !=3.9.0, !=3.9.1
10
- Classifier: Programming Language :: Python :: 3
11
- Classifier: Programming Language :: Python :: 3.10
12
- Classifier: Programming Language :: Python :: 3.11
13
- Classifier: Programming Language :: Python :: 3.12
14
- Classifier: Programming Language :: Python :: 3.13
15
- Classifier: Programming Language :: Python :: 3.14
8
+ Requires-Python: <3.15,>=3.10
9
+ Requires-Dist: exceptiongroup>=1.2.2; python_version < '3.11'
10
+ Requires-Dist: python-dotenv>=1.2.2
11
+ Requires-Dist: pyyaml>=6.0.3
12
+ Provides-Extra: captcha
13
+ Requires-Dist: httpx>=0.27.0; extra == 'captcha'
14
+ Provides-Extra: crypto
15
+ Requires-Dist: cryptography>=42.0.0; extra == 'crypto'
16
16
  Provides-Extra: date
17
+ Requires-Dist: python-dateutil>=2.9.0; extra == 'date'
17
18
  Provides-Extra: full
19
+ Requires-Dist: cryptography>=42.0.0; extra == 'full'
20
+ Requires-Dist: httpx>=0.27.0; extra == 'full'
21
+ Requires-Dist: keyring>=25.7.0; extra == 'full'
22
+ Requires-Dist: opentelemetry-api>=1.41.1; extra == 'full'
23
+ Requires-Dist: opentelemetry-exporter-otlp>=1.41.1; extra == 'full'
24
+ Requires-Dist: opentelemetry-sdk>=1.41.1; extra == 'full'
25
+ Requires-Dist: playwright>=1.49.0; extra == 'full'
26
+ Requires-Dist: prometheus-client<1.0.0,>=0.20.0; extra == 'full'
27
+ Requires-Dist: pydantic>=2.13.4; extra == 'full'
28
+ Requires-Dist: pytest>=9.0.3; extra == 'full'
29
+ Requires-Dist: python-dateutil>=2.9.0; extra == 'full'
30
+ Requires-Dist: python-json-logger>=3.2.1; extra == 'full'
31
+ Requires-Dist: rapidfuzz>=3.9.0; extra == 'full'
32
+ Requires-Dist: rich>=15.0.0; extra == 'full'
33
+ Requires-Dist: selenium>=4.27.0; extra == 'full'
34
+ Requires-Dist: watchdog>=6.0.0; extra == 'full'
18
35
  Provides-Extra: json
36
+ Requires-Dist: python-json-logger>=3.2.1; extra == 'json'
37
+ Provides-Extra: metrics
38
+ Requires-Dist: prometheus-client<1.0.0,>=0.20.0; extra == 'metrics'
19
39
  Provides-Extra: otel
40
+ Requires-Dist: opentelemetry-api>=1.41.1; extra == 'otel'
41
+ Requires-Dist: opentelemetry-exporter-otlp>=1.41.1; extra == 'otel'
42
+ Requires-Dist: opentelemetry-sdk>=1.41.1; extra == 'otel'
20
43
  Provides-Extra: pydantic
44
+ Requires-Dist: pydantic<3.0.0,>=2.13.4; extra == 'pydantic'
21
45
  Provides-Extra: rich
46
+ Requires-Dist: rich>=15.0.0; extra == 'rich'
47
+ Provides-Extra: scraping
48
+ Requires-Dist: playwright>=1.49.0; extra == 'scraping'
49
+ Requires-Dist: selenium>=4.27.0; extra == 'scraping'
22
50
  Provides-Extra: secrets
51
+ Requires-Dist: keyring>=25.7.0; extra == 'secrets'
23
52
  Provides-Extra: testing
53
+ Requires-Dist: pytest>=9.0.3; extra == 'testing'
54
+ Provides-Extra: text
55
+ Requires-Dist: rapidfuzz>=3.9.0; extra == 'text'
24
56
  Provides-Extra: watch
25
- Requires-Dist: keyring (>=25.7.0)
26
- Requires-Dist: keyring (>=25.7.0) ; extra == "full"
27
- Requires-Dist: keyring (>=25.7.0) ; extra == "secrets"
28
- Requires-Dist: opentelemetry-api (>=1.41.1) ; extra == "full"
29
- Requires-Dist: opentelemetry-api (>=1.41.1) ; extra == "otel"
30
- Requires-Dist: opentelemetry-exporter-otlp (>=1.41.1) ; extra == "full"
31
- Requires-Dist: opentelemetry-exporter-otlp (>=1.41.1) ; extra == "otel"
32
- Requires-Dist: opentelemetry-sdk (>=1.41.1) ; extra == "full"
33
- Requires-Dist: opentelemetry-sdk (>=1.41.1) ; extra == "otel"
34
- Requires-Dist: pydantic (>=2.13.4) ; extra == "full"
35
- Requires-Dist: pydantic (>=2.13.4,<3.0.0) ; extra == "pydantic"
36
- Requires-Dist: pytest (>=8.0.0) ; (python_full_version < "3.10.0") and (extra == "full")
37
- Requires-Dist: pytest (>=8.0.0) ; (python_full_version < "3.10.0") and (extra == "testing")
38
- Requires-Dist: pytest (>=9.0.3) ; (python_full_version >= "3.10.0") and (extra == "full")
39
- Requires-Dist: pytest (>=9.0.3) ; (python_full_version >= "3.10.0") and (extra == "testing")
40
- Requires-Dist: python-dateutil (>=2.9.0) ; extra == "date"
41
- Requires-Dist: python-dateutil (>=2.9.0) ; extra == "full"
42
- Requires-Dist: python-dotenv (>=1.2.1) ; python_full_version < "3.10.0"
43
- Requires-Dist: python-dotenv (>=1.2.2) ; python_full_version >= "3.10.0"
44
- Requires-Dist: python-json-logger (>=3.2.1) ; extra == "full"
45
- Requires-Dist: python-json-logger (>=3.2.1) ; extra == "json"
46
- Requires-Dist: pyyaml (>=6.0.3)
47
- Requires-Dist: rich (>=15.0.0) ; extra == "full"
48
- Requires-Dist: rich (>=15.0.0) ; extra == "rich"
49
- Requires-Dist: typing-extensions (>=4.15.0,<5.0.0)
50
- Requires-Dist: watchdog (>=6.0.0) ; extra == "full"
51
- Requires-Dist: watchdog (>=6.0.0) ; extra == "watch"
57
+ Requires-Dist: watchdog>=6.0.0; extra == 'watch'
58
+ Provides-Extra: web
59
+ Requires-Dist: httpx>=0.27.0; extra == 'web'
52
60
  Description-Content-Type: text/markdown
53
61
 
54
62
  [Русская версия](docs/README_RU.md)
@@ -56,7 +64,7 @@ Description-Content-Type: text/markdown
56
64
  # chutils: Stop the Routine!
57
65
 
58
66
  [![License: MIT](https://img.shields.io/badge/License-MIT-yellow.svg)](https://opensource.org/licenses/MIT)
59
- [![Python](https://img.shields.io/badge/python-3.9%2B-blue.svg)](https://www.python.org/downloads/)
67
+ [![Python](https://img.shields.io/badge/python-3.10%2B-blue.svg)](https://www.python.org/downloads/)
60
68
  [![PyPI version](https://badge.fury.io/py/chutils.svg)](https://badge.fury.io/py/chutils)
61
69
  [![Documentation](https://img.shields.io/badge/documentation-read-brightgreen)](https://Chu4hel.github.io/chutils/)
62
70
 
@@ -217,10 +225,10 @@ To use this feature, install `watchdog`:
217
225
  1. Configure and use the logger:
218
226
 
219
227
  ```python
220
- from chutils import setup_logger, ChutilsLogger
228
+ from chutils import setup_logger_from_config, ChutilsLogger
221
229
 
222
230
  # Automatically reads settings from [Logging] section in config.yml
223
- logger: ChutilsLogger = setup_logger()
231
+ logger: ChutilsLogger = setup_logger_from_config()
224
232
 
225
233
  logger.info("Application started.")
226
234
  logger.devdebug("Deep debug message (level 9).")
@@ -307,8 +315,9 @@ except PathTraversalError as e:
307
315
 
308
316
  ### Configuration (`chutils.config`)
309
317
 
310
- - `get_config_value(section, key, fallback)` / `aget_config()`
311
- - `get_config_int`, `get_config_boolean`, `get_config_list`, `get_config_path`
318
+ - `get_config_value(section, key, fallback=None, required=False)` / `aget_config()`
319
+ - `get_config_int`, `get_config_boolean`, `get_config_list`, `get_config_path` (all support `fallback` and `required`
320
+ parameters)
312
321
  - `save_config_value(section, key, value, notify=True)` / `asave_config_value()`
313
322
  - Use `notify=False` to update the file without triggering Hot-Reload callbacks.
314
323
 
@@ -321,7 +330,7 @@ except PathTraversalError as e:
321
330
 
322
331
  - `SecretManager(service_name, prefix)`
323
332
  - `save_secret` / `asave_secret`
324
- - `get_secret` / `aget_secret`
333
+ - `get_secret(key, fallback=None, required=False)` / `aget_secret(...)`
325
334
  - `delete_secret` / `adelete_secret`
326
335
 
327
336
  ### Decorators (`chutils.decorators`)
@@ -431,4 +440,3 @@ See [docs/ai_lint.md](docs/ai_lint.md) for more details.
431
440
  ## License
432
441
 
433
442
  The project is distributed under the MIT License.
434
-