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

mypy-boto3-redshift-data的Python项目详细描述


mypy-boto3-红移数据

PyPI - mypy-boto3-redshift-dataPyPI - Python VersionDocs

boto3.typed

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

mypy-boto3-buider 4.2.0生成。在

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

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

boto3-stubs demo

如何安装

RedshiftDataAPIService服务安装boto3-stubs。在

python -m pip install boto3-stubs[redshift-data]

使用

VSCode

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

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

PyCharm

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

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

其他IDE

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

mypy

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

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

pyright

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

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

显式类型批注

客户端注释

RedshiftDataAPIServiceClientboto3.client("redshift-data")提供注释。在

^{pr2}$

分页器注释

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

frommypy_boto3_redshift_dataimportRedshiftDataAPIServiceClientfrommypy_boto3_redshift_data.paginatorimport(DescribeTablePaginator,GetStatementResultPaginator,ListDatabasesPaginator,ListSchemasPaginator,ListStatementsPaginator,ListTablesPaginator,)client:RedshiftDataAPIServiceClient=boto3.client("redshift-data")# Explicit type annotations are optional here# Type should be correctly discovered by mypy and IDEs# VSCode requires explicit type annotationsdescribe_table_paginator:DescribeTablePaginator=client.get_paginator("describe_table")get_statement_result_paginator:GetStatementResultPaginator=client.get_paginator("get_statement_result")list_databases_paginator:ListDatabasesPaginator=client.get_paginator("list_databases")list_schemas_paginator:ListSchemasPaginator=client.get_paginator("list_schemas")list_statements_paginator:ListStatementsPaginator=client.get_paginator("list_statements")list_tables_paginator:ListTablesPaginator=client.get_paginator("list_tables")

键入的措辞

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

frommypy_boto3_redshift_data.type_defsimport(CancelStatementResponseTypeDef,ColumnMetadataTypeDef,DescribeStatementResponseTypeDef,DescribeTableResponseTypeDef,ExecuteStatementOutputTypeDef,FieldTypeDef,GetStatementResultResponseTypeDef,ListDatabasesResponseTypeDef,ListSchemasResponseTypeDef,ListStatementsResponseTypeDef,ListTablesResponseTypeDef,PaginatorConfigTypeDef,ResponseMetadata,StatementDataTypeDef,TableMemberTypeDef,)defget_structure()->ColumnMetadataTypeDef:return{...}

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

推荐PyPI第三方库


热门话题
java如何从IBM MQ的JMSException检测可恢复错误   java Lucene6。4.2:找不到类,尝试添加查询。   Java Pdf差异库   在Java中多线程处理我的线程   java将字符串传递给Uri。下载中的parse()   java在列表中查找原语位置   java JPA条件从另一个查询中选择   java中的强制转换和转换   java如何在没有上下文的情况下获取SOAP Web服务(Apache Axis 1.4)的调用客户端的IP地址   java Android IllegalBlockSizeException:解密中最后一个块未完成   java Jersey是否要自定义无效资源路径的错误处理?   如何将JavaCVS web项目转换为基于maven的web项目?   java如何检查通用列表是否与jUnit相等?   arraylist java。util。尝试使用迭代器时发生ConcurrentModificationException错误   使用springsecurity,jsp上的java${u csrf.token}始终为空   sql使用java从临时表中选择数据   spring验证中的java@Notnull和@Pattern无效   java如何使用jQuery将包含对象数组的对象数组传递给Spring MVC控制器?