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

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


mypy-boto3-批次

PyPI - mypy-boto3-batchPyPI - Python VersionDocs

boto3.typed

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

mypy-boto3-buider 4.2.0生成。在

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

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

boto3-stubs demo

如何安装

Batch服务安装boto3-stubs。在

python -m pip install boto3-stubs[batch]

使用

VSCode

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

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

PyCharm

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

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

其他IDE

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

mypy

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

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

pyright

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

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

显式类型批注

客户端注释

BatchClientboto3.client("batch")提供注释。在

^{pr2}$

分页器注释

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

frommypy_boto3_batchimportBatchClientfrommypy_boto3_batch.paginatorimport(DescribeComputeEnvironmentsPaginator,DescribeJobDefinitionsPaginator,DescribeJobQueuesPaginator,ListJobsPaginator,)client:BatchClient=boto3.client("batch")# Explicit type annotations are optional here# Type should be correctly discovered by mypy and IDEs# VSCode requires explicit type annotationsdescribe_compute_environments_paginator:DescribeComputeEnvironmentsPaginator=client.get_paginator("describe_compute_environments")describe_job_definitions_paginator:DescribeJobDefinitionsPaginator=client.get_paginator("describe_job_definitions")describe_job_queues_paginator:DescribeJobQueuesPaginator=client.get_paginator("describe_job_queues")list_jobs_paginator:ListJobsPaginator=client.get_paginator("list_jobs")

键入的措辞

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

frommypy_boto3_batch.type_defsimport(ArrayPropertiesDetailTypeDef,ArrayPropertiesSummaryTypeDef,ArrayPropertiesTypeDef,AttemptContainerDetailTypeDef,AttemptDetailTypeDef,ComputeEnvironmentDetailTypeDef,ComputeEnvironmentOrderTypeDef,ComputeResourceTypeDef,ComputeResourceUpdateTypeDef,ContainerDetailTypeDef,ContainerOverridesTypeDef,ContainerPropertiesTypeDef,ContainerSummaryTypeDef,CreateComputeEnvironmentResponseTypeDef,CreateJobQueueResponseTypeDef,DescribeComputeEnvironmentsResponseTypeDef,DescribeJobDefinitionsResponseTypeDef,DescribeJobQueuesResponseTypeDef,DescribeJobsResponseTypeDef,DeviceTypeDef,Ec2ConfigurationTypeDef,EvaluateOnExitTypeDef,FargatePlatformConfigurationTypeDef,HostTypeDef,JobDefinitionTypeDef,JobDependencyTypeDef,JobDetailTypeDef,JobQueueDetailTypeDef,JobSummaryTypeDef,JobTimeoutTypeDef,KeyValuePairTypeDef,LaunchTemplateSpecificationTypeDef,LinuxParametersTypeDef,ListJobsResponseTypeDef,ListTagsForResourceResponseTypeDef,LogConfigurationTypeDef,MountPointTypeDef,NetworkConfigurationTypeDef,NetworkInterfaceTypeDef,NodeDetailsTypeDef,NodeOverridesTypeDef,NodePropertiesSummaryTypeDef,NodePropertiesTypeDef,NodePropertyOverrideTypeDef,NodeRangePropertyTypeDef,PaginatorConfigTypeDef,RegisterJobDefinitionResponseTypeDef,ResourceRequirementTypeDef,RetryStrategyTypeDef,SecretTypeDef,SubmitJobResponseTypeDef,TmpfsTypeDef,UlimitTypeDef,UpdateComputeEnvironmentResponseTypeDef,UpdateJobQueueResponseTypeDef,VolumeTypeDef,)defget_structure()->ArrayPropertiesDetailTypeDef:return{...}

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

推荐PyPI第三方库


热门话题
java Android Studio:我的短信应用程序不是默认短信应用程序的选项之一   java处理字符串问题   java为什么我的程序打印“null”而不是字符串?   java为什么要创建一个无限循环?   java循环在一段时间后将布尔值更改为false?   java Android Rest Api Post 400错误请求   java调用另一个方法以获取resultset并正确关闭连接?   java我想在2d数组中添加一行   Java:我需要从outputstream中获取字节数组   C语言中Java元注释的等价物#   java如何在从web下载图像时保持原始图像的dpi?   java中基于输入值的spring boot动态值   java从请求中获取主机名   java可以复制Swing代码并在intelliJ中的designer中查看它吗   spring如何使用java配置多个ldap   安卓如何在Java中使用具有多个类似参数的JSON请求/响应循环?   java LIbGDX如何在语言更改时翻译所有文本?