Registry /
type-stubs / mypy-boto3-serverlessrepo
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
muslpy 3.10–3.910 runs
installs and imports cleanly · install 0.0s · import 0.594s · 82.9MB
glibcpy 3.10–3.910 runs
installs and imports cleanly · install 3.8s · import 0.548s · 81MB
80MB installed
● package 80MB
Code
Verified usage
Verified import paths — ran on the pinned version, not inferred.
ServerlessApplicationRepositoryClient
✓ from mypy_boto3_serverlessrepo.client import ServerlessApplicationRepositoryClient
CreateApplicationRequestTypeDef
✓ from mypy_boto3_serverlessrepo.type_defs import CreateApplicationRequestTypeDef
✗ from mypy_boto3_serverlessrepo.type_defs import CreateApplicationRequestRequestTypeDef
TypeDef naming conventions changed in `mypy-boto3-builder` 8.9.0, removing redundant 'Request' suffixes.
Demonstrates how to obtain a ServerlessApplicationRepository client with type annotations and use a TypedDict for request parameters. Explicit type annotations are recommended for full IDE support. Note that this example will not fully execute a `create_application` call without a complete application template body.
import boto3
from typing import TYPE_CHECKING
from mypy_boto3_serverlessrepo.client import ServerlessApplicationRepositoryClient
from mypy_boto3_serverlessrepo.type_defs import CreateApplicationRequestTypeDef
# Boto3 client without type hints (mypy/IDE might infer, but explicit is better)
client_untyped = boto3.client('serverlessrepo')
# Boto3 client with explicit type hints
if TYPE_CHECKING:
client: ServerlessApplicationRepositoryClient = boto3.client('serverlessrepo')
else:
client = boto3.client('serverlessrepo')
# Example using a TypedDict for request parameters
application_params: CreateApplicationRequestTypeDef = {
'Author': 'MyCompany',
'Description': 'A sample serverless application.',
'Name': 'MySampleApp',
'HomePageUrl': 'https://example.com/myapp',
'Labels': ['python', 'example'],
'SourceCodeUrl': 'https://github.com/mycompany/myapp'
}
try:
# In a real scenario, you'd add necessary fields like 'AppTemplateBody' or 'SemanticVersion'
# For a quickstart, we'll just demonstrate the client type checking.
# This call would typically fail without required fields or actual template body.
# response = client.create_application(**application_params)
print("Client type checking is active.")
print(f"Expected return type for list_applications: {{client.list_applications.__annotations__.get('return')}}")
except Exception as e:
print(f"An error occurred (expected for incomplete example): {e}")
Debug
Known issues
breakingSupport for Python 3.8 was removed in `mypy-boto3-builder` version 8.12.0. Users on Python 3.8 must use older versions or upgrade Python.fixUpgrade to Python 3.9 or higher. If unable, pin `mypy-boto3-serverlessrepo` to a version generated by `mypy-boto3-builder <8.12.0`.
affects: mypy-boto3-builder >=8.12.0
breakingThe `mypy-boto3` project (which generates this stub package) migrated to PEP 561-compliant package structure. This might require updates to import paths for some internal or advanced usages, though standard client/type_def imports remain consistent.fixEnsure your environment is set up to correctly resolve PEP 561 stub packages. Typically, this is handled automatically by tools like `pip` and `mypy`.
affects: mypy-boto3-builder >=8.12.0
breakingTypedDict naming conventions were updated in `mypy-boto3-builder` 8.9.0. Many `RequestRequestTypeDef` and `ExtraRequestTypeDef` names were shortened (e.g., `CreateApplicationRequestRequestTypeDef` became `CreateApplicationRequestTypeDef`).fixReview and update TypedDict import paths and variable annotations in your code to reflect the new, shorter naming conventions.
affects: mypy-boto3-builder >=8.9.0
gotchaThis library provides *only* type annotations (stubs) for `boto3`. You must install the `boto3` library separately for your application to function at runtime.fixEnsure `boto3` is included in your project's `install_requires` or `requirements.txt` (e.g., `pip install boto3`).
affects: All
gotchaFor optimal IDE autocomplete and type checking, especially in VSCode and PyCharm, it is highly recommended to use explicit type annotations for `boto3.client()` and `boto3.session.client()` calls.fixExplicitly annotate your client variables, e.g., `client: ServerlessApplicationRepositoryClient = boto3.client('serverlessrepo')`. affects: All
gotchaWhen using `Pylint`, type checking dependencies might cause false positives for undefined variables if not handled carefully.fixWrap type-dependent imports and assignments within a `if TYPE_CHECKING:` block, setting runtime variables to `object` in the `else` clause.
affects: All
Upgrade
Version history
1.43.0latest on PyPI · released Apr 29, 2026
Audit
Dependencies
boto3requiredRuntime dependency for AWS SDK functionality. mypy-boto3-serverlessrepo only provides type stubs.
mypyoptionalRequired for static type checking to utilize the provided type annotations.
typing-extensionsoptionalMay be required for full type compatibility on older Python versions, though builder handles its versioning.