Install & Compatibility
Where this runs
tested against v1.43.56 · 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
muslpy 3.10–3.95 runs
installs and imports cleanly · install 0.0s · import 0.588s · 51.9MB
glibcpy 3.10–3.95 runs
installs and imports cleanly · install 3.7s · import 0.544s · 52MB
50MB installed
● package 50MB
Code
Verified usage
Verified import paths — ran on the pinned version, not inferred.
ArtifactClient
✓ from mypy_boto3_artifact.client import ArtifactClient
ReportSummaryTypeDef
✓ from mypy_boto3_artifact.type_defs import ReportSummaryTypeDef
This quickstart demonstrates how to use `mypy-boto3-artifact` type stubs with `boto3` to interact with the AWS Artifact service, specifically listing available reports. It leverages type hints for compile-time validation of client methods and response structures.
import boto3
from mypy_boto3_artifact.client import ArtifactClient
from mypy_boto3_artifact.type_defs import ReportSummaryTypeDef
import os # Used to hint at env vars for auth, though boto3 handles it implicitly
def list_artifact_reports() -> list[ReportSummaryTypeDef]:
# boto3 automatically picks up credentials from environment variables (AWS_ACCESS_KEY_ID, etc.),
# ~/.aws/credentials, or IAM roles.
client: ArtifactClient = boto3.client("artifact")
response = client.list_reports()
return response.get("reports", [])
if __name__ == "__main__":
# For a real application, ensure AWS credentials are configured.
# For example, by setting AWS_ACCESS_KEY_ID and AWS_SECRET_ACCESS_KEY
# in your environment.
print("Attempting to list AWS Artifact reports...")
try:
reports = list_artifact_reports()
if reports:
print(f"Found {len(reports)} artifact reports:")
# Print first 3 reports for brevity
for report in reports[:3]:
print(f" - Name: {report.get('reportName', 'N/A')}, ID: {report.get('reportId', 'N/A')}")
else:
print("No AWS Artifact reports found or access denied.")
except Exception as e:
print(f"Error listing reports: {e}")
print("Please ensure you have valid AWS credentials and appropriate permissions for the 'artifact' service.")
Debug
Known issues
breakingStarting with `mypy-boto3-builder` version 8.12.0, Python 3.8 support has been removed from all generated stub packages, including `mypy-boto3-artifact`. Ensure your environment uses Python 3.9 or newer.fixUpgrade your Python interpreter to version 3.9 or higher.
affects: >=8.12.0 (builder), >=1.42.0 (artifact)
breakingIn `mypy-boto3-builder` version 8.9.0, there were breaking changes to how TypeDef names are generated. TypeDefs for packed method arguments use shorter names (e.g., `CreateDistributionRequestRequestTypeDef` -> `CreateDistributionRequestTypeDef`), and conflicting `Extra` postfixes were moved (`CreateDistributionExtraRequestTypeDef` -> `CreateDistributionRequestExtraTypeDef`). Your existing type hint code might require updates.fixReview your code for TypeDef names, especially those for request parameters or with `Extra` suffixes, and update them according to the new naming conventions.
affects: >=8.9.0 (builder)
gotchaSince `mypy-boto3-builder` version 8.12.0, packages have migrated to PEP 561. This means stub packages like `mypy-boto3-artifact` are installed alongside the runtime library (`boto3`) and do not replace it. MyPy automatically discovers these stubs. You should install both `boto3` and the specific `mypy-boto3-SERVICE_NAME` package.fixAlways install both `boto3` and the corresponding `mypy-boto3-SERVICE_NAME` stub package. For example: `pip install boto3 mypy-boto3-artifact`.
affects: >=8.12.0 (builder)
gotcha`mypy-boto3` uses a separate package for each AWS service. If you need type hints for multiple services (e.g., S3 and Artifact), you must install each corresponding stub package (e.g., `mypy-boto3-s3` and `mypy-boto3-artifact`). There is no single `mypy-boto3` package that includes all service stubs.fixInstall `mypy-boto3-SERVICE_NAME` for each AWS service you intend to use type hints with.
affects: All versions
Upgrade
Version history
1.43.56latest on PyPI · released Jul 24, 2026
Audit
Dependencies
boto3requiredRequired at runtime; this package provides only type stubs for boto3's Artifact service.
mypyoptionalNeeded to perform static type checking, which is the primary purpose of this library.