由mypyboto3buider 4.2.0生成的boto3.OpsWorksCM 1.16.35服务的类型注释

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


mypy-boto3-opsworkscm公司

PyPI - mypy-boto3-opsworkscmPyPI - Python VersionDocs

boto3.typed

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

mypy-boto3-buider 4.2.0生成。在

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

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

boto3-stubs demo

如何安装

OpsWorksCM服务安装boto3-stubs。在

python -m pip install boto3-stubs[opsworkscm]

使用

VSCode

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

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

PyCharm

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

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

其他IDE

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

mypy

  • 安装mypypython -m pip install mypy
  • 在您的环境中安装boto-stubs[opsworkscm]python -m pip install 'boto3-stubs[opsworkscm]'
  • {cd13>像往常一样

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

pyright

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

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

显式类型批注

客户端注释

OpsWorksCMClientboto3.client("opsworkscm")提供注释。在

^{pr2}$

分页器注释

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

frommypy_boto3_opsworkscmimportOpsWorksCMClientfrommypy_boto3_opsworkscm.paginatorimport(DescribeBackupsPaginator,DescribeEventsPaginator,DescribeServersPaginator,ListTagsForResourcePaginator,)client:OpsWorksCMClient=boto3.client("opsworkscm")# Explicit type annotations are optional here# Type should be correctly discovered by mypy and IDEs# VSCode requires explicit type annotationsdescribe_backups_paginator:DescribeBackupsPaginator=client.get_paginator("describe_backups")describe_events_paginator:DescribeEventsPaginator=client.get_paginator("describe_events")describe_servers_paginator:DescribeServersPaginator=client.get_paginator("describe_servers")list_tags_for_resource_paginator:ListTagsForResourcePaginator=client.get_paginator("list_tags_for_resource")

服务员注释

mypy_boto3_opsworkscm.waiter模块包含所有等待者的类型注释。在

frommypy_boto3_opsworkscmimportOpsWorksCMClientfrommypy_boto3_opsworkscm.waiterimportNodeAssociatedWaiterclient:OpsWorksCMClient=boto3.client("opsworkscm")# Explicit type annotations are optional here# Type should be correctly discovered by mypy and IDEs# VSCode requires explicit type annotationsnode_associated_waiter:NodeAssociatedWaiter=client.get_waiter("node_associated")

键入的措辞

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

frommypy_boto3_opsworkscm.type_defsimport(AccountAttributeTypeDef,AssociateNodeResponseTypeDef,BackupTypeDef,CreateBackupResponseTypeDef,CreateServerResponseTypeDef,DescribeAccountAttributesResponseTypeDef,DescribeBackupsResponseTypeDef,DescribeEventsResponseTypeDef,DescribeNodeAssociationStatusResponseTypeDef,DescribeServersResponseTypeDef,DisassociateNodeResponseTypeDef,EngineAttributeTypeDef,ExportServerEngineAttributeResponseTypeDef,ListTagsForResourceResponseTypeDef,PaginatorConfigTypeDef,ServerEventTypeDef,ServerTypeDef,StartMaintenanceResponseTypeDef,TagTypeDef,UpdateServerEngineAttributesResponseTypeDef,UpdateServerResponseTypeDef,WaiterConfigTypeDef,)defget_structure()->AccountAttributeTypeDef:return{...}

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

推荐PyPI第三方库


热门话题
java JNI和取消异步任务   java整数n作为List<String>的第二个参数传递。子列表(fromIndex,toIndex),但是stacktrace说toIndex在Kotlin中是n+2   如何在Java中正确嵌套多个ArrayList/Maps?   在嵌套条件语句中比较数组中的值时,java List没有打印正确的值   从CRON作业运行java代码   JRE使用jvisualvm检测到java致命错误   java将字符添加到BufferedReader中   带有枚举的java单例与带有双重检查锁定的单例   Java中的编译器构造基类的更改会影响子类的字节码吗?   Java作为Windows服务用户数据路径   java clone():ArrayList。克隆人()我认为它是一个肤浅的复制品   在jfilechooser多文件选择器启用中打开对话框后,java文件将显示所选文件   java在常用的操作方法中使用反射可以吗?   java ReloadableResourceBundleMessageSource。getMessage()不使用我给它的参数