{"id":3578,"library":"mypy-boto3-evidently","title":"mypy-boto3-evidently Type Annotations","description":"mypy-boto3-evidently provides static type annotations for the `boto3` AWS CloudWatch Evidently service client, enhancing development with type-checking capabilities. It is generated by the `mypy-boto3-builder` project and is currently at version 1.42.35. Releases are frequent, typically in sync with `boto3` updates and `mypy-boto3-builder` enhancements.","status":"active","version":"1.42.35","language":"en","source_language":"en","source_url":"https://github.com/youtype/mypy_boto3_builder","tags":["boto3","aws","typing","mypy","stubs","type-annotations","evidently","cloudwatch-evidently"],"install":[{"cmd":"pip install boto3 mypy-boto3-evidently","lang":"bash","label":"Install with boto3"}],"dependencies":[{"reason":"Provides the AWS SDK client for which these stubs offer type hints.","package":"boto3","optional":false},{"reason":"Used for compatibility with older Python versions requiring backported typing features, though dynamically managed.","package":"typing-extensions","optional":true}],"imports":[{"symbol":"EvidentlyClient","correct":"from mypy_boto3_evidently import EvidentlyClient"},{"symbol":"Service Resource types (e.g., 'ExperimentTypeDef')","correct":"from mypy_boto3_evidently.type_defs import ExperimentTypeDef"}],"quickstart":{"code":"import boto3\nfrom mypy_boto3_evidently import EvidentlyClient\nfrom mypy_boto3_evidently.type_defs import CreateExperimentResponseTypeDef\n\n# Initialize a boto3 client (ensure boto3 is installed and configured)\nclient: EvidentlyClient = boto3.client(\"evidently\")\n\n# Example usage with type hints\ntry:\n    # This call is type-checked against the EvidentlyClient interface\n    response: CreateExperimentResponseTypeDef = client.create_experiment(\n        name=\"MyFeatureExperiment\",\n        project=\"MyProject\",\n        # Add other required parameters here, for example:\n        # treatments=[{ 'feature': 'feature-name', 'treatmentName': 'control' }],\n        # onlineAbConfig={ 'treatmentWeights': {'control': 100} }\n    )\n    print(f\"Experiment created: {response.get('arn')}\")\nexcept client.exceptions.ConflictException:\n    print(\"Experiment already exists.\")\nexcept Exception as e:\n    print(f\"An error occurred: {e}\")","lang":"python","description":"This example demonstrates how to import and use `EvidentlyClient` to type-hint your `boto3` CloudWatch Evidently client. It allows your type checker (like MyPy) to validate method calls and parameter types, catching errors before runtime. It also shows importing a specific `TypeDef` for response annotations."},"warnings":[{"fix":"Upgrade your Python environment to 3.9 or newer. The `requires_python` field in PyPI is `>=3.9`.","message":"Support for Python 3.8 was removed in `mypy-boto3-builder` version 8.12.0, affecting all generated `mypy-boto3-*` packages, including `mypy-boto3-evidently`.","severity":"breaking","affected_versions":">=8.12.0 of mypy-boto3-builder (and derived mypy-boto3-evidently versions)"},{"fix":"Review and update imports and references to specific `TypeDef` names in your codebase if you relied on the previous naming convention.","message":"TypeDef naming conventions were changed in `mypy-boto3-builder` version 8.9.0. Specifically, argument TypeDefs use shorter names (e.g., `CreateDistributionRequestRequestTypeDef` -> `CreateDistributionRequestTypeDef`), and conflicting TypeDef `Extra` postfixes were moved (e.g., `CreateDistributionExtraRequestTypeDef` -> `CreateDistributionRequestExtraTypeDef`).","severity":"breaking","affected_versions":">=8.9.0 of mypy-boto3-builder (and derived mypy-boto3-evidently versions)"},{"fix":"Ensure your type checker (e.g., MyPy) is up-to-date and correctly configured to find PEP 561 packages. Most modern setups should handle this automatically.","message":"The `mypy-boto3` ecosystem migrated to PEP 561 compliant packages in `mypy-boto3-builder` version 8.12.0. While generally transparent, this changes how type checkers discover and use the stubs.","severity":"gotcha","affected_versions":">=8.12.0 of mypy-boto3-builder (and derived mypy-boto3-evidently versions)"},{"fix":"For specific services, prefer installing `mypy-boto3-SERVICENAME` directly (e.g., `pip install mypy-boto3-evidently`) alongside `boto3`. Only use `boto3-stubs` if you explicitly need types for *all* AWS services at once, which can increase dependency footprint.","message":"The `mypy-boto3` project distinguishes between general `boto3-stubs` (the full collection, formerly `mypy-boto3`) and individual service stubs like `mypy-boto3-evidently`. From `mypy-boto3-builder` 8.9.0, 'Legacy `mypy-boto3` moved to a separate product and is no longer generated along with `boto3-stubs`'.","severity":"gotcha","affected_versions":">=8.9.0 of mypy-boto3-builder (and derived mypy-boto3-evidently versions)"}],"env_vars":null,"last_verified":"2026-04-11T00:00:00.000Z","next_check":"2026-07-10T00:00:00.000Z"}