chutils 3.4.2__tar.gz → 3.6.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.
- chutils-3.6.0/.github/workflows/ci.yml +46 -0
- chutils-3.6.0/PKG-INFO +558 -0
- chutils-3.6.0/README.md +473 -0
- chutils-3.6.0/ai-lint.toml +192 -0
- chutils-3.6.0/api_map.md +271 -0
- chutils-3.6.0/benchmarks/cold_start.py +72 -0
- chutils-3.6.0/conductor/archive/ai_context_opt_20260728/plan.md +17 -0
- chutils-3.6.0/conductor/archive/async_lifecycle_20260728/plan.md +16 -0
- chutils-3.6.0/conductor/archive/browser_profiles_20260728/plan.md +23 -0
- chutils-3.6.0/conductor/archive/plugins_extension_20260805/plan.md +15 -0
- chutils-3.6.0/conductor/archive/plugins_extension_20260805/spec.md +22 -0
- chutils-3.6.0/conductor/archive/python315_support_20260827/index.md +6 -0
- chutils-3.6.0/conductor/archive/python315_support_20260827/metadata.json +8 -0
- chutils-3.6.0/conductor/archive/python315_support_20260827/plan.md +22 -0
- chutils-3.6.0/conductor/archive/python315_support_20260827/spec.md +22 -0
- chutils-3.6.0/conductor/archive/queue_monitoring_20260728/plan.md +16 -0
- chutils-3.6.0/conductor/archive/stream_crypto_20260728/plan.md +16 -0
- chutils-3.6.0/conductor/archive/telegram_access_20260729/plan.md +18 -0
- chutils-3.6.0/conductor/archive/telegram_formatting_20260729/plan.md +17 -0
- chutils-3.6.0/conductor/archive/telegram_keyboard_20260729/plan.md +18 -0
- chutils-3.6.0/conductor/archive/telegram_logging_20260729/plan.md +17 -0
- chutils-3.6.0/conductor/archive/telegram_media_20260729/plan.md +18 -0
- chutils-3.6.0/conductor/archive/telegram_notifier_20260729/plan.md +17 -0
- chutils-3.6.0/conductor/archive/telegram_ratelimit_20260729/plan.md +19 -0
- chutils-3.6.0/conductor/archive/telegram_send_file_20260729/plan.md +18 -0
- chutils-3.6.0/conductor/archive/telegram_whitelist_20260729/plan.md +17 -0
- chutils-3.6.0/conductor/archive/vk_callback_20260807/index.md +5 -0
- chutils-3.6.0/conductor/archive/vk_callback_20260807/metadata.json +8 -0
- chutils-3.6.0/conductor/archive/vk_callback_20260807/plan.md +19 -0
- chutils-3.6.0/conductor/archive/vk_callback_20260807/spec.md +27 -0
- chutils-3.6.0/conductor/archive/vk_scaffold_20260807/index.md +5 -0
- chutils-3.6.0/conductor/archive/vk_scaffold_20260807/metadata.json +8 -0
- chutils-3.6.0/conductor/archive/vk_scaffold_20260807/plan.md +19 -0
- chutils-3.6.0/conductor/archive/vk_scaffold_20260807/spec.md +27 -0
- chutils-3.6.0/conductor/archive/vk_testing_20260807/index.md +5 -0
- chutils-3.6.0/conductor/archive/vk_testing_20260807/metadata.json +8 -0
- chutils-3.6.0/conductor/archive/vk_testing_20260807/plan.md +18 -0
- chutils-3.6.0/conductor/archive/vk_testing_20260807/spec.md +23 -0
- chutils-3.6.0/conductor/archive/vkma_20260807/index.md +5 -0
- chutils-3.6.0/conductor/archive/vkma_20260807/metadata.json +8 -0
- chutils-3.6.0/conductor/archive/vkma_20260807/plan.md +22 -0
- chutils-3.6.0/conductor/archive/vkma_20260807/spec.md +29 -0
- chutils-3.6.0/conductor/product.md +251 -0
- chutils-3.6.0/conductor/tracks.md +35 -0
- chutils-3.6.0/docs/README_RU.md +481 -0
- chutils-3.6.0/docs/ai_examples/configuration/bad_pattern.py +22 -0
- chutils-3.6.0/docs/ai_examples/error_handling/good_pattern.py +92 -0
- chutils-3.6.0/docs/ai_examples/logging/bad_pattern.py +27 -0
- chutils-3.6.0/docs/ai_examples/logging/good_pattern.py +38 -0
- chutils-3.6.0/docs/ai_examples/optional_deps/bad_pattern.py +48 -0
- chutils-3.6.0/docs/ai_examples/optional_deps/good_pattern.py +68 -0
- chutils-3.6.0/docs/ai_lint.md +492 -0
- chutils-3.6.0/docs/api.md +532 -0
- chutils-3.6.0/docs/audit.md +123 -0
- chutils-3.6.0/docs/captcha.md +115 -0
- chutils-3.6.0/docs/cli/check.md +97 -0
- chutils-3.6.0/docs/cli/dev.md +802 -0
- chutils-3.6.0/docs/custom_config_providers.md +301 -0
- chutils-3.6.0/docs/dependencies.md +120 -0
- chutils-3.6.0/docs/http.md +151 -0
- chutils-3.6.0/docs/migration.md +238 -0
- chutils-3.6.0/docs/plugins.md +254 -0
- chutils-3.6.0/docs/recipes.md +1584 -0
- chutils-3.6.0/docs/scraping.md +337 -0
- chutils-3.6.0/docs/store.md +100 -0
- chutils-3.6.0/docs/telegram.md +322 -0
- chutils-3.6.0/docs/testing.md +108 -0
- chutils-3.6.0/docs/vk_bot.md +43 -0
- chutils-3.6.0/docs/vk_testing.md +17 -0
- chutils-3.6.0/docs/vkma.md +141 -0
- chutils-3.6.0/docs/web.md +122 -0
- chutils-3.6.0/examples/01_configuration.py +50 -0
- chutils-3.6.0/examples/02_logging.py +48 -0
- chutils-3.6.0/examples/03_secrets.py +74 -0
- chutils-3.6.0/examples/04_full_example.py +78 -0
- chutils-3.6.0/examples/05_different_log_levels.py +46 -0
- chutils-3.6.0/examples/06_local_config_override.py +81 -0
- chutils-3.6.0/examples/07_decorators_example.py +42 -0
- chutils-3.6.0/examples/08_multiple_loggers_example.py +40 -0
- chutils-3.6.0/examples/09_disable_keyring.py +42 -0
- chutils-3.6.0/examples/10_universal_env_override.py +43 -0
- chutils-3.6.0/examples/11_retry_decorator.py +59 -0
- chutils-3.6.0/examples/12_secret_masking.py +55 -0
- chutils-3.6.0/examples/13_pydantic_validation.py +87 -0
- chutils-3.6.0/examples/15_context_logging.py +93 -0
- chutils-3.6.0/examples/17_timeout_decorator.py +62 -0
- chutils-3.6.0/examples/18_config_hot_reload.py +102 -0
- chutils-3.6.0/examples/19_remote_config.py +92 -0
- chutils-3.6.0/examples/20_opentelemetry_tracing.py +49 -0
- chutils-3.6.0/examples/21_config_diagnostics.py +47 -0
- chutils-3.6.0/examples/22_qt_logging.py +47 -0
- chutils-3.6.0/examples/22_safe_path_resolution.py +91 -0
- chutils-3.6.0/examples/23_event_bus.py +120 -0
- chutils-3.6.0/examples/23_qt_async.py +65 -0
- chutils-3.6.0/examples/24_qt_typed_signals.py +75 -0
- chutils-3.6.0/examples/24_task_scheduler.py +66 -0
- chutils-3.6.0/examples/25_testing_fixtures_example.py +81 -0
- chutils-3.6.0/examples/26_metrics_prometheus.py +88 -0
- chutils-3.6.0/examples/27_rate_limiting.py +77 -0
- chutils-3.6.0/examples/28_dependency_injection.py +75 -0
- chutils-3.6.0/examples/captcha_solvers_usage.py +67 -0
- chutils-3.6.0/examples/concurrency_scraping_usage.py +57 -0
- chutils-3.6.0/examples/config.yml +65 -0
- chutils-3.6.0/examples/scraping_humanize_usage.py +69 -0
- chutils-3.6.0/examples/web_client_usage.py +90 -0
- chutils-3.6.0/mkdocs.yml +75 -0
- chutils-3.6.0/project_index.json +39929 -0
- chutils-3.6.0/pyproject.toml +171 -0
- chutils-3.6.0/src/chutils/__init__.py +438 -0
- chutils-3.6.0/src/chutils/__init__.pyi +1211 -0
- chutils-3.6.0/src/chutils/audit/__init__.py +45 -0
- chutils-3.6.0/src/chutils/audit/_hash.py +23 -0
- chutils-3.6.0/src/chutils/audit/api.py +190 -0
- chutils-3.6.0/src/chutils/audit/backends/__init__.py +7 -0
- chutils-3.6.0/src/chutils/audit/backends/base.py +47 -0
- chutils-3.6.0/src/chutils/audit/backends/file.py +124 -0
- chutils-3.6.0/src/chutils/audit/backends/postgres.py +271 -0
- chutils-3.6.0/src/chutils/audit/backends/sqlite.py +211 -0
- chutils-3.6.0/src/chutils/audit/schema.py +119 -0
- chutils-3.6.0/src/chutils/cache/__init__.py +5 -0
- chutils-3.6.0/src/chutils/cache/base.py +137 -0
- chutils-3.6.0/src/chutils/cache/decorator.py +169 -0
- chutils-3.6.0/src/chutils/cache/utils.py +74 -0
- chutils-3.6.0/src/chutils/cli.py +141 -0
- chutils-3.6.0/src/chutils/cli_booster.py +169 -0
- chutils-3.6.0/src/chutils/cli_utils.py +184 -0
- chutils-3.6.0/src/chutils/commands/__init__.py +38 -0
- chutils-3.6.0/src/chutils/commands/base.py +41 -0
- chutils-3.6.0/src/chutils/commands/check.py +280 -0
- chutils-3.6.0/src/chutils/commands/config.py +236 -0
- chutils-3.6.0/src/chutils/commands/db.py +491 -0
- chutils-3.6.0/src/chutils/commands/dev/__init__.py +796 -0
- chutils-3.6.0/src/chutils/commands/dev/ai_lint.py +140 -0
- chutils-3.6.0/src/chutils/commands/dev/base.py +38 -0
- chutils-3.6.0/src/chutils/commands/dev/chat_context.py +101 -0
- chutils-3.6.0/src/chutils/commands/dev/clean.py +146 -0
- chutils-3.6.0/src/chutils/commands/dev/dashboard.py +42 -0
- chutils-3.6.0/src/chutils/commands/dev/diagnostics.py +130 -0
- chutils-3.6.0/src/chutils/commands/dev/few_shot.py +57 -0
- chutils-3.6.0/src/chutils/commands/dev/generate_context.py +618 -0
- chutils-3.6.0/src/chutils/commands/dev/hooks.py +219 -0
- chutils-3.6.0/src/chutils/commands/dev/lock.py +137 -0
- chutils-3.6.0/src/chutils/commands/dev/mock.py +85 -0
- chutils-3.6.0/src/chutils/commands/dev/profile_imports.py +49 -0
- chutils-3.6.0/src/chutils/commands/dev/scaffold.py +70 -0
- chutils-3.6.0/src/chutils/commands/dev/setup_github_actions.py +186 -0
- chutils-3.6.0/src/chutils/commands/dev/sync_env.py +202 -0
- chutils-3.6.0/src/chutils/commands/dev/watch.py +113 -0
- chutils-3.6.0/src/chutils/commands/env.py +207 -0
- chutils-3.6.0/src/chutils/commands/init.py +464 -0
- chutils-3.6.0/src/chutils/commands/paths.py +96 -0
- chutils-3.6.0/src/chutils/commands/pypi.py +462 -0
- chutils-3.6.0/src/chutils/commands/secrets.py +223 -0
- chutils-3.6.0/src/chutils/commands/template.py +124 -0
- chutils-3.6.0/src/chutils/commands/utils.py +41 -0
- chutils-3.6.0/src/chutils/commands/validate.py +119 -0
- chutils-3.6.0/src/chutils/config/__init__.py +320 -0
- chutils-3.6.0/src/chutils/config/ast_fallback_parser.py +159 -0
- chutils-3.6.0/src/chutils/config/core.py +560 -0
- chutils-3.6.0/src/chutils/config/custom_providers.py +291 -0
- chutils-3.6.0/src/chutils/config/dev.py +451 -0
- chutils-3.6.0/src/chutils/config/diagnostics.py +173 -0
- chutils-3.6.0/src/chutils/config/generator.py +155 -0
- chutils-3.6.0/src/chutils/config/getters.py +543 -0
- chutils-3.6.0/src/chutils/config/integrations.py +125 -0
- chutils-3.6.0/src/chutils/config/manager.py +411 -0
- chutils-3.6.0/src/chutils/config/paths.py +212 -0
- chutils-3.6.0/src/chutils/config/providers.py +607 -0
- chutils-3.6.0/src/chutils/config/schema.py +121 -0
- chutils-3.6.0/src/chutils/config/sse.py +257 -0
- chutils-3.6.0/src/chutils/config/tracing.py +125 -0
- chutils-3.6.0/src/chutils/config/utils.py +363 -0
- chutils-3.6.0/src/chutils/config/watcher.py +169 -0
- chutils-3.6.0/src/chutils/config/webhook_server.py +228 -0
- chutils-3.6.0/src/chutils/context.py +103 -0
- chutils-3.6.0/src/chutils/crypto.py +398 -0
- chutils-3.6.0/src/chutils/db.py +264 -0
- chutils-3.6.0/src/chutils/decorators.py +923 -0
- chutils-3.6.0/src/chutils/dev/__init__.py +48 -0
- chutils-3.6.0/src/chutils/dev/ai_lint.py +642 -0
- chutils-3.6.0/src/chutils/dev/ast_indexer.py +476 -0
- chutils-3.6.0/src/chutils/dev/changelog_parser.py +202 -0
- chutils-3.6.0/src/chutils/dev/chat_context.py +440 -0
- chutils-3.6.0/src/chutils/dev/cleaner.py +221 -0
- chutils-3.6.0/src/chutils/dev/constants.py +17 -0
- chutils-3.6.0/src/chutils/dev/context/__init__.py +6 -0
- chutils-3.6.0/src/chutils/dev/context/gitignore.py +158 -0
- chutils-3.6.0/src/chutils/dev/context/incremental.py +134 -0
- chutils-3.6.0/src/chutils/dev/dashboard/__init__.py +22 -0
- chutils-3.6.0/src/chutils/dev/dashboard/indexer.py +233 -0
- chutils-3.6.0/src/chutils/dev/dashboard/input.py +155 -0
- chutils-3.6.0/src/chutils/dev/dashboard/tui.py +620 -0
- chutils-3.6.0/src/chutils/dev/env_parser.py +234 -0
- chutils-3.6.0/src/chutils/dev/env_sync.py +115 -0
- chutils-3.6.0/src/chutils/dev/few_shot/__init__.py +114 -0
- chutils-3.6.0/src/chutils/dev/few_shot/detector.py +230 -0
- chutils-3.6.0/src/chutils/dev/few_shot/renderer.py +495 -0
- chutils-3.6.0/src/chutils/dev/few_shot/writer.py +317 -0
- chutils-3.6.0/src/chutils/dev/github_actions.py +101 -0
- chutils-3.6.0/src/chutils/dev/mock_server.py +519 -0
- chutils-3.6.0/src/chutils/dev/models/__init__.py +17 -0
- chutils-3.6.0/src/chutils/dev/models/base.py +35 -0
- chutils-3.6.0/src/chutils/dev/models/index.py +37 -0
- chutils-3.6.0/src/chutils/dev/models/node.py +20 -0
- chutils-3.6.0/src/chutils/dev/models/symbol.py +22 -0
- chutils-3.6.0/src/chutils/dev/profile_imports.py +374 -0
- chutils-3.6.0/src/chutils/dev/project_metadata.py +269 -0
- chutils-3.6.0/src/chutils/dev/rules/__init__.py +24 -0
- chutils-3.6.0/src/chutils/dev/rules/api_map.py +503 -0
- chutils-3.6.0/src/chutils/dev/rules/decomposition.py +158 -0
- chutils-3.6.0/src/chutils/dev/rules/dependency_sync.py +259 -0
- chutils-3.6.0/src/chutils/dev/rules/docstring.py +312 -0
- chutils-3.6.0/src/chutils/dev/rules/env.py +114 -0
- chutils-3.6.0/src/chutils/dev/rules/integration.py +316 -0
- chutils-3.6.0/src/chutils/dev/rules/linter_coverage.py +192 -0
- chutils-3.6.0/src/chutils/dev/rules/manifest.py +75 -0
- chutils-3.6.0/src/chutils/dev/rules/security.py +133 -0
- chutils-3.6.0/src/chutils/dev/rules/upgrade_check.py +177 -0
- chutils-3.6.0/src/chutils/dev/runners.py +218 -0
- chutils-3.6.0/src/chutils/dev/scaffold.py +428 -0
- chutils-3.6.0/src/chutils/dev/upgrade_client.py +166 -0
- chutils-3.6.0/src/chutils/dev/version_detector.py +359 -0
- chutils-3.6.0/src/chutils/dev/watcher.py +427 -0
- chutils-3.6.0/src/chutils/di/__init__.py +9 -0
- chutils-3.6.0/src/chutils/di/__init__.pyi +28 -0
- chutils-3.6.0/src/chutils/di/container.py +412 -0
- chutils-3.6.0/src/chutils/diagnostics/__init__.py +27 -0
- chutils-3.6.0/src/chutils/diagnostics/manager.py +316 -0
- chutils-3.6.0/src/chutils/diagnostics/models.py +102 -0
- chutils-3.6.0/src/chutils/diagnostics/web.py +78 -0
- chutils-3.6.0/src/chutils/env.py +206 -0
- chutils-3.6.0/src/chutils/env.pyi +20 -0
- chutils-3.6.0/src/chutils/events/__init__.py +35 -0
- chutils-3.6.0/src/chutils/events/core.py +330 -0
- chutils-3.6.0/src/chutils/exceptions/__init__.py +85 -0
- chutils-3.6.0/src/chutils/exceptions/audit.py +14 -0
- chutils-3.6.0/src/chutils/exceptions/base.py +63 -0
- chutils-3.6.0/src/chutils/exceptions/cache.py +5 -0
- chutils-3.6.0/src/chutils/exceptions/config.py +50 -0
- chutils-3.6.0/src/chutils/exceptions/di.py +13 -0
- chutils-3.6.0/src/chutils/exceptions/events.py +32 -0
- chutils-3.6.0/src/chutils/exceptions/logger.py +5 -0
- chutils-3.6.0/src/chutils/exceptions/resilience.py +17 -0
- chutils-3.6.0/src/chutils/exceptions/secrets.py +13 -0
- chutils-3.6.0/src/chutils/exceptions/system.py +40 -0
- chutils-3.6.0/src/chutils/exceptions/telegram.py +19 -0
- chutils-3.6.0/src/chutils/exceptions/validation.py +146 -0
- chutils-3.6.0/src/chutils/exceptions/vkma.py +18 -0
- chutils-3.6.0/src/chutils/exceptions/watcher.py +5 -0
- chutils-3.6.0/src/chutils/features.py +213 -0
- chutils-3.6.0/src/chutils/fs.py +530 -0
- chutils-3.6.0/src/chutils/http/__init__.py +63 -0
- chutils-3.6.0/src/chutils/http/api.py +174 -0
- chutils-3.6.0/src/chutils/http/async_client.py +335 -0
- chutils-3.6.0/src/chutils/http/client.py +451 -0
- chutils-3.6.0/src/chutils/http/fallback.py +495 -0
- chutils-3.6.0/src/chutils/http/resilience.py +417 -0
- chutils-3.6.0/src/chutils/http/streaming.py +560 -0
- chutils-3.6.0/src/chutils/http/tracing.py +137 -0
- chutils-3.6.0/src/chutils/lifecycle.py +365 -0
- chutils-3.6.0/src/chutils/logger/__init__.py +88 -0
- chutils-3.6.0/src/chutils/logger/core.py +236 -0
- chutils-3.6.0/src/chutils/logger/formatters.py +103 -0
- chutils-3.6.0/src/chutils/logger/handlers.py +132 -0
- chutils-3.6.0/src/chutils/logger/internal/builder.py +574 -0
- chutils-3.6.0/src/chutils/logger/internal/levels.py +67 -0
- chutils-3.6.0/src/chutils/logger/internal/utils.py +66 -0
- chutils-3.6.0/src/chutils/logger/masking.py +178 -0
- chutils-3.6.0/src/chutils/metrics/__init__.py +162 -0
- chutils-3.6.0/src/chutils/metrics/base.py +57 -0
- chutils-3.6.0/src/chutils/metrics/in_memory.py +201 -0
- chutils-3.6.0/src/chutils/metrics/prometheus.py +127 -0
- chutils-3.6.0/src/chutils/metrics/timer.py +108 -0
- chutils-3.6.0/src/chutils/plugins/__init__.py +46 -0
- chutils-3.6.0/src/chutils/plugins/core.py +233 -0
- chutils-3.6.0/src/chutils/plugins/interfaces.py +227 -0
- chutils-3.6.0/src/chutils/qt/__init__.py +52 -0
- chutils-3.6.0/src/chutils/qt/asyncio.py +173 -0
- chutils-3.6.0/src/chutils/qt/logging.py +95 -0
- chutils-3.6.0/src/chutils/qt/shim.py +97 -0
- chutils-3.6.0/src/chutils/qt/signals.py +185 -0
- chutils-3.6.0/src/chutils/qt/widgets.py +95 -0
- chutils-3.6.0/src/chutils/scaffold.py +55 -0
- chutils-3.6.0/src/chutils/scraping/__init__.py +35 -0
- chutils-3.6.0/src/chutils/scraping/captcha/__init__.py +60 -0
- chutils-3.6.0/src/chutils/scraping/captcha/anticaptcha.py +293 -0
- chutils-3.6.0/src/chutils/scraping/captcha/base.py +75 -0
- chutils-3.6.0/src/chutils/scraping/captcha/capmonster.py +293 -0
- chutils-3.6.0/src/chutils/scraping/captcha/exceptions.py +17 -0
- chutils-3.6.0/src/chutils/scraping/captcha/rucaptcha.py +350 -0
- chutils-3.6.0/src/chutils/scraping/concurrency/__init__.py +19 -0
- chutils-3.6.0/src/chutils/scraping/concurrency/limiter.py +125 -0
- chutils-3.6.0/src/chutils/scraping/concurrency/metrics.py +67 -0
- chutils-3.6.0/src/chutils/scraping/concurrency/pool.py +146 -0
- chutils-3.6.0/src/chutils/scraping/concurrency/queues.py +428 -0
- chutils-3.6.0/src/chutils/scraping/humanize/__init__.py +48 -0
- chutils-3.6.0/src/chutils/scraping/humanize/actions.py +657 -0
- chutils-3.6.0/src/chutils/scraping/humanize/antidetect.py +222 -0
- chutils-3.6.0/src/chutils/scraping/humanize/math_utils.py +360 -0
- chutils-3.6.0/src/chutils/scraping/humanize/warmer.py +232 -0
- chutils-3.6.0/src/chutils/scraping/profiles/__init__.py +23 -0
- chutils-3.6.0/src/chutils/scraping/profiles/adapters/__init__.py +23 -0
- chutils-3.6.0/src/chutils/scraping/profiles/adapters/nodriver.py +99 -0
- chutils-3.6.0/src/chutils/scraping/profiles/adapters/playwright.py +109 -0
- chutils-3.6.0/src/chutils/scraping/profiles/adapters/selenium.py +86 -0
- chutils-3.6.0/src/chutils/scraping/profiles/manager.py +129 -0
- chutils-3.6.0/src/chutils/scraping/profiles/models.py +46 -0
- chutils-3.6.0/src/chutils/scraping/profiles/storage.py +89 -0
- chutils-3.6.0/src/chutils/secret_manager/__init__.py +10 -0
- chutils-3.6.0/src/chutils/secret_manager/core.py +297 -0
- chutils-3.6.0/src/chutils/secret_manager/providers/__init__.py +46 -0
- chutils-3.6.0/src/chutils/secret_manager/providers/aws.py +161 -0
- chutils-3.6.0/src/chutils/secret_manager/providers/base.py +48 -0
- chutils-3.6.0/src/chutils/secret_manager/providers/dotenv.py +91 -0
- chutils-3.6.0/src/chutils/secret_manager/providers/gcp.py +195 -0
- chutils-3.6.0/src/chutils/secret_manager/providers/keyring_provider.py +153 -0
- chutils-3.6.0/src/chutils/store/__init__.py +11 -0
- chutils-3.6.0/src/chutils/store/backends/__init__.py +12 -0
- chutils-3.6.0/src/chutils/store/backends/base.py +132 -0
- chutils-3.6.0/src/chutils/store/backends/memcached.py +217 -0
- chutils-3.6.0/src/chutils/store/backends/memory.py +157 -0
- chutils-3.6.0/src/chutils/store/backends/redis.py +193 -0
- chutils-3.6.0/src/chutils/store/decorator.py +87 -0
- chutils-3.6.0/src/chutils/store/manager.py +352 -0
- chutils-3.6.0/src/chutils/tasks/__init__.py +23 -0
- chutils-3.6.0/src/chutils/tasks/__init__.pyi +38 -0
- chutils-3.6.0/src/chutils/tasks/core.py +371 -0
- chutils-3.6.0/src/chutils/telegram/__init__.py +41 -0
- chutils-3.6.0/src/chutils/telegram/access.py +192 -0
- chutils-3.6.0/src/chutils/telegram/aiogram.py +193 -0
- chutils-3.6.0/src/chutils/telegram/formatting.py +169 -0
- chutils-3.6.0/src/chutils/telegram/keyboard.py +224 -0
- chutils-3.6.0/src/chutils/telegram/logging.py +117 -0
- chutils-3.6.0/src/chutils/telegram/media.py +249 -0
- chutils-3.6.0/src/chutils/telegram/notifier.py +218 -0
- chutils-3.6.0/src/chutils/telegram/rate_limit.py +167 -0
- chutils-3.6.0/src/chutils/telegram/whitelist.py +273 -0
- chutils-3.6.0/src/chutils/templates/vk/vk-miniapp/backend/config.yml.template +9 -0
- chutils-3.6.0/src/chutils/templates/vk/vk-miniapp/backend/main.py.template +58 -0
- chutils-3.6.0/src/chutils/templates/vk/vk-miniapp/docker-compose.yml.template +14 -0
- chutils-3.6.0/src/chutils/templates/vk/vk-miniapp/frontend/App.jsx.template +56 -0
- chutils-3.6.0/src/chutils/testing/__init__.py +11 -0
- chutils-3.6.0/src/chutils/testing/fixtures.py +215 -0
- chutils-3.6.0/src/chutils/text.py +59 -0
- chutils-3.6.0/src/chutils/time.py +216 -0
- chutils-3.6.0/src/chutils/tracing.py +209 -0
- chutils-3.6.0/src/chutils/typing.py +55 -0
- chutils-3.6.0/src/chutils/validation.py +150 -0
- chutils-3.6.0/src/chutils/validation.pyi +11 -0
- chutils-3.6.0/src/chutils/vk/__init__.py +8 -0
- chutils-3.6.0/src/chutils/vk/callback/__init__.py +8 -0
- chutils-3.6.0/src/chutils/vk/callback/router.py +220 -0
- chutils-3.6.0/src/chutils/vk/testing/__init__.py +16 -0
- chutils-3.6.0/src/chutils/vk/testing/fixtures.py +115 -0
- chutils-3.6.0/src/chutils/vk/testing/generators.py +132 -0
- chutils-3.6.0/src/chutils/vkma/__init__.py +14 -0
- chutils-3.6.0/src/chutils/vkma/exceptions.py +5 -0
- chutils-3.6.0/src/chutils/vkma/integrations/__init__.py +15 -0
- chutils-3.6.0/src/chutils/vkma/integrations/aiohttp.py +73 -0
- chutils-3.6.0/src/chutils/vkma/integrations/fastapi.py +131 -0
- chutils-3.6.0/src/chutils/vkma/integrations/flask.py +71 -0
- chutils-3.6.0/src/chutils/vkma/models.py +80 -0
- chutils-3.6.0/src/chutils/vkma/testing.py +17 -0
- chutils-3.6.0/src/chutils/vkma/validator.py +186 -0
- chutils-3.6.0/src/chutils/web/__init__.py +17 -0
- chutils-3.6.0/src/chutils/web/client.py +412 -0
- chutils-3.6.0/src/chutils/web/proxy_pool.py +178 -0
- chutils-3.6.0/src/chutils/web/user_agent.py +59 -0
- chutils-3.6.0/tests/conftest.py +107 -0
- chutils-3.6.0/tests/integration/test_ai_lint_integration.py +52 -0
- chutils-3.6.0/tests/integration/test_cli_e2e.py +36 -0
- chutils-3.6.0/tests/integration/test_db_migrations.py +350 -0
- chutils-3.6.0/tests/integration/test_event_loops.py +112 -0
- chutils-3.6.0/tests/integration/test_examples.py +170 -0
- chutils-3.6.0/tests/integration/test_hooks_integration.py +43 -0
- chutils-3.6.0/tests/integration/test_masking_integration.py +63 -0
- chutils-3.6.0/tests/integration/test_otel_tracing.py +171 -0
- chutils-3.6.0/tests/integration/test_remote_config_integration.py +49 -0
- chutils-3.6.0/tests/integration/test_setup_github_actions_integration.py +41 -0
- chutils-3.6.0/tests/manual/manual_test_cli_booster.py +39 -0
- chutils-3.6.0/tests/unit/cli/conftest.py +67 -0
- chutils-3.6.0/tests/unit/cli/test_cli.py +262 -0
- chutils-3.6.0/tests/unit/cli/test_cli_booster.py +106 -0
- chutils-3.6.0/tests/unit/cli/test_cli_check.py +69 -0
- chutils-3.6.0/tests/unit/cli/test_cli_config.py +90 -0
- chutils-3.6.0/tests/unit/cli/test_cli_config_cmd.py +104 -0
- chutils-3.6.0/tests/unit/cli/test_cli_config_schema.py +90 -0
- chutils-3.6.0/tests/unit/cli/test_cli_dev.py +85 -0
- chutils-3.6.0/tests/unit/cli/test_cli_dev_cmd.py +604 -0
- chutils-3.6.0/tests/unit/cli/test_cli_dev_lock.py +66 -0
- chutils-3.6.0/tests/unit/cli/test_cli_dev_tree.py +42 -0
- chutils-3.6.0/tests/unit/cli/test_cli_dev_watch.py +122 -0
- chutils-3.6.0/tests/unit/cli/test_cli_diagnostics.py +156 -0
- chutils-3.6.0/tests/unit/cli/test_cli_extras_suggestion.py +32 -0
- chutils-3.6.0/tests/unit/cli/test_cli_init.py +103 -0
- chutils-3.6.0/tests/unit/cli/test_cli_init_interactive.py +107 -0
- chutils-3.6.0/tests/unit/cli/test_cli_paths.py +52 -0
- chutils-3.6.0/tests/unit/cli/test_cli_pypi.py +522 -0
- chutils-3.6.0/tests/unit/cli/test_cli_rich.py +56 -0
- chutils-3.6.0/tests/unit/cli/test_cli_rich_width.py +50 -0
- chutils-3.6.0/tests/unit/cli/test_cli_secrets.py +154 -0
- chutils-3.6.0/tests/unit/cli/test_cli_setup_github_actions.py +115 -0
- chutils-3.6.0/tests/unit/cli/test_cli_template.py +83 -0
- chutils-3.6.0/tests/unit/cli/test_cli_utils_internal.py +66 -0
- chutils-3.6.0/tests/unit/cli/test_cli_validate.py +112 -0
- chutils-3.6.0/tests/unit/config/test_config.py +528 -0
- chutils-3.6.0/tests/unit/config/test_config_ast_parser.py +106 -0
- chutils-3.6.0/tests/unit/config/test_config_dev.py +194 -0
- chutils-3.6.0/tests/unit/config/test_config_diagnostics.py +51 -0
- chutils-3.6.0/tests/unit/config/test_config_env_loading.py +83 -0
- chutils-3.6.0/tests/unit/config/test_config_generator.py +56 -0
- chutils-3.6.0/tests/unit/config/test_config_integrations.py +95 -0
- chutils-3.6.0/tests/unit/config/test_config_json.py +106 -0
- chutils-3.6.0/tests/unit/config/test_config_pydantic.py +159 -0
- chutils-3.6.0/tests/unit/config/test_config_required.py +157 -0
- chutils-3.6.0/tests/unit/config/test_config_schema.py +104 -0
- chutils-3.6.0/tests/unit/config/test_config_sse.py +148 -0
- chutils-3.6.0/tests/unit/config/test_config_sse_integration.py +76 -0
- chutils-3.6.0/tests/unit/config/test_config_universal_env.py +55 -0
- chutils-3.6.0/tests/unit/config/test_config_utils.py +88 -0
- chutils-3.6.0/tests/unit/config/test_config_validation_group.py +57 -0
- chutils-3.6.0/tests/unit/config/test_config_watcher.py +158 -0
- chutils-3.6.0/tests/unit/config/test_config_webhook.py +139 -0
- chutils-3.6.0/tests/unit/config/test_custom_config_providers.py +415 -0
- chutils-3.6.0/tests/unit/config/test_priority_unification.py +77 -0
- chutils-3.6.0/tests/unit/config/test_remote_config.py +133 -0
- chutils-3.6.0/tests/unit/core/test_ast_indexer.py +196 -0
- chutils-3.6.0/tests/unit/core/test_ast_indexer_graph.py +65 -0
- chutils-3.6.0/tests/unit/core/test_ast_indexer_layers.py +83 -0
- chutils-3.6.0/tests/unit/core/test_ast_indexer_metadata.py +58 -0
- chutils-3.6.0/tests/unit/core/test_cache.py +283 -0
- chutils-3.6.0/tests/unit/core/test_dev_models.py +62 -0
- chutils-3.6.0/tests/unit/core/test_exceptions.py +76 -0
- chutils-3.6.0/tests/unit/core/test_features.py +137 -0
- chutils-3.6.0/tests/unit/core/test_fs.py +609 -0
- chutils-3.6.0/tests/unit/core/test_lifecycle.py +219 -0
- chutils-3.6.0/tests/unit/core/test_thread_safety.py +218 -0
- chutils-3.6.0/tests/unit/core/test_time.py +127 -0
- chutils-3.6.0/tests/unit/decorators/test_decorator_circuit_breaker.py +237 -0
- chutils-3.6.0/tests/unit/decorators/test_decorator_retry.py +132 -0
- chutils-3.6.0/tests/unit/decorators/test_decorator_timeout.py +148 -0
- chutils-3.6.0/tests/unit/decorators/test_rate_limit.py +148 -0
- chutils-3.6.0/tests/unit/dev/test_ai_lint.py +960 -0
- chutils-3.6.0/tests/unit/dev/test_ai_lint_staged.py +135 -0
- chutils-3.6.0/tests/unit/dev/test_changelog_parser.py +129 -0
- chutils-3.6.0/tests/unit/dev/test_chat_context.py +252 -0
- chutils-3.6.0/tests/unit/dev/test_cleaner.py +194 -0
- chutils-3.6.0/tests/unit/dev/test_context_generator.py +52 -0
- chutils-3.6.0/tests/unit/dev/test_env_parser.py +151 -0
- chutils-3.6.0/tests/unit/dev/test_generate_few_shot.py +531 -0
- chutils-3.6.0/tests/unit/dev/test_linter_coverage_rule.py +175 -0
- chutils-3.6.0/tests/unit/dev/test_mock_server.py +306 -0
- chutils-3.6.0/tests/unit/dev/test_runners.py +98 -0
- chutils-3.6.0/tests/unit/dev/test_scaffold.py +149 -0
- chutils-3.6.0/tests/unit/dev/test_setup_github_actions.py +76 -0
- chutils-3.6.0/tests/unit/dev/test_upgrade_check_rule.py +103 -0
- chutils-3.6.0/tests/unit/dev/test_upgrade_client.py +138 -0
- chutils-3.6.0/tests/unit/dev/test_version_detector.py +180 -0
- chutils-3.6.0/tests/unit/dev/test_watcher.py +130 -0
- chutils-3.6.0/tests/unit/di/test_di.py +294 -0
- chutils-3.6.0/tests/unit/events/test_event_bus.py +332 -0
- chutils-3.6.0/tests/unit/logger/conftest.py +144 -0
- chutils-3.6.0/tests/unit/logger/test_basics.py +92 -0
- chutils-3.6.0/tests/unit/logger/test_compression.py +39 -0
- chutils-3.6.0/tests/unit/logger/test_config_sections.py +127 -0
- chutils-3.6.0/tests/unit/logger/test_configuration.py +228 -0
- chutils-3.6.0/tests/unit/logger/test_context.py +93 -0
- chutils-3.6.0/tests/unit/logger/test_env_control.py +75 -0
- chutils-3.6.0/tests/unit/logger/test_files.py +115 -0
- chutils-3.6.0/tests/unit/logger/test_json_format.py +129 -0
- chutils-3.6.0/tests/unit/logger/test_logger_rich_width.py +30 -0
- chutils-3.6.0/tests/unit/logger/test_masking.py +87 -0
- chutils-3.6.0/tests/unit/logger/test_performance_security.py +92 -0
- chutils-3.6.0/tests/unit/logger/test_rich.py +105 -0
- chutils-3.6.0/tests/unit/logger/test_rotation.py +191 -0
- chutils-3.6.0/tests/unit/metrics/test_metrics.py +198 -0
- chutils-3.6.0/tests/unit/plugins/test_integration.py +211 -0
- chutils-3.6.0/tests/unit/plugins/test_interfaces.py +165 -0
- chutils-3.6.0/tests/unit/plugins/test_plugins.py +168 -0
- chutils-3.6.0/tests/unit/scraping/test_profile_adapters.py +109 -0
- chutils-3.6.0/tests/unit/scraping/test_profile_manager.py +78 -0
- chutils-3.6.0/tests/unit/scraping/test_profile_storage.py +76 -0
- chutils-3.6.0/tests/unit/scraping/test_queue_metrics.py +54 -0
- chutils-3.6.0/tests/unit/scraping/test_worker_metrics.py +27 -0
- chutils-3.6.0/tests/unit/secret_manager/test_secret_manager.py +242 -0
- chutils-3.6.0/tests/unit/secret_manager/test_secret_manager_env.py +127 -0
- chutils-3.6.0/tests/unit/secret_manager/test_secret_manager_providers.py +511 -0
- chutils-3.6.0/tests/unit/secret_manager/test_secrets_required.py +87 -0
- chutils-3.6.0/tests/unit/tasks/test_scheduler.py +343 -0
- chutils-3.6.0/tests/unit/telegram/test_access.py +76 -0
- chutils-3.6.0/tests/unit/telegram/test_aiogram_filter.py +47 -0
- chutils-3.6.0/tests/unit/telegram/test_aiogram_middleware.py +44 -0
- chutils-3.6.0/tests/unit/telegram/test_formatting.py +62 -0
- chutils-3.6.0/tests/unit/telegram/test_keyboard.py +56 -0
- chutils-3.6.0/tests/unit/telegram/test_logging.py +29 -0
- chutils-3.6.0/tests/unit/telegram/test_notifier.py +75 -0
- chutils-3.6.0/tests/unit/telegram/test_telegram_rate_limit.py +54 -0
- chutils-3.6.0/tests/unit/telegram/test_whitelist.py +45 -0
- chutils-3.6.0/tests/unit/test_ai_lint_ignore.py +103 -0
- chutils-3.6.0/tests/unit/test_anticaptcha.py +130 -0
- chutils-3.6.0/tests/unit/test_antidetect.py +148 -0
- chutils-3.6.0/tests/unit/test_async_web_client.py +92 -0
- chutils-3.6.0/tests/unit/test_audit.py +399 -0
- chutils-3.6.0/tests/unit/test_audit_phase2.py +393 -0
- chutils-3.6.0/tests/unit/test_capmonster.py +92 -0
- chutils-3.6.0/tests/unit/test_captcha_base.py +41 -0
- chutils-3.6.0/tests/unit/test_captcha_imports.py +25 -0
- chutils-3.6.0/tests/unit/test_cli_db.py +325 -0
- chutils-3.6.0/tests/unit/test_concurrency_limiter.py +42 -0
- chutils-3.6.0/tests/unit/test_concurrency_pool.py +60 -0
- chutils-3.6.0/tests/unit/test_concurrency_queues.py +170 -0
- chutils-3.6.0/tests/unit/test_config_alias_choices.py +50 -0
- chutils-3.6.0/tests/unit/test_config_fallback.py +73 -0
- chutils-3.6.0/tests/unit/test_crypto.py +154 -0
- chutils-3.6.0/tests/unit/test_crypto_dependencies.py +56 -0
- chutils-3.6.0/tests/unit/test_crypto_stream.py +90 -0
- chutils-3.6.0/tests/unit/test_dashboard.py +405 -0
- chutils-3.6.0/tests/unit/test_db_init.py +283 -0
- chutils-3.6.0/tests/unit/test_db_operations.py +278 -0
- chutils-3.6.0/tests/unit/test_decorators_bulkhead.py +268 -0
- chutils-3.6.0/tests/unit/test_diagnostics.py +365 -0
- chutils-3.6.0/tests/unit/test_env.py +286 -0
- chutils-3.6.0/tests/unit/test_events_exception_group.py +46 -0
- chutils-3.6.0/tests/unit/test_http_api.py +221 -0
- chutils-3.6.0/tests/unit/test_http_client.py +365 -0
- chutils-3.6.0/tests/unit/test_http_fallback.py +417 -0
- chutils-3.6.0/tests/unit/test_http_resilience.py +343 -0
- chutils-3.6.0/tests/unit/test_http_streaming.py +396 -0
- chutils-3.6.0/tests/unit/test_http_tracing.py +239 -0
- chutils-3.6.0/tests/unit/test_humanize_math.py +107 -0
- chutils-3.6.0/tests/unit/test_init_templates.py +23 -0
- chutils-3.6.0/tests/unit/test_install_hooks.py +124 -0
- chutils-3.6.0/tests/unit/test_minimal_imports.py +88 -0
- chutils-3.6.0/tests/unit/test_nodriver_humanize.py +158 -0
- chutils-3.6.0/tests/unit/test_playwright_humanize.py +106 -0
- chutils-3.6.0/tests/unit/test_profile_imports.py +235 -0
- chutils-3.6.0/tests/unit/test_profile_warmer.py +147 -0
- chutils-3.6.0/tests/unit/test_proxy_pool.py +87 -0
- chutils-3.6.0/tests/unit/test_qt_asyncio.py +109 -0
- chutils-3.6.0/tests/unit/test_qt_logging.py +135 -0
- chutils-3.6.0/tests/unit/test_qt_shim.py +75 -0
- chutils-3.6.0/tests/unit/test_qt_signals.py +118 -0
- chutils-3.6.0/tests/unit/test_qt_widgets.py +132 -0
- chutils-3.6.0/tests/unit/test_rucaptcha.py +121 -0
- chutils-3.6.0/tests/unit/test_scraping_imports.py +42 -0
- chutils-3.6.0/tests/unit/test_selenium_humanize.py +134 -0
- chutils-3.6.0/tests/unit/test_store_backends_external.py +131 -0
- chutils-3.6.0/tests/unit/test_store_integrations.py +89 -0
- chutils-3.6.0/tests/unit/test_store_manager.py +76 -0
- chutils-3.6.0/tests/unit/test_store_memory.py +81 -0
- chutils-3.6.0/tests/unit/test_telegram_media.py +83 -0
- chutils-3.6.0/tests/unit/test_telegram_send_file.py +71 -0
- chutils-3.6.0/tests/unit/test_text.py +81 -0
- chutils-3.6.0/tests/unit/test_text_dependencies.py +23 -0
- chutils-3.6.0/tests/unit/test_validation.py +286 -0
- chutils-3.6.0/tests/unit/test_vk_callback_fastapi.py +61 -0
- chutils-3.6.0/tests/unit/test_vk_callback_router.py +47 -0
- chutils-3.6.0/tests/unit/test_vk_testing_fixtures.py +29 -0
- chutils-3.6.0/tests/unit/test_vk_testing_generators.py +57 -0
- chutils-3.6.0/tests/unit/test_vkma_core.py +120 -0
- chutils-3.6.0/tests/unit/test_vkma_integrations.py +135 -0
- chutils-3.6.0/tests/unit/test_web_client.py +85 -0
- chutils-3.6.0/tests/unit/testing/test_fixtures.py +88 -0
- chutils-3.6.0/uv.lock +3481 -0
- chutils-3.4.2/.github/workflows/ci.yml +0 -45
- chutils-3.4.2/PKG-INFO +0 -548
- chutils-3.4.2/README.md +0 -467
- chutils-3.4.2/ai-lint.toml +0 -183
- chutils-3.4.2/api_map.md +0 -238
- chutils-3.4.2/benchmarks/cold_start.py +0 -70
- chutils-3.4.2/conductor/product.md +0 -240
- chutils-3.4.2/conductor/tracks/ai_context_opt_20260728/plan.md +0 -17
- chutils-3.4.2/conductor/tracks/async_lifecycle_20260728/plan.md +0 -16
- chutils-3.4.2/conductor/tracks/browser_profiles_20260728/plan.md +0 -23
- chutils-3.4.2/conductor/tracks/queue_monitoring_20260728/plan.md +0 -16
- chutils-3.4.2/conductor/tracks/stream_crypto_20260728/plan.md +0 -16
- chutils-3.4.2/conductor/tracks/telegram_access_20260729/plan.md +0 -18
- chutils-3.4.2/conductor/tracks/telegram_formatting_20260729/plan.md +0 -17
- chutils-3.4.2/conductor/tracks/telegram_keyboard_20260729/plan.md +0 -18
- chutils-3.4.2/conductor/tracks/telegram_logging_20260729/plan.md +0 -17
- chutils-3.4.2/conductor/tracks/telegram_media_20260729/plan.md +0 -18
- chutils-3.4.2/conductor/tracks/telegram_notifier_20260729/plan.md +0 -17
- chutils-3.4.2/conductor/tracks/telegram_ratelimit_20260729/plan.md +0 -19
- chutils-3.4.2/conductor/tracks/telegram_send_file_20260729/plan.md +0 -18
- chutils-3.4.2/conductor/tracks/telegram_whitelist_20260729/plan.md +0 -17
- chutils-3.4.2/conductor/tracks.md +0 -91
- chutils-3.4.2/docs/README_RU.md +0 -478
- chutils-3.4.2/docs/ai_examples/configuration/bad_pattern.py +0 -20
- chutils-3.4.2/docs/ai_examples/error_handling/good_pattern.py +0 -91
- chutils-3.4.2/docs/ai_examples/logging/bad_pattern.py +0 -25
- chutils-3.4.2/docs/ai_examples/logging/good_pattern.py +0 -38
- chutils-3.4.2/docs/ai_examples/optional_deps/bad_pattern.py +0 -46
- chutils-3.4.2/docs/ai_examples/optional_deps/good_pattern.py +0 -65
- chutils-3.4.2/docs/ai_lint.md +0 -463
- chutils-3.4.2/docs/api.md +0 -413
- chutils-3.4.2/docs/audit.md +0 -119
- chutils-3.4.2/docs/captcha.md +0 -112
- chutils-3.4.2/docs/cli/check.md +0 -97
- chutils-3.4.2/docs/cli/dev.md +0 -799
- chutils-3.4.2/docs/custom_config_providers.md +0 -297
- chutils-3.4.2/docs/dependencies.md +0 -119
- chutils-3.4.2/docs/http.md +0 -154
- chutils-3.4.2/docs/migration.md +0 -237
- chutils-3.4.2/docs/plugins.md +0 -189
- chutils-3.4.2/docs/recipes.md +0 -1588
- chutils-3.4.2/docs/scraping.md +0 -283
- chutils-3.4.2/docs/store.md +0 -98
- chutils-3.4.2/docs/testing.md +0 -102
- chutils-3.4.2/docs/web.md +0 -126
- chutils-3.4.2/examples/01_configuration.py +0 -50
- chutils-3.4.2/examples/02_logging.py +0 -46
- chutils-3.4.2/examples/03_secrets.py +0 -74
- chutils-3.4.2/examples/04_full_example.py +0 -66
- chutils-3.4.2/examples/05_different_log_levels.py +0 -50
- chutils-3.4.2/examples/06_local_config_override.py +0 -75
- chutils-3.4.2/examples/07_decorators_example.py +0 -41
- chutils-3.4.2/examples/08_multiple_loggers_example.py +0 -34
- chutils-3.4.2/examples/09_disable_keyring.py +0 -42
- chutils-3.4.2/examples/10_universal_env_override.py +0 -43
- chutils-3.4.2/examples/11_retry_decorator.py +0 -57
- chutils-3.4.2/examples/12_secret_masking.py +0 -51
- chutils-3.4.2/examples/13_pydantic_validation.py +0 -85
- chutils-3.4.2/examples/15_context_logging.py +0 -90
- chutils-3.4.2/examples/17_timeout_decorator.py +0 -62
- chutils-3.4.2/examples/18_config_hot_reload.py +0 -97
- chutils-3.4.2/examples/19_remote_config.py +0 -95
- chutils-3.4.2/examples/20_opentelemetry_tracing.py +0 -49
- chutils-3.4.2/examples/21_config_diagnostics.py +0 -45
- chutils-3.4.2/examples/22_qt_logging.py +0 -41
- chutils-3.4.2/examples/22_safe_path_resolution.py +0 -88
- chutils-3.4.2/examples/23_event_bus.py +0 -121
- chutils-3.4.2/examples/23_qt_async.py +0 -58
- chutils-3.4.2/examples/24_qt_typed_signals.py +0 -73
- chutils-3.4.2/examples/24_task_scheduler.py +0 -61
- chutils-3.4.2/examples/25_testing_fixtures_example.py +0 -85
- chutils-3.4.2/examples/26_metrics_prometheus.py +0 -69
- chutils-3.4.2/examples/27_rate_limiting.py +0 -77
- chutils-3.4.2/examples/28_dependency_injection.py +0 -78
- chutils-3.4.2/examples/captcha_solvers_usage.py +0 -67
- chutils-3.4.2/examples/concurrency_scraping_usage.py +0 -50
- chutils-3.4.2/examples/config.yml +0 -63
- chutils-3.4.2/examples/scraping_humanize_usage.py +0 -67
- chutils-3.4.2/examples/web_client_usage.py +0 -86
- chutils-3.4.2/mkdocs.yml +0 -58
- chutils-3.4.2/project_index.json +0 -35046
- chutils-3.4.2/pyproject.toml +0 -156
- chutils-3.4.2/src/chutils/__init__.py +0 -403
- chutils-3.4.2/src/chutils/__init__.pyi +0 -1222
- chutils-3.4.2/src/chutils/audit/__init__.py +0 -44
- chutils-3.4.2/src/chutils/audit/_hash.py +0 -22
- chutils-3.4.2/src/chutils/audit/api.py +0 -194
- chutils-3.4.2/src/chutils/audit/backends/__init__.py +0 -6
- chutils-3.4.2/src/chutils/audit/backends/base.py +0 -46
- chutils-3.4.2/src/chutils/audit/backends/file.py +0 -123
- chutils-3.4.2/src/chutils/audit/backends/postgres.py +0 -224
- chutils-3.4.2/src/chutils/audit/backends/sqlite.py +0 -200
- chutils-3.4.2/src/chutils/audit/schema.py +0 -116
- chutils-3.4.2/src/chutils/cache/__init__.py +0 -5
- chutils-3.4.2/src/chutils/cache/base.py +0 -143
- chutils-3.4.2/src/chutils/cache/decorator.py +0 -164
- chutils-3.4.2/src/chutils/cache/utils.py +0 -75
- chutils-3.4.2/src/chutils/cli.py +0 -127
- chutils-3.4.2/src/chutils/cli_booster.py +0 -161
- chutils-3.4.2/src/chutils/cli_utils.py +0 -179
- chutils-3.4.2/src/chutils/commands/__init__.py +0 -37
- chutils-3.4.2/src/chutils/commands/base.py +0 -43
- chutils-3.4.2/src/chutils/commands/check.py +0 -238
- chutils-3.4.2/src/chutils/commands/config.py +0 -227
- chutils-3.4.2/src/chutils/commands/db.py +0 -496
- chutils-3.4.2/src/chutils/commands/dev/__init__.py +0 -715
- chutils-3.4.2/src/chutils/commands/dev/ai_lint.py +0 -138
- chutils-3.4.2/src/chutils/commands/dev/base.py +0 -40
- chutils-3.4.2/src/chutils/commands/dev/chat_context.py +0 -100
- chutils-3.4.2/src/chutils/commands/dev/clean.py +0 -124
- chutils-3.4.2/src/chutils/commands/dev/dashboard.py +0 -40
- chutils-3.4.2/src/chutils/commands/dev/diagnostics.py +0 -113
- chutils-3.4.2/src/chutils/commands/dev/few_shot.py +0 -55
- chutils-3.4.2/src/chutils/commands/dev/generate_context.py +0 -478
- chutils-3.4.2/src/chutils/commands/dev/hooks.py +0 -209
- chutils-3.4.2/src/chutils/commands/dev/mock.py +0 -87
- chutils-3.4.2/src/chutils/commands/dev/profile_imports.py +0 -47
- chutils-3.4.2/src/chutils/commands/dev/scaffold.py +0 -72
- chutils-3.4.2/src/chutils/commands/dev/setup_github_actions.py +0 -147
- chutils-3.4.2/src/chutils/commands/dev/sync_env.py +0 -177
- chutils-3.4.2/src/chutils/commands/dev/watch.py +0 -105
- chutils-3.4.2/src/chutils/commands/env.py +0 -191
- chutils-3.4.2/src/chutils/commands/init.py +0 -366
- chutils-3.4.2/src/chutils/commands/paths.py +0 -89
- chutils-3.4.2/src/chutils/commands/pypi.py +0 -426
- chutils-3.4.2/src/chutils/commands/secrets.py +0 -219
- chutils-3.4.2/src/chutils/commands/template.py +0 -118
- chutils-3.4.2/src/chutils/commands/utils.py +0 -41
- chutils-3.4.2/src/chutils/commands/validate.py +0 -112
- chutils-3.4.2/src/chutils/config/__init__.py +0 -312
- chutils-3.4.2/src/chutils/config/ast_fallback_parser.py +0 -147
- chutils-3.4.2/src/chutils/config/core.py +0 -510
- chutils-3.4.2/src/chutils/config/custom_providers.py +0 -290
- chutils-3.4.2/src/chutils/config/dev.py +0 -420
- chutils-3.4.2/src/chutils/config/diagnostics.py +0 -151
- chutils-3.4.2/src/chutils/config/generator.py +0 -154
- chutils-3.4.2/src/chutils/config/getters.py +0 -522
- chutils-3.4.2/src/chutils/config/integrations.py +0 -124
- chutils-3.4.2/src/chutils/config/manager.py +0 -597
- chutils-3.4.2/src/chutils/config/providers.py +0 -578
- chutils-3.4.2/src/chutils/config/schema.py +0 -125
- chutils-3.4.2/src/chutils/config/sse.py +0 -258
- chutils-3.4.2/src/chutils/config/utils.py +0 -357
- chutils-3.4.2/src/chutils/config/watcher.py +0 -158
- chutils-3.4.2/src/chutils/config/webhook_server.py +0 -217
- chutils-3.4.2/src/chutils/context.py +0 -101
- chutils-3.4.2/src/chutils/crypto.py +0 -179
- chutils-3.4.2/src/chutils/db.py +0 -267
- chutils-3.4.2/src/chutils/decorators.py +0 -918
- chutils-3.4.2/src/chutils/dev/__init__.py +0 -37
- chutils-3.4.2/src/chutils/dev/ai_lint.py +0 -590
- chutils-3.4.2/src/chutils/dev/ast_indexer.py +0 -549
- chutils-3.4.2/src/chutils/dev/changelog_parser.py +0 -193
- chutils-3.4.2/src/chutils/dev/chat_context.py +0 -441
- chutils-3.4.2/src/chutils/dev/cleaner.py +0 -221
- chutils-3.4.2/src/chutils/dev/constants.py +0 -13
- chutils-3.4.2/src/chutils/dev/dashboard/__init__.py +0 -20
- chutils-3.4.2/src/chutils/dev/dashboard/indexer.py +0 -218
- chutils-3.4.2/src/chutils/dev/dashboard/input.py +0 -146
- chutils-3.4.2/src/chutils/dev/dashboard/tui.py +0 -593
- chutils-3.4.2/src/chutils/dev/env_parser.py +0 -227
- chutils-3.4.2/src/chutils/dev/env_sync.py +0 -113
- chutils-3.4.2/src/chutils/dev/few_shot/__init__.py +0 -113
- chutils-3.4.2/src/chutils/dev/few_shot/detector.py +0 -225
- chutils-3.4.2/src/chutils/dev/few_shot/renderer.py +0 -455
- chutils-3.4.2/src/chutils/dev/few_shot/writer.py +0 -301
- chutils-3.4.2/src/chutils/dev/github_actions.py +0 -91
- chutils-3.4.2/src/chutils/dev/mock_server.py +0 -506
- chutils-3.4.2/src/chutils/dev/models/__init__.py +0 -17
- chutils-3.4.2/src/chutils/dev/models/base.py +0 -35
- chutils-3.4.2/src/chutils/dev/models/index.py +0 -34
- chutils-3.4.2/src/chutils/dev/models/node.py +0 -19
- chutils-3.4.2/src/chutils/dev/models/symbol.py +0 -21
- chutils-3.4.2/src/chutils/dev/profile_imports.py +0 -351
- chutils-3.4.2/src/chutils/dev/project_metadata.py +0 -240
- chutils-3.4.2/src/chutils/dev/rules/__init__.py +0 -24
- chutils-3.4.2/src/chutils/dev/rules/api_map.py +0 -456
- chutils-3.4.2/src/chutils/dev/rules/decomposition.py +0 -153
- chutils-3.4.2/src/chutils/dev/rules/dependency_sync.py +0 -248
- chutils-3.4.2/src/chutils/dev/rules/docstring.py +0 -292
- chutils-3.4.2/src/chutils/dev/rules/env.py +0 -111
- chutils-3.4.2/src/chutils/dev/rules/integration.py +0 -281
- chutils-3.4.2/src/chutils/dev/rules/linter_coverage.py +0 -171
- chutils-3.4.2/src/chutils/dev/rules/manifest.py +0 -74
- chutils-3.4.2/src/chutils/dev/rules/security.py +0 -99
- chutils-3.4.2/src/chutils/dev/rules/upgrade_check.py +0 -116
- chutils-3.4.2/src/chutils/dev/runners.py +0 -202
- chutils-3.4.2/src/chutils/dev/scaffold.py +0 -424
- chutils-3.4.2/src/chutils/dev/upgrade_client.py +0 -150
- chutils-3.4.2/src/chutils/dev/version_detector.py +0 -292
- chutils-3.4.2/src/chutils/dev/watcher.py +0 -424
- chutils-3.4.2/src/chutils/di/__init__.py +0 -9
- chutils-3.4.2/src/chutils/di/__init__.pyi +0 -39
- chutils-3.4.2/src/chutils/di/container.py +0 -386
- chutils-3.4.2/src/chutils/diagnostics/__init__.py +0 -24
- chutils-3.4.2/src/chutils/diagnostics/manager.py +0 -254
- chutils-3.4.2/src/chutils/diagnostics/models.py +0 -98
- chutils-3.4.2/src/chutils/diagnostics/web.py +0 -79
- chutils-3.4.2/src/chutils/env.py +0 -194
- chutils-3.4.2/src/chutils/env.pyi +0 -34
- chutils-3.4.2/src/chutils/events/__init__.py +0 -22
- chutils-3.4.2/src/chutils/events/core.py +0 -262
- chutils-3.4.2/src/chutils/exceptions/__init__.py +0 -80
- chutils-3.4.2/src/chutils/exceptions/audit.py +0 -15
- chutils-3.4.2/src/chutils/exceptions/base.py +0 -66
- chutils-3.4.2/src/chutils/exceptions/cache.py +0 -7
- chutils-3.4.2/src/chutils/exceptions/config.py +0 -52
- chutils-3.4.2/src/chutils/exceptions/di.py +0 -19
- chutils-3.4.2/src/chutils/exceptions/events.py +0 -34
- chutils-3.4.2/src/chutils/exceptions/logger.py +0 -7
- chutils-3.4.2/src/chutils/exceptions/resilience.py +0 -25
- chutils-3.4.2/src/chutils/exceptions/secrets.py +0 -19
- chutils-3.4.2/src/chutils/exceptions/system.py +0 -44
- chutils-3.4.2/src/chutils/exceptions/validation.py +0 -148
- chutils-3.4.2/src/chutils/exceptions/watcher.py +0 -7
- chutils-3.4.2/src/chutils/features.py +0 -192
- chutils-3.4.2/src/chutils/fs.py +0 -462
- chutils-3.4.2/src/chutils/http/__init__.py +0 -63
- chutils-3.4.2/src/chutils/http/api.py +0 -167
- chutils-3.4.2/src/chutils/http/client.py +0 -678
- chutils-3.4.2/src/chutils/http/fallback.py +0 -455
- chutils-3.4.2/src/chutils/http/resilience.py +0 -402
- chutils-3.4.2/src/chutils/http/streaming.py +0 -529
- chutils-3.4.2/src/chutils/http/tracing.py +0 -139
- chutils-3.4.2/src/chutils/lifecycle.py +0 -243
- chutils-3.4.2/src/chutils/logger/__init__.py +0 -67
- chutils-3.4.2/src/chutils/logger/core.py +0 -227
- chutils-3.4.2/src/chutils/logger/formatters.py +0 -85
- chutils-3.4.2/src/chutils/logger/handlers.py +0 -124
- chutils-3.4.2/src/chutils/logger/internal/builder.py +0 -425
- chutils-3.4.2/src/chutils/logger/internal/levels.py +0 -66
- chutils-3.4.2/src/chutils/logger/internal/utils.py +0 -64
- chutils-3.4.2/src/chutils/logger/masking.py +0 -171
- chutils-3.4.2/src/chutils/metrics/__init__.py +0 -152
- chutils-3.4.2/src/chutils/metrics/base.py +0 -56
- chutils-3.4.2/src/chutils/metrics/in_memory.py +0 -171
- chutils-3.4.2/src/chutils/metrics/prometheus.py +0 -111
- chutils-3.4.2/src/chutils/metrics/timer.py +0 -94
- chutils-3.4.2/src/chutils/plugins/__init__.py +0 -24
- chutils-3.4.2/src/chutils/plugins/core.py +0 -142
- chutils-3.4.2/src/chutils/plugins/interfaces.py +0 -88
- chutils-3.4.2/src/chutils/qt/__init__.py +0 -49
- chutils-3.4.2/src/chutils/qt/asyncio.py +0 -145
- chutils-3.4.2/src/chutils/qt/logging.py +0 -87
- chutils-3.4.2/src/chutils/qt/shim.py +0 -91
- chutils-3.4.2/src/chutils/qt/signals.py +0 -179
- chutils-3.4.2/src/chutils/qt/widgets.py +0 -95
- chutils-3.4.2/src/chutils/scraping/__init__.py +0 -5
- chutils-3.4.2/src/chutils/scraping/captcha/__init__.py +0 -59
- chutils-3.4.2/src/chutils/scraping/captcha/anticaptcha.py +0 -281
- chutils-3.4.2/src/chutils/scraping/captcha/base.py +0 -71
- chutils-3.4.2/src/chutils/scraping/captcha/capmonster.py +0 -281
- chutils-3.4.2/src/chutils/scraping/captcha/exceptions.py +0 -21
- chutils-3.4.2/src/chutils/scraping/captcha/rucaptcha.py +0 -299
- chutils-3.4.2/src/chutils/scraping/concurrency/__init__.py +0 -19
- chutils-3.4.2/src/chutils/scraping/concurrency/limiter.py +0 -114
- chutils-3.4.2/src/chutils/scraping/concurrency/pool.py +0 -128
- chutils-3.4.2/src/chutils/scraping/concurrency/queues.py +0 -391
- chutils-3.4.2/src/chutils/scraping/humanize/__init__.py +0 -38
- chutils-3.4.2/src/chutils/scraping/humanize/actions.py +0 -438
- chutils-3.4.2/src/chutils/scraping/humanize/antidetect.py +0 -221
- chutils-3.4.2/src/chutils/scraping/humanize/math_utils.py +0 -223
- chutils-3.4.2/src/chutils/scraping/humanize/warmer.py +0 -204
- chutils-3.4.2/src/chutils/secret_manager/__init__.py +0 -10
- chutils-3.4.2/src/chutils/secret_manager/core.py +0 -290
- chutils-3.4.2/src/chutils/secret_manager/providers/__init__.py +0 -47
- chutils-3.4.2/src/chutils/secret_manager/providers/aws.py +0 -134
- chutils-3.4.2/src/chutils/secret_manager/providers/base.py +0 -51
- chutils-3.4.2/src/chutils/secret_manager/providers/dotenv.py +0 -91
- chutils-3.4.2/src/chutils/secret_manager/providers/gcp.py +0 -168
- chutils-3.4.2/src/chutils/secret_manager/providers/keyring_provider.py +0 -124
- chutils-3.4.2/src/chutils/store/__init__.py +0 -10
- chutils-3.4.2/src/chutils/store/backends/__init__.py +0 -11
- chutils-3.4.2/src/chutils/store/backends/base.py +0 -131
- chutils-3.4.2/src/chutils/store/backends/memcached.py +0 -211
- chutils-3.4.2/src/chutils/store/backends/memory.py +0 -156
- chutils-3.4.2/src/chutils/store/backends/redis.py +0 -192
- chutils-3.4.2/src/chutils/store/decorator.py +0 -85
- chutils-3.4.2/src/chutils/store/manager.py +0 -351
- chutils-3.4.2/src/chutils/tasks/__init__.py +0 -22
- chutils-3.4.2/src/chutils/tasks/__init__.pyi +0 -49
- chutils-3.4.2/src/chutils/tasks/core.py +0 -325
- chutils-3.4.2/src/chutils/testing/__init__.py +0 -11
- chutils-3.4.2/src/chutils/testing/fixtures.py +0 -208
- chutils-3.4.2/src/chutils/text.py +0 -59
- chutils-3.4.2/src/chutils/time.py +0 -215
- chutils-3.4.2/src/chutils/tracing.py +0 -196
- chutils-3.4.2/src/chutils/typing.py +0 -62
- chutils-3.4.2/src/chutils/validation.py +0 -143
- chutils-3.4.2/src/chutils/validation.pyi +0 -13
- chutils-3.4.2/src/chutils/web/__init__.py +0 -17
- chutils-3.4.2/src/chutils/web/client.py +0 -416
- chutils-3.4.2/src/chutils/web/proxy_pool.py +0 -174
- chutils-3.4.2/src/chutils/web/user_agent.py +0 -61
- chutils-3.4.2/tests/conftest.py +0 -54
- chutils-3.4.2/tests/integration/test_ai_lint_integration.py +0 -58
- chutils-3.4.2/tests/integration/test_cli_e2e.py +0 -35
- chutils-3.4.2/tests/integration/test_db_migrations.py +0 -351
- chutils-3.4.2/tests/integration/test_event_loops.py +0 -110
- chutils-3.4.2/tests/integration/test_examples.py +0 -159
- chutils-3.4.2/tests/integration/test_hooks_integration.py +0 -41
- chutils-3.4.2/tests/integration/test_masking_integration.py +0 -61
- chutils-3.4.2/tests/integration/test_otel_tracing.py +0 -159
- chutils-3.4.2/tests/integration/test_remote_config_integration.py +0 -49
- chutils-3.4.2/tests/integration/test_setup_github_actions_integration.py +0 -35
- chutils-3.4.2/tests/manual/manual_test_cli_booster.py +0 -23
- chutils-3.4.2/tests/unit/cli/conftest.py +0 -69
- chutils-3.4.2/tests/unit/cli/test_cli.py +0 -229
- chutils-3.4.2/tests/unit/cli/test_cli_booster.py +0 -105
- chutils-3.4.2/tests/unit/cli/test_cli_check.py +0 -60
- chutils-3.4.2/tests/unit/cli/test_cli_config.py +0 -81
- chutils-3.4.2/tests/unit/cli/test_cli_config_cmd.py +0 -91
- chutils-3.4.2/tests/unit/cli/test_cli_config_schema.py +0 -77
- chutils-3.4.2/tests/unit/cli/test_cli_dev.py +0 -84
- chutils-3.4.2/tests/unit/cli/test_cli_dev_cmd.py +0 -507
- chutils-3.4.2/tests/unit/cli/test_cli_dev_tree.py +0 -41
- chutils-3.4.2/tests/unit/cli/test_cli_dev_watch.py +0 -118
- chutils-3.4.2/tests/unit/cli/test_cli_diagnostics.py +0 -139
- chutils-3.4.2/tests/unit/cli/test_cli_extras_suggestion.py +0 -31
- chutils-3.4.2/tests/unit/cli/test_cli_init.py +0 -99
- chutils-3.4.2/tests/unit/cli/test_cli_init_interactive.py +0 -76
- chutils-3.4.2/tests/unit/cli/test_cli_paths.py +0 -46
- chutils-3.4.2/tests/unit/cli/test_cli_pypi.py +0 -426
- chutils-3.4.2/tests/unit/cli/test_cli_rich.py +0 -54
- chutils-3.4.2/tests/unit/cli/test_cli_rich_width.py +0 -50
- chutils-3.4.2/tests/unit/cli/test_cli_secrets.py +0 -125
- chutils-3.4.2/tests/unit/cli/test_cli_setup_github_actions.py +0 -92
- chutils-3.4.2/tests/unit/cli/test_cli_template.py +0 -81
- chutils-3.4.2/tests/unit/cli/test_cli_utils_internal.py +0 -65
- chutils-3.4.2/tests/unit/cli/test_cli_validate.py +0 -99
- chutils-3.4.2/tests/unit/config/test_config.py +0 -502
- chutils-3.4.2/tests/unit/config/test_config_ast_parser.py +0 -106
- chutils-3.4.2/tests/unit/config/test_config_dev.py +0 -187
- chutils-3.4.2/tests/unit/config/test_config_diagnostics.py +0 -52
- chutils-3.4.2/tests/unit/config/test_config_env_loading.py +0 -80
- chutils-3.4.2/tests/unit/config/test_config_generator.py +0 -55
- chutils-3.4.2/tests/unit/config/test_config_integrations.py +0 -95
- chutils-3.4.2/tests/unit/config/test_config_json.py +0 -95
- chutils-3.4.2/tests/unit/config/test_config_pydantic.py +0 -155
- chutils-3.4.2/tests/unit/config/test_config_required.py +0 -145
- chutils-3.4.2/tests/unit/config/test_config_schema.py +0 -101
- chutils-3.4.2/tests/unit/config/test_config_sse.py +0 -155
- chutils-3.4.2/tests/unit/config/test_config_sse_integration.py +0 -79
- chutils-3.4.2/tests/unit/config/test_config_universal_env.py +0 -53
- chutils-3.4.2/tests/unit/config/test_config_utils.py +0 -40
- chutils-3.4.2/tests/unit/config/test_config_validation_group.py +0 -53
- chutils-3.4.2/tests/unit/config/test_config_watcher.py +0 -157
- chutils-3.4.2/tests/unit/config/test_config_webhook.py +0 -137
- chutils-3.4.2/tests/unit/config/test_custom_config_providers.py +0 -401
- chutils-3.4.2/tests/unit/config/test_priority_unification.py +0 -72
- chutils-3.4.2/tests/unit/config/test_remote_config.py +0 -130
- chutils-3.4.2/tests/unit/core/test_ast_indexer.py +0 -190
- chutils-3.4.2/tests/unit/core/test_ast_indexer_graph.py +0 -54
- chutils-3.4.2/tests/unit/core/test_ast_indexer_layers.py +0 -79
- chutils-3.4.2/tests/unit/core/test_ast_indexer_metadata.py +0 -58
- chutils-3.4.2/tests/unit/core/test_cache.py +0 -284
- chutils-3.4.2/tests/unit/core/test_dev_models.py +0 -62
- chutils-3.4.2/tests/unit/core/test_exceptions.py +0 -74
- chutils-3.4.2/tests/unit/core/test_features.py +0 -150
- chutils-3.4.2/tests/unit/core/test_fs.py +0 -584
- chutils-3.4.2/tests/unit/core/test_lifecycle.py +0 -159
- chutils-3.4.2/tests/unit/core/test_thread_safety.py +0 -217
- chutils-3.4.2/tests/unit/core/test_time.py +0 -110
- chutils-3.4.2/tests/unit/decorators/test_decorator_circuit_breaker.py +0 -238
- chutils-3.4.2/tests/unit/decorators/test_decorator_retry.py +0 -129
- chutils-3.4.2/tests/unit/decorators/test_decorator_timeout.py +0 -146
- chutils-3.4.2/tests/unit/decorators/test_rate_limit.py +0 -148
- chutils-3.4.2/tests/unit/dev/test_ai_lint.py +0 -944
- chutils-3.4.2/tests/unit/dev/test_ai_lint_staged.py +0 -129
- chutils-3.4.2/tests/unit/dev/test_changelog_parser.py +0 -115
- chutils-3.4.2/tests/unit/dev/test_chat_context.py +0 -252
- chutils-3.4.2/tests/unit/dev/test_cleaner.py +0 -188
- chutils-3.4.2/tests/unit/dev/test_env_parser.py +0 -152
- chutils-3.4.2/tests/unit/dev/test_generate_few_shot.py +0 -511
- chutils-3.4.2/tests/unit/dev/test_linter_coverage_rule.py +0 -194
- chutils-3.4.2/tests/unit/dev/test_mock_server.py +0 -298
- chutils-3.4.2/tests/unit/dev/test_runners.py +0 -101
- chutils-3.4.2/tests/unit/dev/test_scaffold.py +0 -139
- chutils-3.4.2/tests/unit/dev/test_setup_github_actions.py +0 -75
- chutils-3.4.2/tests/unit/dev/test_upgrade_check_rule.py +0 -55
- chutils-3.4.2/tests/unit/dev/test_upgrade_client.py +0 -125
- chutils-3.4.2/tests/unit/dev/test_version_detector.py +0 -175
- chutils-3.4.2/tests/unit/dev/test_watcher.py +0 -135
- chutils-3.4.2/tests/unit/di/test_di.py +0 -293
- chutils-3.4.2/tests/unit/events/test_event_bus.py +0 -315
- chutils-3.4.2/tests/unit/logger/conftest.py +0 -129
- chutils-3.4.2/tests/unit/logger/test_basics.py +0 -92
- chutils-3.4.2/tests/unit/logger/test_compression.py +0 -39
- chutils-3.4.2/tests/unit/logger/test_config_sections.py +0 -115
- chutils-3.4.2/tests/unit/logger/test_configuration.py +0 -120
- chutils-3.4.2/tests/unit/logger/test_context.py +0 -90
- chutils-3.4.2/tests/unit/logger/test_env_control.py +0 -75
- chutils-3.4.2/tests/unit/logger/test_files.py +0 -101
- chutils-3.4.2/tests/unit/logger/test_json_format.py +0 -122
- chutils-3.4.2/tests/unit/logger/test_logger_rich_width.py +0 -30
- chutils-3.4.2/tests/unit/logger/test_masking.py +0 -78
- chutils-3.4.2/tests/unit/logger/test_performance_security.py +0 -86
- chutils-3.4.2/tests/unit/logger/test_rich.py +0 -99
- chutils-3.4.2/tests/unit/logger/test_rotation.py +0 -169
- chutils-3.4.2/tests/unit/metrics/test_metrics.py +0 -185
- chutils-3.4.2/tests/unit/plugins/test_integration.py +0 -198
- chutils-3.4.2/tests/unit/plugins/test_interfaces.py +0 -109
- chutils-3.4.2/tests/unit/plugins/test_plugins.py +0 -120
- chutils-3.4.2/tests/unit/secret_manager/test_secret_manager.py +0 -225
- chutils-3.4.2/tests/unit/secret_manager/test_secret_manager_env.py +0 -117
- chutils-3.4.2/tests/unit/secret_manager/test_secret_manager_providers.py +0 -455
- chutils-3.4.2/tests/unit/secret_manager/test_secrets_required.py +0 -85
- chutils-3.4.2/tests/unit/tasks/test_scheduler.py +0 -306
- chutils-3.4.2/tests/unit/test_ai_lint_ignore.py +0 -77
- chutils-3.4.2/tests/unit/test_anticaptcha.py +0 -127
- chutils-3.4.2/tests/unit/test_antidetect.py +0 -133
- chutils-3.4.2/tests/unit/test_async_web_client.py +0 -86
- chutils-3.4.2/tests/unit/test_audit.py +0 -365
- chutils-3.4.2/tests/unit/test_audit_phase2.py +0 -363
- chutils-3.4.2/tests/unit/test_capmonster.py +0 -89
- chutils-3.4.2/tests/unit/test_captcha_base.py +0 -41
- chutils-3.4.2/tests/unit/test_captcha_imports.py +0 -22
- chutils-3.4.2/tests/unit/test_cli_db.py +0 -321
- chutils-3.4.2/tests/unit/test_concurrency_limiter.py +0 -43
- chutils-3.4.2/tests/unit/test_concurrency_pool.py +0 -58
- chutils-3.4.2/tests/unit/test_concurrency_queues.py +0 -161
- chutils-3.4.2/tests/unit/test_config_alias_choices.py +0 -45
- chutils-3.4.2/tests/unit/test_config_fallback.py +0 -72
- chutils-3.4.2/tests/unit/test_crypto.py +0 -148
- chutils-3.4.2/tests/unit/test_crypto_dependencies.py +0 -47
- chutils-3.4.2/tests/unit/test_dashboard.py +0 -401
- chutils-3.4.2/tests/unit/test_db_init.py +0 -256
- chutils-3.4.2/tests/unit/test_db_operations.py +0 -259
- chutils-3.4.2/tests/unit/test_decorators_bulkhead.py +0 -269
- chutils-3.4.2/tests/unit/test_diagnostics.py +0 -367
- chutils-3.4.2/tests/unit/test_env.py +0 -261
- chutils-3.4.2/tests/unit/test_events_exception_group.py +0 -42
- chutils-3.4.2/tests/unit/test_http_api.py +0 -213
- chutils-3.4.2/tests/unit/test_http_client.py +0 -344
- chutils-3.4.2/tests/unit/test_http_fallback.py +0 -407
- chutils-3.4.2/tests/unit/test_http_resilience.py +0 -330
- chutils-3.4.2/tests/unit/test_http_streaming.py +0 -385
- chutils-3.4.2/tests/unit/test_http_tracing.py +0 -226
- chutils-3.4.2/tests/unit/test_humanize_math.py +0 -78
- chutils-3.4.2/tests/unit/test_install_hooks.py +0 -124
- chutils-3.4.2/tests/unit/test_minimal_imports.py +0 -84
- chutils-3.4.2/tests/unit/test_nodriver_humanize.py +0 -147
- chutils-3.4.2/tests/unit/test_playwright_humanize.py +0 -71
- chutils-3.4.2/tests/unit/test_profile_imports.py +0 -214
- chutils-3.4.2/tests/unit/test_profile_warmer.py +0 -132
- chutils-3.4.2/tests/unit/test_proxy_pool.py +0 -85
- chutils-3.4.2/tests/unit/test_qt_asyncio.py +0 -102
- chutils-3.4.2/tests/unit/test_qt_logging.py +0 -117
- chutils-3.4.2/tests/unit/test_qt_shim.py +0 -75
- chutils-3.4.2/tests/unit/test_qt_signals.py +0 -111
- chutils-3.4.2/tests/unit/test_qt_widgets.py +0 -127
- chutils-3.4.2/tests/unit/test_rucaptcha.py +0 -117
- chutils-3.4.2/tests/unit/test_scraping_imports.py +0 -39
- chutils-3.4.2/tests/unit/test_selenium_humanize.py +0 -102
- chutils-3.4.2/tests/unit/test_store_backends_external.py +0 -117
- chutils-3.4.2/tests/unit/test_store_integrations.py +0 -87
- chutils-3.4.2/tests/unit/test_store_manager.py +0 -76
- chutils-3.4.2/tests/unit/test_store_memory.py +0 -80
- chutils-3.4.2/tests/unit/test_text.py +0 -74
- chutils-3.4.2/tests/unit/test_text_dependencies.py +0 -21
- chutils-3.4.2/tests/unit/test_validation.py +0 -251
- chutils-3.4.2/tests/unit/test_web_client.py +0 -81
- chutils-3.4.2/tests/unit/testing/test_fixtures.py +0 -88
- chutils-3.4.2/uv.lock +0 -3095
- {chutils-3.4.2 → chutils-3.6.0}/.chutilsignore +0 -0
- {chutils-3.4.2 → chutils-3.6.0}/.gitattributes +0 -0
- {chutils-3.4.2 → chutils-3.6.0}/.github/workflows/publish-docs.yml +0 -0
- {chutils-3.4.2 → chutils-3.6.0}/.gitignore +0 -0
- {chutils-3.4.2 → chutils-3.6.0}/CODE_OF_CONDUCT.md +0 -0
- {chutils-3.4.2 → chutils-3.6.0}/CONTRIBUTING.md +0 -0
- {chutils-3.4.2 → chutils-3.6.0}/GEMINI.md +0 -0
- {chutils-3.4.2 → chutils-3.6.0}/LICENSE +0 -0
- {chutils-3.4.2 → chutils-3.6.0}/conductor/.gitignore +0 -0
- {chutils-3.4.2 → chutils-3.6.0}/conductor/GEMINI.md +0 -0
- {chutils-3.4.2/conductor/tracks → chutils-3.6.0/conductor/archive}/ai_context_opt_20260728/index.md +0 -0
- {chutils-3.4.2/conductor/tracks → chutils-3.6.0/conductor/archive}/ai_context_opt_20260728/metadata.json +0 -0
- {chutils-3.4.2/conductor/tracks → chutils-3.6.0/conductor/archive}/ai_context_opt_20260728/spec.md +0 -0
- {chutils-3.4.2/conductor/tracks → chutils-3.6.0/conductor/archive}/async_lifecycle_20260728/index.md +0 -0
- {chutils-3.4.2/conductor/tracks → chutils-3.6.0/conductor/archive}/async_lifecycle_20260728/metadata.json +0 -0
- {chutils-3.4.2/conductor/tracks → chutils-3.6.0/conductor/archive}/async_lifecycle_20260728/spec.md +0 -0
- {chutils-3.4.2/conductor/tracks → chutils-3.6.0/conductor/archive}/browser_profiles_20260728/index.md +0 -0
- {chutils-3.4.2/conductor/tracks → chutils-3.6.0/conductor/archive}/browser_profiles_20260728/metadata.json +0 -0
- {chutils-3.4.2/conductor/tracks → chutils-3.6.0/conductor/archive}/browser_profiles_20260728/spec.md +0 -0
- {chutils-3.4.2/conductor/tracks → chutils-3.6.0/conductor/archive}/queue_monitoring_20260728/index.md +0 -0
- {chutils-3.4.2/conductor/tracks → chutils-3.6.0/conductor/archive}/queue_monitoring_20260728/metadata.json +0 -0
- {chutils-3.4.2/conductor/tracks → chutils-3.6.0/conductor/archive}/queue_monitoring_20260728/spec.md +0 -0
- {chutils-3.4.2/conductor/tracks → chutils-3.6.0/conductor/archive}/stream_crypto_20260728/index.md +0 -0
- {chutils-3.4.2/conductor/tracks → chutils-3.6.0/conductor/archive}/stream_crypto_20260728/metadata.json +0 -0
- {chutils-3.4.2/conductor/tracks → chutils-3.6.0/conductor/archive}/stream_crypto_20260728/spec.md +0 -0
- {chutils-3.4.2/conductor/tracks → chutils-3.6.0/conductor/archive}/telegram_access_20260729/index.md +0 -0
- {chutils-3.4.2/conductor/tracks → chutils-3.6.0/conductor/archive}/telegram_access_20260729/metadata.json +0 -0
- {chutils-3.4.2/conductor/tracks → chutils-3.6.0/conductor/archive}/telegram_access_20260729/spec.md +0 -0
- {chutils-3.4.2/conductor/tracks → chutils-3.6.0/conductor/archive}/telegram_formatting_20260729/index.md +0 -0
- {chutils-3.4.2/conductor/tracks → chutils-3.6.0/conductor/archive}/telegram_formatting_20260729/metadata.json +0 -0
- {chutils-3.4.2/conductor/tracks → chutils-3.6.0/conductor/archive}/telegram_formatting_20260729/spec.md +0 -0
- {chutils-3.4.2/conductor/tracks → chutils-3.6.0/conductor/archive}/telegram_keyboard_20260729/index.md +0 -0
- {chutils-3.4.2/conductor/tracks → chutils-3.6.0/conductor/archive}/telegram_keyboard_20260729/metadata.json +0 -0
- {chutils-3.4.2/conductor/tracks → chutils-3.6.0/conductor/archive}/telegram_keyboard_20260729/spec.md +0 -0
- {chutils-3.4.2/conductor/tracks → chutils-3.6.0/conductor/archive}/telegram_logging_20260729/index.md +0 -0
- {chutils-3.4.2/conductor/tracks → chutils-3.6.0/conductor/archive}/telegram_logging_20260729/metadata.json +0 -0
- {chutils-3.4.2/conductor/tracks → chutils-3.6.0/conductor/archive}/telegram_logging_20260729/spec.md +0 -0
- {chutils-3.4.2/conductor/tracks → chutils-3.6.0/conductor/archive}/telegram_media_20260729/index.md +0 -0
- {chutils-3.4.2/conductor/tracks → chutils-3.6.0/conductor/archive}/telegram_media_20260729/metadata.json +0 -0
- {chutils-3.4.2/conductor/tracks → chutils-3.6.0/conductor/archive}/telegram_media_20260729/spec.md +0 -0
- {chutils-3.4.2/conductor/tracks → chutils-3.6.0/conductor/archive}/telegram_notifier_20260729/index.md +0 -0
- {chutils-3.4.2/conductor/tracks → chutils-3.6.0/conductor/archive}/telegram_notifier_20260729/metadata.json +0 -0
- {chutils-3.4.2/conductor/tracks → chutils-3.6.0/conductor/archive}/telegram_notifier_20260729/spec.md +0 -0
- {chutils-3.4.2/conductor/tracks → chutils-3.6.0/conductor/archive}/telegram_ratelimit_20260729/index.md +0 -0
- {chutils-3.4.2/conductor/tracks → chutils-3.6.0/conductor/archive}/telegram_ratelimit_20260729/metadata.json +0 -0
- {chutils-3.4.2/conductor/tracks → chutils-3.6.0/conductor/archive}/telegram_ratelimit_20260729/spec.md +0 -0
- {chutils-3.4.2/conductor/tracks → chutils-3.6.0/conductor/archive}/telegram_send_file_20260729/index.md +0 -0
- {chutils-3.4.2/conductor/tracks → chutils-3.6.0/conductor/archive}/telegram_send_file_20260729/metadata.json +0 -0
- {chutils-3.4.2/conductor/tracks → chutils-3.6.0/conductor/archive}/telegram_send_file_20260729/spec.md +0 -0
- {chutils-3.4.2/conductor/tracks → chutils-3.6.0/conductor/archive}/telegram_whitelist_20260729/index.md +0 -0
- {chutils-3.4.2/conductor/tracks → chutils-3.6.0/conductor/archive}/telegram_whitelist_20260729/metadata.json +0 -0
- {chutils-3.4.2/conductor/tracks → chutils-3.6.0/conductor/archive}/telegram_whitelist_20260729/spec.md +0 -0
- {chutils-3.4.2 → chutils-3.6.0}/conductor/code_styleguides/python.md +0 -0
- {chutils-3.4.2 → chutils-3.6.0}/conductor/index.md +0 -0
- {chutils-3.4.2 → chutils-3.6.0}/conductor/product-guidelines.md +0 -0
- {chutils-3.4.2 → chutils-3.6.0}/conductor/setup_state.json +0 -0
- {chutils-3.4.2 → chutils-3.6.0}/conductor/tech-stack.md +0 -0
- {chutils-3.4.2 → chutils-3.6.0}/conductor/workflow.md +0 -0
- {chutils-3.4.2 → chutils-3.6.0}/docs/CODE_OF_CONDUCT_RU.md +0 -0
- {chutils-3.4.2 → chutils-3.6.0}/docs/CONTRIBUTING_RU.md +0 -0
- {chutils-3.4.2 → chutils-3.6.0}/docs/INTEGRATION_AI.md +0 -0
- {chutils-3.4.2 → chutils-3.6.0}/docs/ai_examples/README.md +0 -0
- {chutils-3.4.2 → chutils-3.6.0}/docs/ai_examples/configuration/README.md +0 -0
- {chutils-3.4.2 → chutils-3.6.0}/docs/ai_examples/configuration/good_pattern.py +0 -0
- {chutils-3.4.2 → chutils-3.6.0}/docs/ai_examples/error_handling/README.md +0 -0
- {chutils-3.4.2 → chutils-3.6.0}/docs/ai_examples/error_handling/bad_pattern.py +0 -0
- {chutils-3.4.2 → chutils-3.6.0}/docs/ai_examples/logging/README.md +0 -0
- {chutils-3.4.2 → chutils-3.6.0}/docs/ai_examples/optional_deps/README.md +0 -0
- {chutils-3.4.2 → chutils-3.6.0}/docs/ai_examples/secrets/README.md +0 -0
- {chutils-3.4.2 → chutils-3.6.0}/docs/ai_examples/secrets/bad_pattern.py +0 -0
- {chutils-3.4.2 → chutils-3.6.0}/docs/ai_examples/secrets/good_pattern.py +0 -0
- {chutils-3.4.2 → chutils-3.6.0}/docs/ai_hints.md +0 -0
- {chutils-3.4.2 → chutils-3.6.0}/docs/cli/config.md +0 -0
- {chutils-3.4.2 → chutils-3.6.0}/docs/cli/db.md +0 -0
- {chutils-3.4.2 → chutils-3.6.0}/docs/cli/env.md +0 -0
- {chutils-3.4.2 → chutils-3.6.0}/docs/cli/index.md +0 -0
- {chutils-3.4.2 → chutils-3.6.0}/docs/cli/init.md +0 -0
- {chutils-3.4.2 → chutils-3.6.0}/docs/cli/pypi.md +0 -0
- {chutils-3.4.2 → chutils-3.6.0}/docs/cli/secrets.md +0 -0
- {chutils-3.4.2 → chutils-3.6.0}/docs/cli/show_paths.md +0 -0
- {chutils-3.4.2 → chutils-3.6.0}/docs/cli/template.md +0 -0
- {chutils-3.4.2 → chutils-3.6.0}/docs/cli/validate.md +0 -0
- {chutils-3.4.2 → chutils-3.6.0}/docs/index.md +0 -0
- {chutils-3.4.2 → chutils-3.6.0}/docs/qt.md +0 -0
- {chutils-3.4.2 → chutils-3.6.0}/examples/.env +0 -0
- {chutils-3.4.2 → chutils-3.6.0}/examples/16_cloud_secret_managers.py +0 -0
- {chutils-3.4.2 → chutils-3.6.0}/examples/22_circuit_breaker_decorator.py +0 -0
- {chutils-3.4.2 → chutils-3.6.0}/src/chutils/__main__.py +0 -0
- {chutils-3.4.2 → chutils-3.6.0}/src/chutils/antigravity.md +0 -0
- {chutils-3.4.2 → chutils-3.6.0}/src/chutils/cache/in_memory.py +0 -0
- {chutils-3.4.2 → chutils-3.6.0}/src/chutils/config/GEMINI.md +0 -0
- {chutils-3.4.2 → chutils-3.6.0}/src/chutils/dev/few_shot/models.py +0 -0
- {chutils-3.4.2 → chutils-3.6.0}/src/chutils/logger/GEMINI.md +0 -0
- {chutils-3.4.2 → chutils-3.6.0}/src/chutils/scraping/concurrency/base.py +0 -0
- {chutils-3.4.2 → chutils-3.6.0}/src/chutils/scraping/concurrency/models.py +0 -0
- {chutils-3.4.2 → chutils-3.6.0}/src/chutils/secret_manager/GEMINI.md +0 -0
- {chutils-3.4.2 → chutils-3.6.0}/src/chutils/secret_manager/providers/env.py +0 -0
- {chutils-3.4.2 → chutils-3.6.0}/tests/integration/__init__.py +0 -0
- {chutils-3.4.2 → chutils-3.6.0}/tests/unit/config/test_config_env.py +0 -0
- {chutils-3.4.2 → chutils-3.6.0}/tests/unit/config/test_config_tracing.py +0 -0
- {chutils-3.4.2 → chutils-3.6.0}/tests/unit/core/test_ast_indexer_abstract.py +0 -0
- {chutils-3.4.2 → chutils-3.6.0}/tests/unit/decorators/test_decorators.py +0 -0
- {chutils-3.4.2 → chutils-3.6.0}/tests/unit/dev/test_env_sync.py +0 -0
- {chutils-3.4.2 → chutils-3.6.0}/tests/unit/test_concurrency_imports.py +0 -0
- {chutils-3.4.2 → chutils-3.6.0}/tests/unit/test_user_agent.py +0 -0
- {chutils-3.4.2 → chutils-3.6.0}/tests/unit/test_web_imports.py +0 -0
|
@@ -0,0 +1,46 @@
|
|
|
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', '3.15-dev' ]
|
|
15
|
+
|
|
16
|
+
|
|
17
|
+
steps:
|
|
18
|
+
- uses: actions/checkout@v4
|
|
19
|
+
|
|
20
|
+
- name: Set up Python ${{ matrix.python-version }}
|
|
21
|
+
uses: actions/setup-python@v5
|
|
22
|
+
with:
|
|
23
|
+
python-version: ${{ matrix.python-version }}
|
|
24
|
+
|
|
25
|
+
- name: Install uv
|
|
26
|
+
uses: astral-sh/setup-uv@v5
|
|
27
|
+
with:
|
|
28
|
+
enable-cache: true
|
|
29
|
+
version: "latest"
|
|
30
|
+
|
|
31
|
+
- name: Install dependencies
|
|
32
|
+
run: |
|
|
33
|
+
uv sync --all-extras
|
|
34
|
+
|
|
35
|
+
- name: Run Tests
|
|
36
|
+
run: |
|
|
37
|
+
uv run pytest
|
|
38
|
+
|
|
39
|
+
- name: Run Type Checking (Mypy)
|
|
40
|
+
run: |
|
|
41
|
+
uv run mypy src
|
|
42
|
+
|
|
43
|
+
- name: Run AI-Readiness Audit
|
|
44
|
+
run: |
|
|
45
|
+
uv run python -m chutils dev ai-lint --soft-mode
|
|
46
|
+
|
chutils-3.6.0/PKG-INFO
ADDED
|
@@ -0,0 +1,558 @@
|
|
|
1
|
+
Metadata-Version: 2.5
|
|
2
|
+
Name: chutils
|
|
3
|
+
Version: 3.6.0
|
|
4
|
+
Summary: Набор простых и удобных утилит для Python, который избавляет от рутины при работе с конфигурацией и логированием в новых проектах.
|
|
5
|
+
Author-email: Chu4hel <sergeiivanov636@gmail.com>
|
|
6
|
+
License-Expression: MIT
|
|
7
|
+
License-File: LICENSE
|
|
8
|
+
Requires-Python: <3.16,>=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: aws
|
|
13
|
+
Requires-Dist: boto3>=1.34.0; extra == 'aws'
|
|
14
|
+
Provides-Extra: captcha
|
|
15
|
+
Requires-Dist: httpx>=0.27.0; extra == 'captcha'
|
|
16
|
+
Provides-Extra: crypto
|
|
17
|
+
Requires-Dist: cryptography>=42.0.0; extra == 'crypto'
|
|
18
|
+
Provides-Extra: date
|
|
19
|
+
Requires-Dist: python-dateutil>=2.9.0; extra == 'date'
|
|
20
|
+
Provides-Extra: db
|
|
21
|
+
Requires-Dist: aiosqlite>=0.20.0; extra == 'db'
|
|
22
|
+
Requires-Dist: alembic>=1.13.0; extra == 'db'
|
|
23
|
+
Requires-Dist: asyncpg>=0.29.0; extra == 'db'
|
|
24
|
+
Requires-Dist: sqlalchemy>=2.0.0; extra == 'db'
|
|
25
|
+
Provides-Extra: full
|
|
26
|
+
Requires-Dist: boto3>=1.34.0; extra == 'full'
|
|
27
|
+
Requires-Dist: cryptography>=42.0.0; extra == 'full'
|
|
28
|
+
Requires-Dist: google-cloud-secret-manager>=2.20.0; extra == 'full'
|
|
29
|
+
Requires-Dist: httpx>=0.27.0; extra == 'full'
|
|
30
|
+
Requires-Dist: keyring>=25.7.0; extra == 'full'
|
|
31
|
+
Requires-Dist: opentelemetry-api>=1.41.1; extra == 'full'
|
|
32
|
+
Requires-Dist: opentelemetry-exporter-otlp>=1.41.1; extra == 'full'
|
|
33
|
+
Requires-Dist: opentelemetry-sdk>=1.41.1; extra == 'full'
|
|
34
|
+
Requires-Dist: playwright>=1.49.0; extra == 'full'
|
|
35
|
+
Requires-Dist: prometheus-client<1.0.0,>=0.20.0; extra == 'full'
|
|
36
|
+
Requires-Dist: pydantic>=2.13.4; extra == 'full'
|
|
37
|
+
Requires-Dist: pytest>=9.0.3; extra == 'full'
|
|
38
|
+
Requires-Dist: python-dateutil>=2.9.0; extra == 'full'
|
|
39
|
+
Requires-Dist: python-json-logger>=3.2.1; extra == 'full'
|
|
40
|
+
Requires-Dist: rapidfuzz>=3.9.0; extra == 'full'
|
|
41
|
+
Requires-Dist: rich>=15.0.0; extra == 'full'
|
|
42
|
+
Requires-Dist: selenium>=4.27.0; extra == 'full'
|
|
43
|
+
Requires-Dist: watchdog>=6.0.0; extra == 'full'
|
|
44
|
+
Requires-Dist: websockets>=14.0.0; extra == 'full'
|
|
45
|
+
Provides-Extra: gcp
|
|
46
|
+
Requires-Dist: google-cloud-secret-manager>=2.20.0; extra == 'gcp'
|
|
47
|
+
Provides-Extra: json
|
|
48
|
+
Requires-Dist: python-json-logger>=3.2.1; extra == 'json'
|
|
49
|
+
Provides-Extra: metrics
|
|
50
|
+
Requires-Dist: prometheus-client<1.0.0,>=0.20.0; extra == 'metrics'
|
|
51
|
+
Provides-Extra: otel
|
|
52
|
+
Requires-Dist: opentelemetry-api>=1.41.1; extra == 'otel'
|
|
53
|
+
Requires-Dist: opentelemetry-exporter-otlp>=1.41.1; extra == 'otel'
|
|
54
|
+
Requires-Dist: opentelemetry-sdk>=1.41.1; extra == 'otel'
|
|
55
|
+
Provides-Extra: pydantic
|
|
56
|
+
Requires-Dist: pydantic<3.0.0,>=2.13.4; extra == 'pydantic'
|
|
57
|
+
Provides-Extra: qt
|
|
58
|
+
Requires-Dist: pyqt6>=6.6.0; extra == 'qt'
|
|
59
|
+
Provides-Extra: qt-pyside
|
|
60
|
+
Requires-Dist: pyside6>=6.6.0; extra == 'qt-pyside'
|
|
61
|
+
Provides-Extra: redis
|
|
62
|
+
Requires-Dist: redis>=5.0.0; extra == 'redis'
|
|
63
|
+
Provides-Extra: rich
|
|
64
|
+
Requires-Dist: rich>=15.0.0; extra == 'rich'
|
|
65
|
+
Provides-Extra: scraping
|
|
66
|
+
Requires-Dist: playwright>=1.49.0; extra == 'scraping'
|
|
67
|
+
Requires-Dist: selenium>=4.27.0; extra == 'scraping'
|
|
68
|
+
Provides-Extra: secrets
|
|
69
|
+
Requires-Dist: keyring>=25.7.0; extra == 'secrets'
|
|
70
|
+
Provides-Extra: testing
|
|
71
|
+
Requires-Dist: pytest>=9.0.3; extra == 'testing'
|
|
72
|
+
Provides-Extra: text
|
|
73
|
+
Requires-Dist: rapidfuzz>=3.9.0; extra == 'text'
|
|
74
|
+
Provides-Extra: vk
|
|
75
|
+
Requires-Dist: pydantic<3.0.0,>=2.13.4; extra == 'vk'
|
|
76
|
+
Provides-Extra: vkma
|
|
77
|
+
Requires-Dist: pydantic<3.0.0,>=2.13.4; extra == 'vkma'
|
|
78
|
+
Provides-Extra: watch
|
|
79
|
+
Requires-Dist: watchdog>=6.0.0; extra == 'watch'
|
|
80
|
+
Provides-Extra: web
|
|
81
|
+
Requires-Dist: httpx>=0.27.0; extra == 'web'
|
|
82
|
+
Provides-Extra: websockets
|
|
83
|
+
Requires-Dist: websockets>=14.0.0; extra == 'websockets'
|
|
84
|
+
Description-Content-Type: text/markdown
|
|
85
|
+
|
|
86
|
+
[Русская версия](docs/README_RU.md)
|
|
87
|
+
|
|
88
|
+
# chutils: Stop the Routine!
|
|
89
|
+
|
|
90
|
+
[](https://opensource.org/licenses/MIT)
|
|
91
|
+
[](https://www.python.org/downloads/)
|
|
92
|
+
[](https://badge.fury.io/py/chutils)
|
|
93
|
+
[](https://Chu4hel.github.io/chutils/)
|
|
94
|
+
|
|
95
|
+
**chutils** is a set of simple utilities for Python designed to eliminate the repetitive setup of configuration,
|
|
96
|
+
logging, and secrets in your projects.
|
|
97
|
+
|
|
98
|
+
Start a new project and focus on what matters, not the routine.
|
|
99
|
+
|
|
100
|
+
Full documentation is available on [our website](https://Chu4hel.github.io/chutils/) (currently in Russian).
|
|
101
|
+
|
|
102
|
+
## The Problem
|
|
103
|
+
|
|
104
|
+
Every time you start a new project, you have to solve the same tasks:
|
|
105
|
+
|
|
106
|
+
- How to conveniently read settings from a configuration file?
|
|
107
|
+
- How to configure logging to write messages to both the console and a file with daily rotation?
|
|
108
|
+
- How to securely store API keys without hardcoding them in the code?
|
|
109
|
+
- How to make it all work "out of the box" without manually defining paths?
|
|
110
|
+
|
|
111
|
+
**chutils** offers ready-made solutions for all these problems.
|
|
112
|
+
|
|
113
|
+
## Key Features
|
|
114
|
+
|
|
115
|
+
- **✨ Zero Configuration:** The library **automatically** finds your project root and the `config.yml` or `config.ini`
|
|
116
|
+
file. It uses **lazy initialization** — no heavy operations until you actually need them.
|
|
117
|
+
- **⚙️ Flexible Configuration:** Support for `YAML` and `INI` formats. Simple functions for retrieving typed data.
|
|
118
|
+
- **✍️ Advanced Logger:** The `setup_logger()` function configures logging to the console and rotating files out of the
|
|
119
|
+
box. Includes **automatic secret masking** and **smart console width detection** for IDEs (PyCharm, etc.).
|
|
120
|
+
It returns a custom logger with additional debug levels (`devdebug`, `mediumdebug`).
|
|
121
|
+
- **🔒 Secure Secret Storage:** The `secret_manager` module provides a simple interface for saving and retrieving secrets
|
|
122
|
+
via the system `keyring`, with a fallback to `.env` files.
|
|
123
|
+
- **🚀 CLI Booster:** Turn any function into a CLI tool in seconds using the `@cli_command` decorator with automatic type
|
|
124
|
+
mapping and docstring parsing.
|
|
125
|
+
- **⏰ Painless Datetime:** Always-aware UTC time utilities, smart parsing, and human-readable time intervals.
|
|
126
|
+
- **📡 Distributed Tracing:** Seamless OpenTelemetry integration with `@trace` decorator and automatic log correlation.
|
|
127
|
+
- **🔍 Config Diagnostics:** Interactive trace of configuration sources and priorities via `config debug` command.
|
|
128
|
+
- **🌐 Remote Configuration:** Load settings from HTTP/HTTPS endpoints with background polling and fallback support.
|
|
129
|
+
- **🔄 Hot-Reload:** Support for automatic configuration reloading on file changes without restart (requires
|
|
130
|
+
`pip install chutils[watch]`).
|
|
131
|
+
- **🛡️ Secure Paths:** Prevent Path Traversal attacks by safely resolving file paths against a base directory using
|
|
132
|
+
`resolve_safe_path()`.
|
|
133
|
+
- **🤖 AI Linter:** Run static analysis checks on your codebase to ensure AI readiness (strict type hints, structured
|
|
134
|
+
docstrings, API map sync, and file dependency synchronization) via `chutils dev ai-lint`.
|
|
135
|
+
- **✅ Data Validation (chutils.validation):** An all-in-one Pydantic-based data and JSON validation module featuring
|
|
136
|
+
`@validate_call` decorator for function argument checks and rich exception formatting.
|
|
137
|
+
- **🩺 Diagnostics API (chutils.diagnostics):** An asynchronous, thread-safe health checking framework with built-in
|
|
138
|
+
checks (keyring, config) and integrations for popular web frameworks (FastAPI, Flask).
|
|
139
|
+
- **⚡ Async Ready:** Most core functions have asynchronous versions (prefixed with `a`) for non-blocking execution.
|
|
140
|
+
- **🚀 Ready to Use:** Just install and use.
|
|
141
|
+
|
|
142
|
+
## Command Line Interface (CLI)
|
|
143
|
+
|
|
144
|
+
The library provides a `chutils` console command for convenient secret management without writing code.
|
|
145
|
+
|
|
146
|
+
### Secret Management
|
|
147
|
+
|
|
148
|
+
```bash
|
|
149
|
+
# Save a secret to the system storage (keyring)
|
|
150
|
+
chutils secrets set MY_API_KEY "super-secret-value"
|
|
151
|
+
|
|
152
|
+
# Delete a secret
|
|
153
|
+
chutils secrets delete MY_API_KEY
|
|
154
|
+
|
|
155
|
+
# Explicitly specify service name
|
|
156
|
+
chutils secrets set DB_PASSWORD "12345" --service my_custom_app
|
|
157
|
+
```
|
|
158
|
+
|
|
159
|
+
## Installation
|
|
160
|
+
|
|
161
|
+
```bash
|
|
162
|
+
poetry add chutils
|
|
163
|
+
```
|
|
164
|
+
|
|
165
|
+
Or using pip:
|
|
166
|
+
|
|
167
|
+
```bash
|
|
168
|
+
pip install chutils
|
|
169
|
+
```
|
|
170
|
+
|
|
171
|
+
## Examples
|
|
172
|
+
|
|
173
|
+
In the [`/examples`](./examples/) folder, you will find ready-to-run scripts demonstrating the library's key features.
|
|
174
|
+
Each example focuses on a specific task.
|
|
175
|
+
|
|
176
|
+
## Quick Start
|
|
177
|
+
|
|
178
|
+
### 1. Working with Configuration
|
|
179
|
+
|
|
180
|
+
1. (Optional) Create a `config.yml` file in your project root:
|
|
181
|
+
|
|
182
|
+
```yaml
|
|
183
|
+
# config.yml
|
|
184
|
+
Database:
|
|
185
|
+
host: localhost
|
|
186
|
+
port: 5432
|
|
187
|
+
```
|
|
188
|
+
|
|
189
|
+
2. Get values in your code:
|
|
190
|
+
|
|
191
|
+
```python
|
|
192
|
+
from chutils import get_config_value, get_config_int
|
|
193
|
+
|
|
194
|
+
db_host = get_config_value("Database", "host", fallback="127.0.0.1")
|
|
195
|
+
db_port = get_config_int("Database", "port", fallback=5432)
|
|
196
|
+
```
|
|
197
|
+
|
|
198
|
+
#### Validation via Pydantic (Optional)
|
|
199
|
+
|
|
200
|
+
For strict typing and validation, you can use Pydantic models (requires `pip install chutils[pydantic]`):
|
|
201
|
+
|
|
202
|
+
```python
|
|
203
|
+
from pydantic import BaseModel
|
|
204
|
+
from chutils import get_config
|
|
205
|
+
|
|
206
|
+
|
|
207
|
+
class AppConfig(BaseModel):
|
|
208
|
+
app_name: str
|
|
209
|
+
version: str
|
|
210
|
+
|
|
211
|
+
|
|
212
|
+
# Returns an instance of AppConfig
|
|
213
|
+
cfg = get_config(model=AppConfig)
|
|
214
|
+
print(cfg.app_name)
|
|
215
|
+
```
|
|
216
|
+
|
|
217
|
+
You can also validate specific sections:
|
|
218
|
+
```python
|
|
219
|
+
from chutils import get_config_section
|
|
220
|
+
|
|
221
|
+
db_cfg = get_config_section("Database", model=MyDbModel)
|
|
222
|
+
```
|
|
223
|
+
|
|
224
|
+
#### Overriding Configuration with Local Files (`config.local.yml`)
|
|
225
|
+
|
|
226
|
+
You can create a `config.local.yml` next to your main file. Values from the local file will **override**
|
|
227
|
+
corresponding values from the main file. This is perfect for local development or storing sensitive data (ensure
|
|
228
|
+
`*.local.*` is in your `.gitignore`).
|
|
229
|
+
|
|
230
|
+
### 2. Hot-Reload
|
|
231
|
+
|
|
232
|
+
You can make your application react to configuration file changes in real-time.
|
|
233
|
+
|
|
234
|
+
```python
|
|
235
|
+
from chutils import start_config_watcher, on_config_change, get_config_value
|
|
236
|
+
|
|
237
|
+
|
|
238
|
+
def reload_logic():
|
|
239
|
+
print("Configuration updated!")
|
|
240
|
+
# Update app state here
|
|
241
|
+
db_url = get_config_value("Database", "url")
|
|
242
|
+
|
|
243
|
+
|
|
244
|
+
# Register callback
|
|
245
|
+
on_config_change(reload_logic)
|
|
246
|
+
|
|
247
|
+
# Start watcher (requires watchdog package)
|
|
248
|
+
start_config_watcher()
|
|
249
|
+
```
|
|
250
|
+
|
|
251
|
+
To use this feature, install `watchdog`:
|
|
252
|
+
`pip install chutils[watch]`
|
|
253
|
+
|
|
254
|
+
### 3. Logging Setup
|
|
255
|
+
|
|
256
|
+
1. Configure and use the logger:
|
|
257
|
+
|
|
258
|
+
```python
|
|
259
|
+
from chutils import setup_logger_from_config, ChutilsLogger
|
|
260
|
+
|
|
261
|
+
# Automatically reads settings from [Logging] section in config.yml
|
|
262
|
+
logger: ChutilsLogger = setup_logger_from_config()
|
|
263
|
+
|
|
264
|
+
logger.info("Application started.")
|
|
265
|
+
logger.devdebug("Deep debug message (level 9).")
|
|
266
|
+
```
|
|
267
|
+
|
|
268
|
+
#### Structured Logging (JSON)
|
|
269
|
+
|
|
270
|
+
If you need to output logs in JSON format for ELK, Splunk, or cloud logging (requires `pip install chutils[json]`):
|
|
271
|
+
|
|
272
|
+
```python
|
|
273
|
+
# Via code
|
|
274
|
+
logger = setup_logger(json_format=True)
|
|
275
|
+
|
|
276
|
+
# Or via config in the [Logging] section
|
|
277
|
+
# json_format: true
|
|
278
|
+
```
|
|
279
|
+
|
|
280
|
+
#### Contextual Logging (ContextVar)
|
|
281
|
+
|
|
282
|
+
You can bind metadata to the current execution context (thread or coroutine), and it will be automatically
|
|
283
|
+
included in all log messages.
|
|
284
|
+
|
|
285
|
+
```python
|
|
286
|
+
from chutils import setup_logger, bind_context
|
|
287
|
+
|
|
288
|
+
logger = setup_logger()
|
|
289
|
+
|
|
290
|
+
# Bind request ID and user to the current context
|
|
291
|
+
bind_context(request_id="REQ-123", user="admin")
|
|
292
|
+
|
|
293
|
+
logger.info("Action performed")
|
|
294
|
+
# Text: ... [request_id=REQ-123 user=admin] Action performed
|
|
295
|
+
# JSON: {..., "message": "Action performed", "context": {"request_id": "REQ-123", "user": "admin"}}
|
|
296
|
+
```
|
|
297
|
+
|
|
298
|
+
#### Controlling Logging via Environment Variables
|
|
299
|
+
|
|
300
|
+
- `CH_LOG_JSON=true`: Forces JSON format.
|
|
301
|
+
- `CH_LOG_NO_TIME=true`: Removes the date/time from the log format (for clean Docker logs).
|
|
302
|
+
- `CH_LOG_NO_FILE=true`: Disables creating log files.
|
|
303
|
+
|
|
304
|
+
These variables have **highest priority** and override any code or config settings.
|
|
305
|
+
|
|
306
|
+
### 3. Secret Management
|
|
307
|
+
|
|
308
|
+
`SecretManager` provides a unified abstraction for managing secrets using a custom chain of providers (`SecretProvider`)
|
|
309
|
+
and automatic fallback logic.
|
|
310
|
+
|
|
311
|
+
By default, `SecretManager` searches for secrets in the following order: **Keyring > .env File > Environment Variables
|
|
312
|
+
**.
|
|
313
|
+
|
|
314
|
+
```python
|
|
315
|
+
from chutils import SecretManager
|
|
316
|
+
|
|
317
|
+
secrets = SecretManager("my_awesome_app")
|
|
318
|
+
|
|
319
|
+
# Save secret (will be written to the first writable provider in the chain)
|
|
320
|
+
secrets.save_secret("API_KEY", "secret-value-123")
|
|
321
|
+
|
|
322
|
+
# Retrieve secret
|
|
323
|
+
key = secrets.get_secret("API_KEY")
|
|
324
|
+
```
|
|
325
|
+
|
|
326
|
+
#### Built-in Providers
|
|
327
|
+
|
|
328
|
+
You can configure the providers list explicitly:
|
|
329
|
+
|
|
330
|
+
```python
|
|
331
|
+
from chutils import SecretManager
|
|
332
|
+
from chutils.secret_manager.providers import (
|
|
333
|
+
KeyringProvider,
|
|
334
|
+
DotEnvProvider,
|
|
335
|
+
EnvProvider,
|
|
336
|
+
)
|
|
337
|
+
|
|
338
|
+
secrets = SecretManager(
|
|
339
|
+
service_name="my_app",
|
|
340
|
+
providers=[KeyringProvider(), DotEnvProvider(), EnvProvider()],
|
|
341
|
+
)
|
|
342
|
+
```
|
|
343
|
+
|
|
344
|
+
#### Cloud Secret Managers
|
|
345
|
+
|
|
346
|
+
The library supports transparent integration with AWS Secrets Manager and Google Secret Manager:
|
|
347
|
+
|
|
348
|
+
```python
|
|
349
|
+
from chutils import SecretManager
|
|
350
|
+
from chutils.secret_manager.providers import (
|
|
351
|
+
AWSSecretManagerProvider,
|
|
352
|
+
GCPSecretManagerProvider,
|
|
353
|
+
EnvProvider,
|
|
354
|
+
)
|
|
355
|
+
|
|
356
|
+
# Initialize cloud providers (requires installation of chutils[aws,gcp])
|
|
357
|
+
aws_provider = AWSSecretManagerProvider(region_name="us-east-1")
|
|
358
|
+
gcp_provider = GCPSecretManagerProvider(project_id="my-gcp-project")
|
|
359
|
+
|
|
360
|
+
# Create a SecretManager with the chain: AWS -> GCP -> Environment Variables.
|
|
361
|
+
# If AWS or GCP calls fail due to network/permissions or the secret is missing,
|
|
362
|
+
# SecretManager logs a warning and automatically falls back to EnvProvider.
|
|
363
|
+
secrets = SecretManager(
|
|
364
|
+
service_name="my_service", providers=[aws_provider, gcp_provider, EnvProvider()]
|
|
365
|
+
)
|
|
366
|
+
```
|
|
367
|
+
|
|
368
|
+
Install cloud dependencies:
|
|
369
|
+
|
|
370
|
+
```bash
|
|
371
|
+
pip install chutils[aws] # For AWS (boto3)
|
|
372
|
+
pip install chutils[gcp] # For GCP (google-cloud-secret-manager)
|
|
373
|
+
pip install chutils[all] # For all optional packages
|
|
374
|
+
```
|
|
375
|
+
|
|
376
|
+
#### Disabling Keyring (Optional)
|
|
377
|
+
|
|
378
|
+
In environments like Docker or CI/CD where `keyring` is unavailable, you can suppress warnings and skip the check:
|
|
379
|
+
|
|
380
|
+
- Set `CH_DISABLE_KEYRING_WARNING=true` in environment.
|
|
381
|
+
- Or add `disable_keyring: true` under `secrets` section in `config.yml`.
|
|
382
|
+
|
|
383
|
+
### 4. Safe Path Resolution
|
|
384
|
+
|
|
385
|
+
Safely resolve relative and absolute paths against a base directory to prevent directory traversal vulnerabilities:
|
|
386
|
+
|
|
387
|
+
```python
|
|
388
|
+
from chutils.fs import resolve_safe_path
|
|
389
|
+
from chutils.exceptions import PathTraversalError
|
|
390
|
+
|
|
391
|
+
try:
|
|
392
|
+
# Resolves path relative to the base directory and checks if it's safe
|
|
393
|
+
safe_path = resolve_safe_path("user_file.txt", base_dir="./sandbox")
|
|
394
|
+
print(f"Safe absolute path: {safe_path}")
|
|
395
|
+
except PathTraversalError as e:
|
|
396
|
+
print(f"Path traversal detected! Attempted: {e.context.get('attempted_path')}")
|
|
397
|
+
```
|
|
398
|
+
|
|
399
|
+
## API Overview
|
|
400
|
+
|
|
401
|
+
### Configuration (`chutils.config`)
|
|
402
|
+
|
|
403
|
+
- `get_config_value(section, key, fallback=None, required=False)` / `aget_config()`
|
|
404
|
+
- `get_config_int`, `get_config_boolean`, `get_config_list`, `get_config_path` (all support `fallback` and `required`
|
|
405
|
+
parameters)
|
|
406
|
+
- `save_config_value(section, key, value, notify=True)` / `asave_config_value()`
|
|
407
|
+
- Use `notify=False` to update the file without triggering Hot-Reload callbacks.
|
|
408
|
+
|
|
409
|
+
### Logging (`chutils.logger`)
|
|
410
|
+
|
|
411
|
+
- `setup_logger(name, log_level, log_file_name, rotation_type, compress, ...)`
|
|
412
|
+
- Levels: `logger.devdebug` (9), `logger.mediumdebug` (15), and all standard ones.
|
|
413
|
+
|
|
414
|
+
### Secret Management (`chutils.secret_manager`)
|
|
415
|
+
|
|
416
|
+
- `SecretManager(service_name, prefix)`
|
|
417
|
+
- `save_secret` / `asave_secret`
|
|
418
|
+
- `get_secret(key, fallback=None, required=False)` / `aget_secret(...)`
|
|
419
|
+
- `delete_secret` / `adelete_secret`
|
|
420
|
+
|
|
421
|
+
### Environment Manifest (`chutils.env`)
|
|
422
|
+
|
|
423
|
+
- `BaseEnvManifest`: Declarative specification of environment variables using Pydantic typing, automatic secret masking,
|
|
424
|
+
and `load()` classmethod.
|
|
425
|
+
|
|
426
|
+
### Data Validation (`chutils.validation`)
|
|
427
|
+
|
|
428
|
+
- `validate_data(model, data)`: Validates dictionaries or JSON strings against Pydantic models, raising
|
|
429
|
+
`ChutilsValidationError`.
|
|
430
|
+
- `@validate_call`: Automatically validates function arguments using Pydantic.
|
|
431
|
+
|
|
432
|
+
### Health Checking (`chutils.diagnostics`)
|
|
433
|
+
|
|
434
|
+
- `DiagnosticsManager`: Registers and аsynchronously executes system health checks with timeouts.
|
|
435
|
+
- Web Framework helpers: `get_fastapi_health_handler` and `get_flask_health_handler`.
|
|
436
|
+
|
|
437
|
+
### Decorators (`chutils.decorators`)
|
|
438
|
+
|
|
439
|
+
- `@log_function_details`: Logs arguments, execution time, and result (uses `DEVDEBUG` level).
|
|
440
|
+
- `@timeout(seconds, fallback)`: Limits function execution time. Supports sync/async and optional fallback.
|
|
441
|
+
- `@retry`: Automatically retries a function if it fails. Supports sync/async, backoff, jitter, and exception filtering.
|
|
442
|
+
- `@cli_command`: Turns any function into a standalone CLI script with automatic argument parsing.
|
|
443
|
+
|
|
444
|
+
### File System (`chutils.fs`)
|
|
445
|
+
|
|
446
|
+
- `resolve_safe_path(path, base_dir)`: Safely resolves path and checks for Path Traversal attempts.
|
|
447
|
+
- `ensure_dir(path)`: Ensures directory exists.
|
|
448
|
+
|
|
449
|
+
### Time & Dates (`chutils.time`)
|
|
450
|
+
|
|
451
|
+
- `utc_now()`: Returns a timezone-aware UTC datetime.
|
|
452
|
+
- `parse_datetime(value)`: Smart parsing of strings and timestamps into UTC.
|
|
453
|
+
- `humanize_timedelta(dt)`: Returns human-readable strings like "5 minutes ago" or "tomorrow".
|
|
454
|
+
|
|
455
|
+
### Example of @retry usage:
|
|
456
|
+
|
|
457
|
+
```python
|
|
458
|
+
from chutils.decorators import retry
|
|
459
|
+
|
|
460
|
+
|
|
461
|
+
@retry(retries=3, delay=1.0, backoff=2.0)
|
|
462
|
+
def fetch_data():
|
|
463
|
+
# Will be retried up to 3 times on any Exception
|
|
464
|
+
...
|
|
465
|
+
```
|
|
466
|
+
|
|
467
|
+
## Command Line Interface (CLI)
|
|
468
|
+
|
|
469
|
+
`chutils` includes a set of tools to speed up development and debugging.
|
|
470
|
+
|
|
471
|
+
### 1. Initialize Project
|
|
472
|
+
|
|
473
|
+
Quickly set up a new project with a default configuration and `.gitignore` rules:
|
|
474
|
+
|
|
475
|
+
```bash
|
|
476
|
+
# Interactive mode
|
|
477
|
+
chutils init
|
|
478
|
+
|
|
479
|
+
# Non-interactive mode (default values)
|
|
480
|
+
chutils init -y
|
|
481
|
+
```
|
|
482
|
+
|
|
483
|
+
### 2. Validate Configuration
|
|
484
|
+
|
|
485
|
+
Check if your configuration files match your Pydantic models:
|
|
486
|
+
|
|
487
|
+
```bash
|
|
488
|
+
# Automatically finds 'Settings' class in context.py or config.py
|
|
489
|
+
chutils validate
|
|
490
|
+
|
|
491
|
+
# Explicitly specify the model path
|
|
492
|
+
chutils validate --model src.settings:AppConfig
|
|
493
|
+
```
|
|
494
|
+
|
|
495
|
+
### 3. Debug Search Paths
|
|
496
|
+
|
|
497
|
+
See exactly where `chutils` is looking for configuration files:
|
|
498
|
+
|
|
499
|
+
```bash
|
|
500
|
+
# Human-readable output
|
|
501
|
+
chutils show-paths
|
|
502
|
+
|
|
503
|
+
# JSON output for automation
|
|
504
|
+
chutils show-paths --json
|
|
505
|
+
```
|
|
506
|
+
|
|
507
|
+
### 4. Manage Secrets
|
|
508
|
+
|
|
509
|
+
Manage your system keyring secrets directly from the terminal:
|
|
510
|
+
|
|
511
|
+
```bash
|
|
512
|
+
# Set a secret
|
|
513
|
+
chutils secrets set API_KEY "your-secret-value" --service my_app
|
|
514
|
+
|
|
515
|
+
# Delete a secret
|
|
516
|
+
chutils secrets delete API_KEY --service my_app
|
|
517
|
+
```
|
|
518
|
+
|
|
519
|
+
### 5. Debug Configuration
|
|
520
|
+
|
|
521
|
+
Trace exactly where each configuration value comes from:
|
|
522
|
+
|
|
523
|
+
```bash
|
|
524
|
+
chutils config debug
|
|
525
|
+
```
|
|
526
|
+
|
|
527
|
+
### 6. AI-Readiness Linter
|
|
528
|
+
|
|
529
|
+
Perform a static audit of your codebase to ensure it is optimized for AI developers and agents:
|
|
530
|
+
|
|
531
|
+
```bash
|
|
532
|
+
# Run linter on the current project
|
|
533
|
+
chutils dev ai-lint
|
|
534
|
+
|
|
535
|
+
# Run linter in strict mode with ignored paths
|
|
536
|
+
chutils dev ai-lint --strict --ignore "temp/,build/"
|
|
537
|
+
```
|
|
538
|
+
|
|
539
|
+
See [docs/ai_lint.md](docs/ai_lint.md) for more details.
|
|
540
|
+
|
|
541
|
+
### 7. Environment Variables Synchronization
|
|
542
|
+
|
|
543
|
+
Keep `.env` and `.env.example` files in sync with format preservation, comments, and values masking:
|
|
544
|
+
|
|
545
|
+
```bash
|
|
546
|
+
# Compare .env and .env.example keys without making changes
|
|
547
|
+
chutils dev sync-env --dry-run
|
|
548
|
+
|
|
549
|
+
# Synchronize files automatically
|
|
550
|
+
chutils dev sync-env --yes
|
|
551
|
+
|
|
552
|
+
# Specify custom paths
|
|
553
|
+
chutils dev sync-env --env-path .env.dev --example-path .env.dev.example
|
|
554
|
+
```
|
|
555
|
+
|
|
556
|
+
## License
|
|
557
|
+
|
|
558
|
+
The project is distributed under the MIT License.
|