{"id":3359,"library":"mypy-boto3-ecr-public","title":"mypy-boto3-ecr-public Type Annotations","description":"mypy-boto3-ecr-public provides static type annotations for the boto3 ECR Public service. It's part of the `boto3-stubs` project, generated by `mypy-boto3-builder` version 8.12.0, ensuring compatibility with boto3 1.42.3. The library enables robust type checking with tools like mypy and pyright, and enhances IDE features such as auto-completion and type hints for AWS service clients. It is actively maintained with releases frequently synchronized with boto3 updates.","status":"active","version":"1.42.3","language":"python","source_language":"en","source_url":"https://github.com/youtype/mypy_boto3_builder","tags":["aws","boto3","mypy","typing","stubs","ecr-public","type-annotations"],"install":[{"cmd":"pip install mypy-boto3-ecr-public","lang":"bash","label":"Install standalone package"},{"cmd":"pip install 'boto3-stubs[ecr-public]'","lang":"bash","label":"Install as part of boto3-stubs"}],"dependencies":[{"reason":"The runtime library for which these are type stubs. Required for actual execution of AWS calls.","package":"boto3","optional":true},{"reason":"Core components for boto3 type stubs, installed automatically with mypy-boto3-ecr-public.","package":"boto3-stubs-core","optional":false}],"imports":[{"wrong":"from mypy_boto3_ecr_public import ECRPublicClient","symbol":"ECRPublicClient","correct":"from mypy_boto3_ecr_public.client import ECRPublicClient"},{"symbol":"ECRPublicServiceResource","correct":"from mypy_boto3_ecr_public.service_resource import ECRPublicServiceResource"},{"symbol":"ServiceResource","correct":"from mypy_boto3_ecr_public.service_resource import ServiceResource"}],"quickstart":{"code":"import boto3\nfrom mypy_boto3_ecr_public.client import ECRPublicClient\nfrom typing import TYPE_CHECKING\n\nif TYPE_CHECKING:\n    # Only import for type checking, avoid runtime dependency if not strictly needed\n    # Or, rely on the installed mypy-boto3-ecr-public for runtime type discovery\n    pass\n\ndef list_public_repositories(region: str = \"us-east-1\") -> None:\n    client: ECRPublicClient = boto3.client(\"ecr-public\", region_name=region)\n    try:\n        response = client.describe_repositories()\n        print(f\"Public ECR Repositories in {region}:\")\n        for repo in response.get(\"repositories\", []):\n            print(f\"  - {repo['repositoryName']} (URI: {repo['repositoryUri']})\")\n    except Exception as e:\n        print(f\"Error listing repositories: {e}\")\n\nif __name__ == \"__main__\":\n    # Note: AWS credentials (e.g., via AWS_ACCESS_KEY_ID, AWS_SECRET_ACCESS_KEY, AWS_REGION)\n    # or ~/.aws/credentials are required for boto3 to function.\n    list_public_repositories()\n","lang":"python","description":"This quickstart demonstrates how to use `mypy-boto3-ecr-public` to get type annotations for the ECR Public client and list public repositories. It shows explicit type hinting for the boto3 client."},"warnings":[{"fix":"Upgrade your Python environment to 3.9 or newer.","message":"Support for Python 3.8 and older versions has been removed. The library now requires Python 3.9 or newer.","severity":"breaking","affected_versions":"mypy-boto3-builder 8.12.0 and later (which generates mypy-boto3-ecr-public 1.42.3+)"},{"fix":"Update your type checker (e.g., mypy, pyright) to the latest version and verify your configuration. No direct code change is typically required unless you had custom type-stub handling.","message":"The package structure has migrated to PEP 561 compliance. While this generally improves compatibility, ensure your type checker is up-to-date and configured correctly.","severity":"breaking","affected_versions":"mypy-boto3-builder 8.12.0 and later"},{"fix":"Review and update `TypedDict` imports and usage in your code if you were relying on specific generated TypeDef names.","message":"TypeDef naming conventions for packed method arguments and conflicting names have changed. For example, `CreateDistributionRequestRequestTypeDef` might become `CreateDistributionRequestTypeDef`, and `Extra` postfixes were moved.","severity":"breaking","affected_versions":"mypy-boto3-builder 8.9.0 and later"},{"fix":"Ensure `boto3` is installed in your environment alongside `mypy-boto3-ecr-public`.","message":"This library provides *type stubs* only. You must also install `boto3` (e.g., `pip install boto3`) for your code to run at runtime and interact with AWS.","severity":"gotcha","affected_versions":"All versions"},{"fix":"Consider `pip install boto3-stubs-lite[ecr-public]` for a lighter version, or configure PyCharm to use external type checkers like mypy/pyright instead of its built-in one for this library.","message":"PyCharm users might experience slow performance or high CPU usage due to Literal overloads. The project maintainers recommend using `boto3-stubs-lite` or disabling PyCharm's type checker in such cases.","severity":"gotcha","affected_versions":"All versions with PyCharm"}],"env_vars":null,"search_vec":"'1.42.3':44 '8.12.0':39 'activ':75 'annot':7,16,94 'auto':64 'auto-complet':63 'aw':70,84 'boto3':3,10,19,29,36,43,82,85 'boto3-stubs':28 'builder':37 'check':50 'client':72 'compat':41 'complet':65 'ecr':4,11,20,90 'ecr-publ':89 'enabl':47 'enhanc':58 'ensur':40 'featur':60 'frequent':79 'generat':32 'hint':68 'ide':59 'librari':46 'like':53 'maintain':76 'mypi':2,9,35,54,86 'mypy-boto3-builder':34 'mypy-boto3-ecr-public':1,8 'part':25 'project':31 'provid':13 'public':5,12,21,91 'pyright':56 'releas':78 'robust':48 'servic':22,71 'static':14 'stub':30,88 'synchron':80 'tool':52 'type':6,15,49,67,87,93 'type-annot':92 'updat':83 'version':38","created_at":"2026-04-11T12:37:10.159834+00:00","updated_at":"2026-04-16T16:55:00.472567+00:00","problems":{"verify_error":"Traceback (most recent call last):\n  File \"<string>\", line 1, in <module>\n  File \"/tmp/tmp3bdntbo1/venv/lib/python3.12/site-packages/mypy_boto3_ecr_public/__init__.py\", line 31, in <module>\n    from .client import ECRPublicClient\n  File \"/tmp/tmp3bdntbo1/venv/lib/python3.12/site-packages/mypy_boto3_"},"ecosystem":"pypi","meta_description":null,"install_score":null,"quickstart_score":null,"quickstart_tag":null,"pypi_latest":"1.43.0","cli_name":"","cli_version":null,"type":"library","homepage":null,"github":"https://github.com/youtype/mypy_boto3_builder","docs":"https://youtype.github.io/boto3_stubs_docs/mypy_boto3_ecr_public/","changelog":null,"pypi":"https://pypi.org/project/mypy-boto3-ecr-public/","npm":null,"openapi_spec":null,"status_page":null,"smithery":null,"categories":["type-stubs","aws"],"base_url":null,"auth_type":null,"provenance":{"verified_status":"passing","verified_at":"2026-07-03","last_verified":"2026-08-29","next_check":"2026-07-10","install_tag":null}}