Type annotations for boto3 SSM 1.35.67 service generated with mypy-boto3-builder 8.3.1
Project description
mypy-boto3-ssm
Type annotations for boto3 SSM 1.35.67 compatible with VSCode, PyCharm, Emacs, Sublime Text, mypy, pyright and other tools.
Generated by mypy-boto3-builder 8.3.1.
More information can be found on boto3-stubs page and in mypy-boto3-ssm docs.
See how it helps you find and fix potential bugs:
- mypy-boto3-ssm
How to install
VSCode extension
Add
AWS Boto3
extension to your VSCode and run AWS boto3: Quick Start
command.
Click Modify
and select boto3 common
and SSM
.
From PyPI with pip
Install boto3-stubs
for SSM
service.
# install with boto3 type annotations
python -m pip install 'boto3-stubs[ssm]'
# Lite version does not provide session.client/resource overloads
# it is more RAM-friendly, but requires explicit type annotations
python -m pip install 'boto3-stubs-lite[ssm]'
# standalone installation
python -m pip install mypy-boto3-ssm
How to uninstall
python -m pip uninstall -y mypy-boto3-ssm
Usage
VSCode
- Install Python extension
- Install Pylance extension
- Set
Pylance
as your Python Language Server - Install
boto3-stubs[ssm]
in your environment:
python -m pip install 'boto3-stubs[ssm]'
Both type checking and code completion should now work. No explicit type
annotations required, write your boto3
code as usual.
PyCharm
⚠️ Due to slow PyCharm performance on
Literal
overloads (issue PY-40997), it is recommended to use boto3-stubs-lite until the issue is resolved.
⚠️ If you experience slow performance and high CPU usage, try to disable
PyCharm
type checker and use mypy or pyright instead.
⚠️ To continue using
PyCharm
type checker, you can try to replaceboto3-stubs
with boto3-stubs-lite:
pip uninstall boto3-stubs
pip install boto3-stubs-lite
Install boto3-stubs[ssm]
in your environment:
python -m pip install 'boto3-stubs[ssm]'
Both type checking and code completion should now work.
Emacs
- Install
boto3-stubs
with services you use in your environment:
python -m pip install 'boto3-stubs[ssm]'
- Install use-package, lsp, company and flycheck packages
- Install lsp-pyright package
(use-package lsp-pyright
:ensure t
:hook (python-mode . (lambda ()
(require 'lsp-pyright)
(lsp))) ; or lsp-deferred
:init (when (executable-find "python3")
(setq lsp-pyright-python-executable-cmd "python3"))
)
- Make sure emacs uses the environment where you have installed
boto3-stubs
Type checking should now work. No explicit type annotations required, write
your boto3
code as usual.
Sublime Text
- Install
boto3-stubs[ssm]
with services you use in your environment:
python -m pip install 'boto3-stubs[ssm]'
- Install LSP-pyright package
Type checking should now work. No explicit type annotations required, write
your boto3
code as usual.
Other IDEs
Not tested, but as long as your IDE supports mypy
or pyright
, everything
should work.
mypy
- Install
mypy
:python -m pip install mypy
- Install
boto3-stubs[ssm]
in your environment:
python -m pip install 'boto3-stubs[ssm]'
Type checking should now work. No explicit type annotations required, write
your boto3
code as usual.
pyright
- Install
pyright
:npm i -g pyright
- Install
boto3-stubs[ssm]
in your environment:
python -m pip install 'boto3-stubs[ssm]'
Optionally, you can install boto3-stubs
to typings
directory.
Type checking should now work. No explicit type annotations required, write
your boto3
code as usual.
Explicit type annotations
Client annotations
SSMClient
provides annotations for boto3.client("ssm")
.
from boto3.session import Session
from mypy_boto3_ssm import SSMClient
client: SSMClient = Session().client("ssm")
# now client usage is checked by mypy and IDE should provide code completion
Paginators annotations
mypy_boto3_ssm.paginator
module contains type annotations for all paginators.
from boto3.session import Session
from mypy_boto3_ssm import SSMClient
from mypy_boto3_ssm.paginator import (
DescribeActivationsPaginator,
DescribeAssociationExecutionTargetsPaginator,
DescribeAssociationExecutionsPaginator,
DescribeAutomationExecutionsPaginator,
DescribeAutomationStepExecutionsPaginator,
DescribeAvailablePatchesPaginator,
DescribeEffectiveInstanceAssociationsPaginator,
DescribeEffectivePatchesForPatchBaselinePaginator,
DescribeInstanceAssociationsStatusPaginator,
DescribeInstanceInformationPaginator,
DescribeInstancePatchStatesForPatchGroupPaginator,
DescribeInstancePatchStatesPaginator,
DescribeInstancePatchesPaginator,
DescribeInstancePropertiesPaginator,
DescribeInventoryDeletionsPaginator,
DescribeMaintenanceWindowExecutionTaskInvocationsPaginator,
DescribeMaintenanceWindowExecutionTasksPaginator,
DescribeMaintenanceWindowExecutionsPaginator,
DescribeMaintenanceWindowSchedulePaginator,
DescribeMaintenanceWindowTargetsPaginator,
DescribeMaintenanceWindowTasksPaginator,
DescribeMaintenanceWindowsForTargetPaginator,
DescribeMaintenanceWindowsPaginator,
DescribeOpsItemsPaginator,
DescribeParametersPaginator,
DescribePatchBaselinesPaginator,
DescribePatchGroupsPaginator,
DescribePatchPropertiesPaginator,
DescribeSessionsPaginator,
GetInventoryPaginator,
GetInventorySchemaPaginator,
GetOpsSummaryPaginator,
GetParameterHistoryPaginator,
GetParametersByPathPaginator,
GetResourcePoliciesPaginator,
ListAssociationVersionsPaginator,
ListAssociationsPaginator,
ListCommandInvocationsPaginator,
ListCommandsPaginator,
ListComplianceItemsPaginator,
ListComplianceSummariesPaginator,
ListDocumentVersionsPaginator,
ListDocumentsPaginator,
ListNodesPaginator,
ListNodesSummaryPaginator,
ListOpsItemEventsPaginator,
ListOpsItemRelatedItemsPaginator,
ListOpsMetadataPaginator,
ListResourceComplianceSummariesPaginator,
ListResourceDataSyncPaginator,
)
client: SSMClient = Session().client("ssm")
# Explicit type annotations are optional here
# Types should be correctly discovered by mypy and IDEs
describe_activations_paginator: DescribeActivationsPaginator = client.get_paginator(
"describe_activations"
)
describe_association_execution_targets_paginator: DescribeAssociationExecutionTargetsPaginator = (
client.get_paginator("describe_association_execution_targets")
)
describe_association_executions_paginator: DescribeAssociationExecutionsPaginator = (
client.get_paginator("describe_association_executions")
)
describe_automation_executions_paginator: DescribeAutomationExecutionsPaginator = (
client.get_paginator("describe_automation_executions")
)
describe_automation_step_executions_paginator: DescribeAutomationStepExecutionsPaginator = (
client.get_paginator("describe_automation_step_executions")
)
describe_available_patches_paginator: DescribeAvailablePatchesPaginator = client.get_paginator(
"describe_available_patches"
)
describe_effective_instance_associations_paginator: DescribeEffectiveInstanceAssociationsPaginator = client.get_paginator(
"describe_effective_instance_associations"
)
describe_effective_patches_for_patch_baseline_paginator: DescribeEffectivePatchesForPatchBaselinePaginator = client.get_paginator(
"describe_effective_patches_for_patch_baseline"
)
describe_instance_associations_status_paginator: DescribeInstanceAssociationsStatusPaginator = (
client.get_paginator("describe_instance_associations_status")
)
describe_instance_information_paginator: DescribeInstanceInformationPaginator = (
client.get_paginator("describe_instance_information")
)
describe_instance_patch_states_for_patch_group_paginator: DescribeInstancePatchStatesForPatchGroupPaginator = client.get_paginator(
"describe_instance_patch_states_for_patch_group"
)
describe_instance_patch_states_paginator: DescribeInstancePatchStatesPaginator = (
client.get_paginator("describe_instance_patch_states")
)
describe_instance_patches_paginator: DescribeInstancePatchesPaginator = client.get_paginator(
"describe_instance_patches"
)
describe_instance_properties_paginator: DescribeInstancePropertiesPaginator = client.get_paginator(
"describe_instance_properties"
)
describe_inventory_deletions_paginator: DescribeInventoryDeletionsPaginator = client.get_paginator(
"describe_inventory_deletions"
)
describe_maintenance_window_execution_task_invocations_paginator: DescribeMaintenanceWindowExecutionTaskInvocationsPaginator = client.get_paginator(
"describe_maintenance_window_execution_task_invocations"
)
describe_maintenance_window_execution_tasks_paginator: DescribeMaintenanceWindowExecutionTasksPaginator = client.get_paginator(
"describe_maintenance_window_execution_tasks"
)
describe_maintenance_window_executions_paginator: DescribeMaintenanceWindowExecutionsPaginator = (
client.get_paginator("describe_maintenance_window_executions")
)
describe_maintenance_window_schedule_paginator: DescribeMaintenanceWindowSchedulePaginator = (
client.get_paginator("describe_maintenance_window_schedule")
)
describe_maintenance_window_targets_paginator: DescribeMaintenanceWindowTargetsPaginator = (
client.get_paginator("describe_maintenance_window_targets")
)
describe_maintenance_window_tasks_paginator: DescribeMaintenanceWindowTasksPaginator = (
client.get_paginator("describe_maintenance_window_tasks")
)
describe_maintenance_windows_for_target_paginator: DescribeMaintenanceWindowsForTargetPaginator = (
client.get_paginator("describe_maintenance_windows_for_target")
)
describe_maintenance_windows_paginator: DescribeMaintenanceWindowsPaginator = client.get_paginator(
"describe_maintenance_windows"
)
describe_ops_items_paginator: DescribeOpsItemsPaginator = client.get_paginator("describe_ops_items")
describe_parameters_paginator: DescribeParametersPaginator = client.get_paginator(
"describe_parameters"
)
describe_patch_baselines_paginator: DescribePatchBaselinesPaginator = client.get_paginator(
"describe_patch_baselines"
)
describe_patch_groups_paginator: DescribePatchGroupsPaginator = client.get_paginator(
"describe_patch_groups"
)
describe_patch_properties_paginator: DescribePatchPropertiesPaginator = client.get_paginator(
"describe_patch_properties"
)
describe_sessions_paginator: DescribeSessionsPaginator = client.get_paginator("describe_sessions")
get_inventory_paginator: GetInventoryPaginator = client.get_paginator("get_inventory")
get_inventory_schema_paginator: GetInventorySchemaPaginator = client.get_paginator(
"get_inventory_schema"
)
get_ops_summary_paginator: GetOpsSummaryPaginator = client.get_paginator("get_ops_summary")
get_parameter_history_paginator: GetParameterHistoryPaginator = client.get_paginator(
"get_parameter_history"
)
get_parameters_by_path_paginator: GetParametersByPathPaginator = client.get_paginator(
"get_parameters_by_path"
)
get_resource_policies_paginator: GetResourcePoliciesPaginator = client.get_paginator(
"get_resource_policies"
)
list_association_versions_paginator: ListAssociationVersionsPaginator = client.get_paginator(
"list_association_versions"
)
list_associations_paginator: ListAssociationsPaginator = client.get_paginator("list_associations")
list_command_invocations_paginator: ListCommandInvocationsPaginator = client.get_paginator(
"list_command_invocations"
)
list_commands_paginator: ListCommandsPaginator = client.get_paginator("list_commands")
list_compliance_items_paginator: ListComplianceItemsPaginator = client.get_paginator(
"list_compliance_items"
)
list_compliance_summaries_paginator: ListComplianceSummariesPaginator = client.get_paginator(
"list_compliance_summaries"
)
list_document_versions_paginator: ListDocumentVersionsPaginator = client.get_paginator(
"list_document_versions"
)
list_documents_paginator: ListDocumentsPaginator = client.get_paginator("list_documents")
list_nodes_paginator: ListNodesPaginator = client.get_paginator("list_nodes")
list_nodes_summary_paginator: ListNodesSummaryPaginator = client.get_paginator("list_nodes_summary")
list_ops_item_events_paginator: ListOpsItemEventsPaginator = client.get_paginator(
"list_ops_item_events"
)
list_ops_item_related_items_paginator: ListOpsItemRelatedItemsPaginator = client.get_paginator(
"list_ops_item_related_items"
)
list_ops_metadata_paginator: ListOpsMetadataPaginator = client.get_paginator("list_ops_metadata")
list_resource_compliance_summaries_paginator: ListResourceComplianceSummariesPaginator = (
client.get_paginator("list_resource_compliance_summaries")
)
list_resource_data_sync_paginator: ListResourceDataSyncPaginator = client.get_paginator(
"list_resource_data_sync"
)
Waiters annotations
mypy_boto3_ssm.waiter
module contains type annotations for all waiters.
from boto3.session import Session
from mypy_boto3_ssm import SSMClient
from mypy_boto3_ssm.waiter import CommandExecutedWaiter
client: SSMClient = Session().client("ssm")
# Explicit type annotations are optional here
# Types should be correctly discovered by mypy and IDEs
command_executed_waiter: CommandExecutedWaiter = client.get_waiter("command_executed")
Literals
mypy_boto3_ssm.literals
module contains literals extracted from shapes that
can be used in user code for type checking.
Full list of SSM
Literals can be found in
docs.
from mypy_boto3_ssm.literals import AssociationComplianceSeverityType
def check_value(value: AssociationComplianceSeverityType) -> bool: ...
Type definitions
mypy_boto3_ssm.type_defs
module contains structures and shapes assembled to
typed dictionaries and unions for additional type checking.
Full list of SSM
TypeDefs can be found in
docs.
from mypy_boto3_ssm.type_defs import AccountSharingInfoTypeDef
def get_value() -> AccountSharingInfoTypeDef:
return {...}
How it works
Fully automated
mypy-boto3-builder carefully
generates type annotations for each service, patiently waiting for boto3
updates. It delivers drop-in type annotations for you and makes sure that:
- All available
boto3
services are covered. - Each public class and method of every
boto3
service gets valid type annotations extracted frombotocore
schemas. - Type annotations include up-to-date documentation.
- Link to documentation is provided for every method.
- Code is processed by ruff for readability.
What's new
Implemented features
- Fully type annotated
boto3
,botocore
,aiobotocore
andaioboto3
libraries mypy
,pyright
,VSCode
,PyCharm
,Sublime Text
andEmacs
compatibilityClient
,ServiceResource
,Resource
,Waiter
Paginator
type annotations for each service- Generated
TypeDefs
for each service - Generated
Literals
for each service - Auto discovery of types for
boto3.client
andboto3.resource
calls - Auto discovery of types for
session.client
andsession.resource
calls - Auto discovery of types for
client.get_waiter
andclient.get_paginator
calls - Auto discovery of types for
ServiceResource
andResource
collections - Auto discovery of types for
aiobotocore.Session.create_client
calls
Latest changes
Builder changelog can be found in Releases.
Versioning
mypy-boto3-ssm
version is the same as related boto3
version and follows
PEP 440 format.
Thank you
- Allie Fitter for boto3-type-annotations, this package is based on top of his work
- black developers for an awesome formatting tool
- Timothy Edmund Crosley for isort and how flexible it is
- mypy developers for doing all dirty work for us
- pyright team for the new era of typed Python
Documentation
All services type annotations can be found in boto3 docs
Support and contributing
This package is auto-generated. Please reports any bugs or request new features in mypy-boto3-builder repository.
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
File details
Details for the file mypy_boto3_ssm-1.35.67.tar.gz
.
File metadata
- Download URL: mypy_boto3_ssm-1.35.67.tar.gz
- Upload date:
- Size: 92.1 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/5.1.1 CPython/3.13.0
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | dab8080e003e63b1d8df907869bb0f1608ae51c35efddaa2c6bb83e34b8891a8 |
|
MD5 | 4c3c79bd6d74b674522a8537facfe76f |
|
BLAKE2b-256 | 0386a86d2afdca20837d71b0801a4b7584dc2d7a11232ec19fe47ba607c05857 |
File details
Details for the file mypy_boto3_ssm-1.35.67-py3-none-any.whl
.
File metadata
- Download URL: mypy_boto3_ssm-1.35.67-py3-none-any.whl
- Upload date:
- Size: 94.2 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/5.1.1 CPython/3.13.0
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | f4971c30bd530cb651784b8a9a2eeb7333c377eac191d78743aa4b1c54094b32 |
|
MD5 | ff6b1fa553eb2209ccab7873d3d3c495 |
|
BLAKE2b-256 | 573ca545b31cb2ed39d33d6569ff42cdd467f8f0b51024e802be218e41c5a75d |