由mypyboto3buider 4.2.0生成的boto3.IoTAnalytics 1.16.35服务的类型注释
mypy-boto3-iotanalytics的Python项目详细描述
mypy-boto3-IOT分析
的类型批注 boto3.IoTAnalytics 1.16.35服务 兼容 VSCode, PyCharm, Emacs, Sublime Text, mypy, pyright 以及其他工具。在
更多信息可在boto3-stubs页找到。在
了解它如何帮助查找和修复潜在的错误:
如何安装
为IoTAnalytics
服务安装boto3-stubs
。在
python -m pip install boto3-stubs[iotanalytics]
使用
VSCode
- 安装Python extension
- 安装Pylance extension
- 将
Pylance
设置为Python语言服务器 - 在您的环境中安装
boto-stubs[iotanalytics]
:python -m pip install 'boto3-stubs[iotanalytics]'
类型检查和自动完成都应该适用于IoTAnalytics
服务。
不需要显式的类型注释,请照常编写boto3
代码。在
PyCharm
- 在您的环境中安装
boto-stubs[iotanalytics]
:python -m pip install 'boto3-stubs[iotanalytics]'
类型检查和自动完成都应该适用于IoTAnalytics
服务。
不需要显式的类型注释,请照常编写boto3
代码。
自动完成在大型项目或安装了大量boto3-stubs
子模块时可能会很慢。在
其他IDE
没有经过测试,但是只要您的IDE支持mypy
或{
mypy
- 安装
mypy
:python -m pip install mypy
- 在您的环境中安装
boto-stubs[iotanalytics]
:python -m pip install 'boto3-stubs[iotanalytics]'
- 像往常一样运行
mypy
类型检查应该适用于IoTAnalytics
服务。
不需要显式的类型注释,请照常编写boto3
代码。在
pyright
- 安装
pyright
:yarn global add pyright
- 在您的环境中安装
boto-stubs[iotanalytics]
:python -m pip install 'boto3-stubs[iotanalytics]'
- 或者,您可以将
boto3-stubs
安装到typings
文件夹中。在
类型检查应该适用于IoTAnalytics
服务。
不需要显式的类型注释,请照常编写boto3
代码。在
显式类型批注
客户端注释
IoTAnalyticsClient
为boto3.client("iotanalytics")
提供注释。在
分页器注释
mypy_boto3_iotanalytics.paginator
模块包含所有分页器的类型注释。在
frommypy_boto3_iotanalyticsimportIoTAnalyticsClientfrommypy_boto3_iotanalytics.paginatorimport(ListChannelsPaginator,ListDatasetContentsPaginator,ListDatasetsPaginator,ListDatastoresPaginator,ListPipelinesPaginator,)client:IoTAnalyticsClient=boto3.client("iotanalytics")# Explicit type annotations are optional here# Type should be correctly discovered by mypy and IDEs# VSCode requires explicit type annotationslist_channels_paginator:ListChannelsPaginator=client.get_paginator("list_channels")list_dataset_contents_paginator:ListDatasetContentsPaginator=client.get_paginator("list_dataset_contents")list_datasets_paginator:ListDatasetsPaginator=client.get_paginator("list_datasets")list_datastores_paginator:ListDatastoresPaginator=client.get_paginator("list_datastores")list_pipelines_paginator:ListPipelinesPaginator=client.get_paginator("list_pipelines")
键入的措辞
mypy_boto3_iotanalytics.type_defs
模块包含组合的结构和形状
以进行额外的类型检查。在
frommypy_boto3_iotanalytics.type_defsimport(AddAttributesActivityTypeDef,BatchPutMessageErrorEntryTypeDef,BatchPutMessageResponseTypeDef,ChannelActivityTypeDef,ChannelStatisticsTypeDef,ChannelStorageSummaryTypeDef,ChannelStorageTypeDef,ChannelSummaryTypeDef,ChannelTypeDef,ContainerDatasetActionTypeDef,CreateChannelResponseTypeDef,CreateDatasetContentResponseTypeDef,CreateDatasetResponseTypeDef,CreateDatastoreResponseTypeDef,CreatePipelineResponseTypeDef,CustomerManagedChannelS3StorageSummaryTypeDef,CustomerManagedChannelS3StorageTypeDef,CustomerManagedDatastoreS3StorageSummaryTypeDef,CustomerManagedDatastoreS3StorageTypeDef,DatasetActionSummaryTypeDef,DatasetActionTypeDef,DatasetContentDeliveryDestinationTypeDef,DatasetContentDeliveryRuleTypeDef,DatasetContentStatusTypeDef,DatasetContentSummaryTypeDef,DatasetContentVersionValueTypeDef,DatasetEntryTypeDef,DatasetSummaryTypeDef,DatasetTriggerTypeDef,DatasetTypeDef,DatastoreActivityTypeDef,DatastoreStatisticsTypeDef,DatastoreStorageSummaryTypeDef,DatastoreStorageTypeDef,DatastoreSummaryTypeDef,DatastoreTypeDef,DeltaTimeSessionWindowConfigurationTypeDef,DeltaTimeTypeDef,DescribeChannelResponseTypeDef,DescribeDatasetResponseTypeDef,DescribeDatastoreResponseTypeDef,DescribeLoggingOptionsResponseTypeDef,DescribePipelineResponseTypeDef,DeviceRegistryEnrichActivityTypeDef,DeviceShadowEnrichActivityTypeDef,EstimatedResourceSizeTypeDef,FilterActivityTypeDef,GetDatasetContentResponseTypeDef,GlueConfigurationTypeDef,IotEventsDestinationConfigurationTypeDef,LambdaActivityTypeDef,LateDataRuleConfigurationTypeDef,LateDataRuleTypeDef,ListChannelsResponseTypeDef,ListDatasetContentsResponseTypeDef,ListDatasetsResponseTypeDef,ListDatastoresResponseTypeDef,ListPipelinesResponseTypeDef,ListTagsForResourceResponseTypeDef,LoggingOptionsTypeDef,MathActivityTypeDef,MessageTypeDef,OutputFileUriValueTypeDef,PaginatorConfigTypeDef,PipelineActivityTypeDef,PipelineSummaryTypeDef,PipelineTypeDef,QueryFilterTypeDef,RemoveAttributesActivityTypeDef,ReprocessingSummaryTypeDef,ResourceConfigurationTypeDef,RetentionPeriodTypeDef,RunPipelineActivityResponseTypeDef,S3DestinationConfigurationTypeDef,SampleChannelDataResponseTypeDef,ScheduleTypeDef,SelectAttributesActivityTypeDef,SqlQueryDatasetActionTypeDef,StartPipelineReprocessingResponseTypeDef,TagTypeDef,TriggeringDatasetTypeDef,VariableTypeDef,VersioningConfigurationTypeDef,)defget_structure()->AddAttributesActivityTypeDef:return{...}
- 项目
标签: