Registry / type-stubs / mypy-boto3-ecr-public

mypy-boto3-ecr-public

JSON →
library1.43.0pypypi✓ verified 22d ago

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.

pip install mypy-boto3-ecr-public
INSTALL
IMPORT
SIG · MYPY-BOTO3-ECR-PUB
M
mypy-boto3-ecr-public
type-stubspythonv1.43.0
Install
3.4s avg
Import
Disk
18MB
Pass rate
10/ 10
Env Coverage10 / 10
glibc
3.93.13
musl
3.93.13
Install & Compatibility
Where this runs
tested against v1.43.0 · pip install
no network on importno background threads
Install × environment matrix
Each cell = how many times install + import succeeded across repeated harness runs. Partial = flaky.
glibc = Debian/Ubuntu slim · musl = Alpine Linux
musl
py 3.103.910 runs
installs and imports cleanly · install 0.0s · import 0.000s · 19.7MB
glibc
py 3.103.910 runs
installs and imports cleanly · install 3.4s · import 0.000s · 20MB
18MB installed
● package 18MB
Code
Verified usage

Verified import paths — ran on the pinned version, not inferred.

ECRPublicClient
from mypy_boto3_ecr_public.client import ECRPublicClient
from mypy_boto3_ecr_public import ECRPublicClient
ECRPublicServiceResource
from mypy_boto3_ecr_public.service_resource import ECRPublicServiceResource
ServiceResource
from mypy_boto3_ecr_public.service_resource import ServiceResource

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.

import boto3 from mypy_boto3_ecr_public.client import ECRPublicClient from typing import TYPE_CHECKING if TYPE_CHECKING: # Only import for type checking, avoid runtime dependency if not strictly needed # Or, rely on the installed mypy-boto3-ecr-public for runtime type discovery pass def list_public_repositories(region: str = "us-east-1") -> None: client: ECRPublicClient = boto3.client("ecr-public", region_name=region) try: response = client.describe_repositories() print(f"Public ECR Repositories in {region}:") for repo in response.get("repositories", []): print(f" - {repo['repositoryName']} (URI: {repo['repositoryUri']})") except Exception as e: print(f"Error listing repositories: {e}") if __name__ == "__main__": # Note: AWS credentials (e.g., via AWS_ACCESS_KEY_ID, AWS_SECRET_ACCESS_KEY, AWS_REGION) # or ~/.aws/credentials are required for boto3 to function. list_public_repositories()
Debug
Known issues
breakingSupport for Python 3.8 and older versions has been removed. The library now requires Python 3.9 or newer.
fix
Upgrade your Python environment to 3.9 or newer.
affects: mypy-boto3-builder 8.12.0 and later (which generates mypy-boto3-ecr-public 1.42.3+)
breakingThe package structure has migrated to PEP 561 compliance. While this generally improves compatibility, ensure your type checker is up-to-date and configured correctly.
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.
affects: mypy-boto3-builder 8.12.0 and later
breakingTypeDef naming conventions for packed method arguments and conflicting names have changed. For example, `CreateDistributionRequestRequestTypeDef` might become `CreateDistributionRequestTypeDef`, and `Extra` postfixes were moved.
fix
Review and update `TypedDict` imports and usage in your code if you were relying on specific generated TypeDef names.
affects: mypy-boto3-builder 8.9.0 and later
gotchaThis 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.
fix
Ensure `boto3` is installed in your environment alongside `mypy-boto3-ecr-public`.
affects: All versions
gotchaPyCharm 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.
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.
affects: All versions with PyCharm
Upgrade
Version history
1.43.0latest on PyPI · released Apr 29, 2026
Audit
Dependencies
boto3optionalThe runtime library for which these are type stubs. Required for actual execution of AWS calls.
boto3-stubs-corerequiredCore components for boto3 type stubs, installed automatically with mypy-boto3-ecr-public.
Agent activity
22 hits · last 30 days
node
18
OpenAI (training)
2
Resources
mypy-boto3-ecr-public — pip install mypy-boto3-ecr-public · libregistry