{"id":2129,"library":"mypy-boto3-codeartifact","title":"mypy-boto3-codeartifact Type Stubs","description":"mypy-boto3-codeartifact provides type annotations for the `boto3` AWS CodeArtifact service, enhancing type checking for `boto3` users. It's automatically generated by `mypy-boto3-builder`. The current version is 1.42.3, and it follows a frequent release cadence, often mirroring `boto3` updates and `mypy-boto3-builder`'s own release schedule.","status":"active","version":"1.42.3","language":"en","source_language":"en","source_url":"https://github.com/youtype/mypy_boto3_builder","tags":["boto3","aws","mypy","type-hints","stubs","codeartifact","typing"],"install":[{"cmd":"pip install boto3 mypy-boto3-codeartifact","lang":"bash","label":"Install with boto3"}],"dependencies":[{"reason":"This package provides type stubs for boto3; boto3 itself must be installed to use it.","package":"boto3","optional":false}],"imports":[{"note":"For explicit type hints for the CodeArtifact client.","symbol":"CodeArtifactClient","correct":"from mypy_boto3_codeartifact.client import CodeArtifactClient"},{"note":"Access to all top-level types provided by the stub package.","symbol":"Service Resource, Paginator, Waiter","correct":"from mypy_boto3_codeartifact import CodeArtifactClient, CodeArtifactServiceResource, Paginator, Waiter"}],"quickstart":{"code":"import boto3\nfrom mypy_boto3_codeartifact.client import CodeArtifactClient\nfrom typing import TYPE_CHECKING\n\n# For runtime, you use boto3 as usual\nclient = boto3.client(\"codeartifact\")\n\n# For type checking, mypy will infer types based on the stubs\n# You can also explicitly annotate:\nif TYPE_CHECKING:\n    typed_client: CodeArtifactClient = boto3.client(\"codeartifact\")\n    # Example of a typed call (won't run without AWS credentials & region)\n    # try:\n    #     domain_response = typed_client.list_domains()\n    #     print(domain_response['domains'][0]['name'])\n    # except Exception as e:\n    #     print(f\"Could not list domains: {e}\")\n\nprint(\"CodeArtifact client initialized. Type checking will use mypy-boto3-codeartifact stubs.\")","lang":"python","description":"This quickstart demonstrates how to use `mypy-boto3-codeartifact` with `boto3`. You typically import `boto3` as usual, and `mypy` automatically picks up the provided type stubs. For explicit type annotations, you can import specific types like `CodeArtifactClient` from the stub package."},"warnings":[{"fix":"Upgrade your Python environment to 3.9 or newer to continue receiving type stubs for `boto3` services.","message":"Support for Python 3.8 was removed in `mypy-boto3-builder` version 8.12.0, affecting all generated stub packages including `mypy-boto3-codeartifact`. Users on Python 3.8 will not receive type stubs for versions generated with this builder or newer.","severity":"breaking","affected_versions":">=1.42.3 (packages generated by builder >=8.12.0)"},{"fix":"Review and update explicit `TypedDict` annotations in your codebase if you were relying on the older naming patterns.","message":"Type Definition naming conventions changed in `mypy-boto3-builder` version 8.9.0. This might affect explicit type hints using `TypeDef` suffixes, for example, `CreateDistributionRequestRequestTypeDef` became `CreateDistributionRequestTypeDef`.","severity":"breaking","affected_versions":">=1.39.0 (packages generated by builder >=8.9.0)"},{"fix":"Ensure both `boto3` and `mypy-boto3-codeartifact` are installed via `pip install boto3 mypy-boto3-codeartifact`.","message":"`mypy-boto3-codeartifact` only provides type stubs, not the actual `boto3` library. You must install `boto3` separately for your code to run.","severity":"gotcha","affected_versions":"All versions"},{"fix":"When upgrading `boto3`, also upgrade `mypy-boto3-codeartifact` to a matching version (e.g., `pip install boto3==X.Y.Z mypy-boto3-codeartifact==X.Y.Z`).","message":"For best compatibility, the version of `mypy-boto3-codeartifact` should ideally match the major and minor version of your installed `boto3` library.","severity":"gotcha","affected_versions":"All versions"},{"fix":"Update your type checker (e.g., `mypy`) to its latest version. No direct code changes are typically needed, but be aware of how your environment resolves type stubs.","message":"The builder migrated to PEP 561 compliant packages in version 8.12.0. While this improves type checker compatibility, ensure your type checker is up-to-date and configured correctly to pick up the stubs.","severity":"gotcha","affected_versions":">=1.42.3 (packages generated by builder >=8.12.0)"}],"env_vars":null,"last_verified":"2026-04-09T00:00:00.000Z","next_check":"2026-07-08T00:00:00.000Z"}