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

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


mypy-boto3-elb型

PyPI - mypy-boto3-elbPyPI - Python VersionDocs

boto3.typed

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

mypy-boto3-buider 4.2.0生成。在

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

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

boto3-stubs demo

如何安装

ElasticLoadBalancing服务安装boto3-stubs。在

python -m pip install boto3-stubs[elb]

使用

VSCode

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

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

PyCharm

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

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

其他IDE

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

mypy

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

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

pyright

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

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

显式类型批注

客户端注释

ElasticLoadBalancingClientboto3.client("elb")提供注释。在

^{pr2}$

分页器注释

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

frommypy_boto3_elbimportElasticLoadBalancingClientfrommypy_boto3_elb.paginatorimportDescribeAccountLimitsPaginator,DescribeLoadBalancersPaginatorclient:ElasticLoadBalancingClient=boto3.client("elb")# Explicit type annotations are optional here# Type should be correctly discovered by mypy and IDEs# VSCode requires explicit type annotationsdescribe_account_limits_paginator:DescribeAccountLimitsPaginator=client.get_paginator("describe_account_limits")describe_load_balancers_paginator:DescribeLoadBalancersPaginator=client.get_paginator("describe_load_balancers")

服务员注释

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

frommypy_boto3_elbimportElasticLoadBalancingClientfrommypy_boto3_elb.waiterimport(AnyInstanceInServiceWaiter,InstanceDeregisteredWaiter,InstanceInServiceWaiter,)client:ElasticLoadBalancingClient=boto3.client("elb")# Explicit type annotations are optional here# Type should be correctly discovered by mypy and IDEs# VSCode requires explicit type annotationsany_instance_in_service_waiter:AnyInstanceInServiceWaiter=client.get_waiter("any_instance_in_service")instance_deregistered_waiter:InstanceDeregisteredWaiter=client.get_waiter("instance_deregistered")instance_in_service_waiter:InstanceInServiceWaiter=client.get_waiter("instance_in_service")

键入<3词>

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

frommypy_boto3_elb.type_defsimport(AccessLogTypeDef,AddAvailabilityZonesOutputTypeDef,AdditionalAttributeTypeDef,AppCookieStickinessPolicyTypeDef,ApplySecurityGroupsToLoadBalancerOutputTypeDef,AttachLoadBalancerToSubnetsOutputTypeDef,BackendServerDescriptionTypeDef,ConfigureHealthCheckOutputTypeDef,ConnectionDrainingTypeDef,ConnectionSettingsTypeDef,CreateAccessPointOutputTypeDef,CrossZoneLoadBalancingTypeDef,DeregisterEndPointsOutputTypeDef,DescribeAccessPointsOutputTypeDef,DescribeAccountLimitsOutputTypeDef,DescribeEndPointStateOutputTypeDef,DescribeLoadBalancerAttributesOutputTypeDef,DescribeLoadBalancerPoliciesOutputTypeDef,DescribeLoadBalancerPolicyTypesOutputTypeDef,DescribeTagsOutputTypeDef,DetachLoadBalancerFromSubnetsOutputTypeDef,HealthCheckTypeDef,InstanceStateTypeDef,InstanceTypeDef,LBCookieStickinessPolicyTypeDef,LimitTypeDef,ListenerDescriptionTypeDef,ListenerTypeDef,LoadBalancerAttributesTypeDef,LoadBalancerDescriptionTypeDef,ModifyLoadBalancerAttributesOutputTypeDef,PaginatorConfigTypeDef,PoliciesTypeDef,PolicyAttributeDescriptionTypeDef,PolicyAttributeTypeDef,PolicyAttributeTypeDescriptionTypeDef,PolicyDescriptionTypeDef,PolicyTypeDescriptionTypeDef,RegisterEndPointsOutputTypeDef,RemoveAvailabilityZonesOutputTypeDef,ResponseMetadata,SourceSecurityGroupTypeDef,TagDescriptionTypeDef,TagKeyOnlyTypeDef,TagTypeDef,WaiterConfigTypeDef,)defget_structure()->AccessLogTypeDef:return{...}

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

推荐PyPI第三方库


热门话题
java不兼容类型:MainActivity无法转换为LifecycleOwner   java安卓是一种更有效的读取大文本文件的方法   java导出LWJGL本地人与项目?(IntelliJ IDEA)   JDK更新后,JavaJShell不再在下一行打印输出   父类对象上的继承Java比较子属性   Java:有没有一个容器可以有效地结合HashMap和ArrayList?   安卓 Java对象指针   java在annotationdriven Spring MVC应用程序中实现大气   java 安卓源代码构建应用找不到安卓supportv4。罐子   文件系统上的抽象层和Java中的jar/zip   java在水平滚动视图中添加多个图像?   java如何从firebase实时数据库中获取字符串数组   WIndows 10工作站上的java未满足链接错误   java命令在终端中工作,但在使用过程中出现“无结束引号”错误。执行官