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

mypy-boto3-cognito-identit的Python项目详细描述


mypy-boto3-cognito-标识

PyPI - mypy-boto3-cognito-identityPyPI - Python VersionDocs

boto3.typed

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

mypy-boto3-buider 4.2.0生成。在

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

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

boto3-stubs demo

如何安装

CognitoIdentity服务安装boto3-stubs。在

python -m pip install boto3-stubs[cognito-identity]

使用

VSCode

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

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

PyCharm

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

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

其他IDE

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

mypy

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

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

pyright

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

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

显式类型批注

客户端注释

CognitoIdentityClientboto3.client("cognito-identity")提供注释。在

^{pr2}$

分页器注释

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

frommypy_boto3_cognito_identityimportCognitoIdentityClientfrommypy_boto3_cognito_identity.paginatorimportListIdentityPoolsPaginatorclient:CognitoIdentityClient=boto3.client("cognito-identity")# Explicit type annotations are optional here# Type should be correctly discovered by mypy and IDEs# VSCode requires explicit type annotationslist_identity_pools_paginator:ListIdentityPoolsPaginator=client.get_paginator("list_identity_pools")

键入的措辞

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

frommypy_boto3_cognito_identity.type_defsimport(CognitoIdentityProviderTypeDef,CredentialsTypeDef,DeleteIdentitiesResponseTypeDef,GetCredentialsForIdentityResponseTypeDef,GetIdentityPoolRolesResponseTypeDef,GetIdResponseTypeDef,GetOpenIdTokenForDeveloperIdentityResponseTypeDef,GetOpenIdTokenResponseTypeDef,IdentityDescriptionTypeDef,IdentityPoolShortDescriptionTypeDef,IdentityPoolTypeDef,ListIdentitiesResponseTypeDef,ListIdentityPoolsResponseTypeDef,ListTagsForResourceResponseTypeDef,LookupDeveloperIdentityResponseTypeDef,MappingRuleTypeDef,MergeDeveloperIdentitiesResponseTypeDef,PaginatorConfigTypeDef,RoleMappingTypeDef,RulesConfigurationTypeTypeDef,UnprocessedIdentityIdTypeDef,)defget_structure()->CognitoIdentityProviderTypeDef:return{...}

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

推荐PyPI第三方库


热门话题
JPA中的java按对象属性查找   java SetOnKeyListener不使用gridview   java“无法构建实体管理器工厂”在运行用Maven编译的jar文件时出现Hibernate异常   java缓存webclient创建是个好主意吗   java如何显示回文?   使用Java写入txt文件时是否有行限制?   Java的重写无法正确重写函数   使用Java用uu RequestVerificationToken填写HTML表单   java Bukkit插件:如何使用命令停止计时器   processbuilder正在尝试运行。使用java在另一个目录中创建bat文件   java Android编程发送数据   java从文本文件中读取每行不同数据类型   函数java中是否有“dofor”循环?   在选择框中列出所有可用系统字体的java   JMS侦听器中异常时java JMS消息的重新传递   Java通用比较器   java简单DAO使用Hibernate和Spring框架,不起作用:无法找到XML架构命名空间的Spring NamespaceHandler   在Java中向抽象基类添加成员对部署的影响   gwt如何在Java中比较两个相同对象的数据