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