由mypyboto3buider 4.2.0生成的boto3.sms1.16.35服务的类型注释

mypy-boto3-sms的Python项目详细描述


mypy-boto3-sms

PyPI - mypy-boto3-smsPyPI - Python VersionDocs

boto3.typed

的类型批注 boto3.SMS 1.16.35服务 兼容 VSCodePyCharmEmacsSublime Textmypypyright 以及其他工具。在

mypy-boto3-buider 4.2.0生成。在

更多信息可在boto3-stubs页找到。在

了解它如何帮助查找和修复潜在的错误:

boto3-stubs demo

如何安装

SMS服务安装boto3-stubs。在

python -m pip install boto3-stubs[sms]

使用

VSCode

  • 安装Python extension
  • 安装Pylance extension
  • Pylance设置为Python语言服务器
  • 在您的环境中安装boto-stubs[sms]python -m pip install 'boto3-stubs[sms]'

类型检查和自动完成都应该适用于SMS服务。 不需要显式的类型注释,请照常编写boto3代码。在

PyCharm

  • 在您的环境中安装boto-stubs[sms]python -m pip install 'boto3-stubs[sms]'

类型检查和自动完成都应该适用于SMS服务。 不需要显式的类型注释,请照常编写boto3代码。 自动完成在大型项目或安装了大量boto3-stubs子模块时可能会很慢。在

其他IDE

没有经过测试,但是只要您的IDE支持mypy或{},一切都应该正常。在

mypy

  • 安装mypypython -m pip install mypy
  • 在您的环境中安装boto-stubs[sms]python -m pip install 'boto3-stubs[sms]'
  • 像往常一样运行mypy

类型检查应该适用于SMS服务。 不需要显式的类型注释,请照常编写boto3代码。在

pyright

  • 安装pyrightyarn global add pyright
  • 在您的环境中安装boto-stubs[sms]python -m pip install 'boto3-stubs[sms]'
  • 或者,您可以将boto3-stubs安装到typings文件夹中。在

类型检查应该适用于SMS服务。 不需要显式的类型注释,请照常编写boto3代码。在

显式类型批注

客户端注释

SMSClientboto3.client("sms")提供注释。在

^{pr2}$

分页器注释

mypy_boto3_sms.paginator模块包含所有分页器的类型注释。在

frommypy_boto3_smsimportSMSClientfrommypy_boto3_sms.paginatorimport(GetConnectorsPaginator,GetReplicationJobsPaginator,GetReplicationRunsPaginator,GetServersPaginator,ListAppsPaginator,)client:SMSClient=boto3.client("sms")# Explicit type annotations are optional here# Type should be correctly discovered by mypy and IDEs# VSCode requires explicit type annotationsget_connectors_paginator:GetConnectorsPaginator=client.get_paginator("get_connectors")get_replication_jobs_paginator:GetReplicationJobsPaginator=client.get_paginator("get_replication_jobs")get_replication_runs_paginator:GetReplicationRunsPaginator=client.get_paginator("get_replication_runs")get_servers_paginator:GetServersPaginator=client.get_paginator("get_servers")list_apps_paginator:ListAppsPaginator=client.get_paginator("list_apps")

键入的措辞

mypy_boto3_sms.type_defs模块包含组合的结构和形状 以进行额外的类型检查。在

frommypy_boto3_sms.type_defsimport(AppSummaryTypeDef,AppValidationConfigurationTypeDef,AppValidationOutputTypeDef,ConnectorTypeDef,CreateAppResponseTypeDef,CreateReplicationJobResponseTypeDef,GenerateChangeSetResponseTypeDef,GenerateTemplateResponseTypeDef,GetAppLaunchConfigurationResponseTypeDef,GetAppReplicationConfigurationResponseTypeDef,GetAppResponseTypeDef,GetAppValidationConfigurationResponseTypeDef,GetAppValidationOutputResponseTypeDef,GetConnectorsResponseTypeDef,GetReplicationJobsResponseTypeDef,GetReplicationRunsResponseTypeDef,GetServersResponseTypeDef,LaunchDetailsTypeDef,ListAppsResponseTypeDef,NotificationContextTypeDef,PaginatorConfigTypeDef,ReplicationJobTypeDef,ReplicationRunStageDetailsTypeDef,ReplicationRunTypeDef,ResponseMetadata,S3LocationTypeDef,ServerGroupLaunchConfigurationTypeDef,ServerGroupReplicationConfigurationTypeDef,ServerGroupTypeDef,ServerGroupValidationConfigurationTypeDef,ServerLaunchConfigurationTypeDef,ServerReplicationConfigurationTypeDef,ServerReplicationParametersTypeDef,ServerTypeDef,ServerValidationConfigurationTypeDef,ServerValidationOutputTypeDef,SourceTypeDef,SSMOutputTypeDef,SSMValidationParametersTypeDef,StartOnDemandReplicationRunResponseTypeDef,TagTypeDef,UpdateAppResponseTypeDef,UserDataTypeDef,UserDataValidationParametersTypeDef,ValidationOutputTypeDef,VmServerAddressTypeDef,VmServerTypeDef,)defget_structure()->AppSummaryTypeDef:return{...}

欢迎加入QQ群-->: 979659372 Python中文网_新手群

推荐PyPI第三方库


热门话题
AmazonS3查找从S3forJava下载的压缩文件的MIME类型   java如何使用Selenium在<span>中查找具有特定文本的元素   python如何使用OpenIEDemo生成自定义三元组。由stanfordnlp提供的java   java遇到“方法不适用”编译错误   java如何使用Mockito在Looper中运行的验证代码。getMainLooper?   类Java目录错误   java在已知其他泛型信息时使用原始类型   java connect()和disconnect()在哪里实现?   java使用PDF Box库拆分PDF,生成的PDF几乎与源PDF文件大小相同   java PowerMockito返回错误的对象   java如何找到TIBCO集合消息的字节编码?   java Basic音乐播放器下一步和上一步按钮   添加模块描述符时,java没有名为“entityManagerFactory”的bean可用   java为什么我的代码不是线程安全的?   eclipse java。引用项目中的类的lang.NoClassDefFoundError