由mypyboto3buider4.2.0生成的boto3.AutoScaling 1.16.35服务的类型注释

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


mypy-boto3-自动调整

PyPI - mypy-boto3-autoscalingPyPI - Python VersionDocs

boto3.typed

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

mypy-boto3-buider 4.2.0生成。在

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

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

boto3-stubs demo

如何安装

AutoScaling服务安装boto3-stubs。在

python -m pip install boto3-stubs[autoscaling]

使用

VSCode

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

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

PyCharm

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

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

其他IDE

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

mypy

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

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

pyright

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

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

显式类型批注

客户端注释

AutoScalingClientboto3.client("autoscaling")提供注释。在

^{pr2}$

分页器注释

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

frommypy_boto3_autoscalingimportAutoScalingClientfrommypy_boto3_autoscaling.paginatorimport(DescribeAutoScalingGroupsPaginator,DescribeAutoScalingInstancesPaginator,DescribeLaunchConfigurationsPaginator,DescribeLoadBalancersPaginator,DescribeLoadBalancerTargetGroupsPaginator,DescribeNotificationConfigurationsPaginator,DescribePoliciesPaginator,DescribeScalingActivitiesPaginator,DescribeScheduledActionsPaginator,DescribeTagsPaginator,)client:AutoScalingClient=boto3.client("autoscaling")# Explicit type annotations are optional here# Type should be correctly discovered by mypy and IDEs# VSCode requires explicit type annotationsdescribe_auto_scaling_groups_paginator:DescribeAutoScalingGroupsPaginator=client.get_paginator("describe_auto_scaling_groups")describe_auto_scaling_instances_paginator:DescribeAutoScalingInstancesPaginator=client.get_paginator("describe_auto_scaling_instances")describe_launch_configurations_paginator:DescribeLaunchConfigurationsPaginator=client.get_paginator("describe_launch_configurations")describe_load_balancer_target_groups_paginator:DescribeLoadBalancerTargetGroupsPaginator=client.get_paginator("describe_load_balancer_target_groups")describe_load_balancers_paginator:DescribeLoadBalancersPaginator=client.get_paginator("describe_load_balancers")describe_notification_configurations_paginator:DescribeNotificationConfigurationsPaginator=client.get_paginator("describe_notification_configurations")describe_policies_paginator:DescribePoliciesPaginator=client.get_paginator("describe_policies")describe_scaling_activities_paginator:DescribeScalingActivitiesPaginator=client.get_paginator("describe_scaling_activities")describe_scheduled_actions_paginator:DescribeScheduledActionsPaginator=client.get_paginator("describe_scheduled_actions")describe_tags_paginator:DescribeTagsPaginator=client.get_paginator("describe_tags")

键入的措辞

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

frommypy_boto3_autoscaling.type_defsimport(ActivitiesTypeTypeDef,ActivityTypeDef,ActivityTypeTypeDef,AdjustmentTypeTypeDef,AlarmTypeDef,AutoScalingGroupsTypeTypeDef,AutoScalingGroupTypeDef,AutoScalingInstanceDetailsTypeDef,AutoScalingInstancesTypeTypeDef,BatchDeleteScheduledActionAnswerTypeDef,BatchPutScheduledUpdateGroupActionAnswerTypeDef,BlockDeviceMappingTypeDef,CancelInstanceRefreshAnswerTypeDef,CustomizedMetricSpecificationTypeDef,DescribeAccountLimitsAnswerTypeDef,DescribeAdjustmentTypesAnswerTypeDef,DescribeAutoScalingNotificationTypesAnswerTypeDef,DescribeInstanceRefreshesAnswerTypeDef,DescribeLifecycleHooksAnswerTypeDef,DescribeLifecycleHookTypesAnswerTypeDef,DescribeLoadBalancersResponseTypeDef,DescribeLoadBalancerTargetGroupsResponseTypeDef,DescribeMetricCollectionTypesAnswerTypeDef,DescribeNotificationConfigurationsAnswerTypeDef,DescribeTerminationPolicyTypesAnswerTypeDef,DetachInstancesAnswerTypeDef,EbsTypeDef,EnabledMetricTypeDef,EnterStandbyAnswerTypeDef,ExitStandbyAnswerTypeDef,FailedScheduledUpdateGroupActionRequestTypeDef,FilterTypeDef,InstanceMetadataOptionsTypeDef,InstanceMonitoringTypeDef,InstanceRefreshTypeDef,InstancesDistributionTypeDef,InstanceTypeDef,LaunchConfigurationsTypeTypeDef,LaunchConfigurationTypeDef,LaunchTemplateOverridesTypeDef,LaunchTemplateSpecificationTypeDef,LaunchTemplateTypeDef,LifecycleHookSpecificationTypeDef,LifecycleHookTypeDef,LoadBalancerStateTypeDef,LoadBalancerTargetGroupStateTypeDef,MetricCollectionTypeTypeDef,MetricDimensionTypeDef,MetricGranularityTypeTypeDef,MixedInstancesPolicyTypeDef,NotificationConfigurationTypeDef,PaginatorConfigTypeDef,PoliciesTypeTypeDef,PolicyARNTypeTypeDef,PredefinedMetricSpecificationTypeDef,ProcessesTypeTypeDef,ProcessTypeTypeDef,RefreshPreferencesTypeDef,ScalingPolicyTypeDef,ScheduledActionsTypeTypeDef,ScheduledUpdateGroupActionRequestTypeDef,ScheduledUpdateGroupActionTypeDef,StartInstanceRefreshAnswerTypeDef,StepAdjustmentTypeDef,SuspendedProcessTypeDef,TagDescriptionTypeDef,TagsTypeTypeDef,TagTypeDef,TargetTrackingConfigurationTypeDef,)defget_structure()->ActivityTypeDef:return{...}

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

推荐PyPI第三方库


热门话题
java使用Jackson解析非同构JSON对象数组   java为什么'Stream<T>::<A>toArray(IntFunction<A[]>)`接受没有绑定的类型参数A?   java在JavaFX2.0中获取给定布局中的节点大小?   java双链接列表创建节点   java使用HashMap添加、删除和查找   java中push_back(C++)的等效方法是什么?   java在Jetty中运行servlet时获得HTTP 500   用java显示包含图像和文本的页面的最简单文档格式   swing从选项卡窗格Java中的不同选项卡访问数据   字符串Java帮助检查登录类使用。CSV文件   java Struts 1.2.9动作链接   包含max元素的java列表   currentNode上的jcr Java空检查   在Android中使用OpenNLP的POSTaggerMe时出现java NullPointerException   java Logback只将消息记录到syslog一次   如何用Java编写构造函数的API文档   java从gallery中获取所有图像并存储在阵列中   java Maven:将外部jar文件夹添加到类路径