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

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


mypy-boto3-guardduty公司

PyPI - mypy-boto3-guarddutyPyPI - Python VersionDocs

boto3.typed

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

mypy-boto3-buider 4.2.0生成。在

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

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

boto3-stubs demo

如何安装

GuardDuty服务安装boto3-stubs。在

python -m pip install boto3-stubs[guardduty]

使用

VSCode

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

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

PyCharm

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

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

其他IDE

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

mypy

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

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

pyright

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

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

显式类型批注

客户端注释

GuardDutyClientboto3.client("guardduty")提供注释。在

^{pr2}$

分页器注释

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

frommypy_boto3_guarddutyimportGuardDutyClientfrommypy_boto3_guardduty.paginatorimport(ListDetectorsPaginator,ListFiltersPaginator,ListFindingsPaginator,ListInvitationsPaginator,ListIPSetsPaginator,ListMembersPaginator,ListOrganizationAdminAccountsPaginator,ListThreatIntelSetsPaginator,)client:GuardDutyClient=boto3.client("guardduty")# Explicit type annotations are optional here# Type should be correctly discovered by mypy and IDEs# VSCode requires explicit type annotationslist_detectors_paginator:ListDetectorsPaginator=client.get_paginator("list_detectors")list_filters_paginator:ListFiltersPaginator=client.get_paginator("list_filters")list_findings_paginator:ListFindingsPaginator=client.get_paginator("list_findings")list_ip_sets_paginator:ListIPSetsPaginator=client.get_paginator("list_ip_sets")list_invitations_paginator:ListInvitationsPaginator=client.get_paginator("list_invitations")list_members_paginator:ListMembersPaginator=client.get_paginator("list_members")list_organization_admin_accounts_paginator:ListOrganizationAdminAccountsPaginator=client.get_paginator("list_organization_admin_accounts")list_threat_intel_sets_paginator:ListThreatIntelSetsPaginator=client.get_paginator("list_threat_intel_sets")

键入的措辞

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

frommypy_boto3_guardduty.type_defsimport(AccessControlListTypeDef,AccessKeyDetailsTypeDef,AccountDetailTypeDef,AccountLevelPermissionsTypeDef,ActionTypeDef,AdminAccountTypeDef,AwsApiCallActionTypeDef,BlockPublicAccessTypeDef,BucketLevelPermissionsTypeDef,BucketPolicyTypeDef,CityTypeDef,CloudTrailConfigurationResultTypeDef,ConditionTypeDef,CountryTypeDef,CreateDetectorResponseTypeDef,CreateFilterResponseTypeDef,CreateIPSetResponseTypeDef,CreateMembersResponseTypeDef,CreatePublishingDestinationResponseTypeDef,CreateThreatIntelSetResponseTypeDef,DataSourceConfigurationsResultTypeDef,DataSourceConfigurationsTypeDef,DeclineInvitationsResponseTypeDef,DefaultServerSideEncryptionTypeDef,DeleteInvitationsResponseTypeDef,DeleteMembersResponseTypeDef,DescribeOrganizationConfigurationResponseTypeDef,DescribePublishingDestinationResponseTypeDef,DestinationPropertiesTypeDef,DestinationTypeDef,DisassociateMembersResponseTypeDef,DNSLogsConfigurationResultTypeDef,DnsRequestActionTypeDef,DomainDetailsTypeDef,EvidenceTypeDef,FindingCriteriaTypeDef,FindingStatisticsTypeDef,FindingTypeDef,FlowLogsConfigurationResultTypeDef,GeoLocationTypeDef,GetDetectorResponseTypeDef,GetFilterResponseTypeDef,GetFindingsResponseTypeDef,GetFindingsStatisticsResponseTypeDef,GetInvitationsCountResponseTypeDef,GetIPSetResponseTypeDef,GetMasterAccountResponseTypeDef,GetMemberDetectorsResponseTypeDef,GetMembersResponseTypeDef,GetThreatIntelSetResponseTypeDef,GetUsageStatisticsResponseTypeDef,IamInstanceProfileTypeDef,InstanceDetailsTypeDef,InvitationTypeDef,InviteMembersResponseTypeDef,ListDetectorsResponseTypeDef,ListFiltersResponseTypeDef,ListFindingsResponseTypeDef,ListInvitationsResponseTypeDef,ListIPSetsResponseTypeDef,ListMembersResponseTypeDef,ListOrganizationAdminAccountsResponseTypeDef,ListPublishingDestinationsResponseTypeDef,ListTagsForResourceResponseTypeDef,ListThreatIntelSetsResponseTypeDef,LocalIpDetailsTypeDef,LocalPortDetailsTypeDef,MasterTypeDef,MemberDataSourceConfigurationTypeDef,MemberTypeDef,NetworkConnectionActionTypeDef,NetworkInterfaceTypeDef,OrganizationDataSourceConfigurationsResultTypeDef,OrganizationDataSourceConfigurationsTypeDef,OrganizationS3LogsConfigurationResultTypeDef,OrganizationS3LogsConfigurationTypeDef,OrganizationTypeDef,OwnerTypeDef,PaginatorConfigTypeDef,PermissionConfigurationTypeDef,PortProbeActionTypeDef,PortProbeDetailTypeDef,PrivateIpAddressDetailsTypeDef,ProductCodeTypeDef,PublicAccessTypeDef,RemoteIpDetailsTypeDef,RemotePortDetailsTypeDef,ResourceTypeDef,S3BucketDetailTypeDef,S3LogsConfigurationResultTypeDef,S3LogsConfigurationTypeDef,SecurityGroupTypeDef,ServiceTypeDef,SortCriteriaTypeDef,StartMonitoringMembersResponseTypeDef,StopMonitoringMembersResponseTypeDef,TagTypeDef,ThreatIntelligenceDetailTypeDef,TotalTypeDef,UnprocessedAccountTypeDef,UpdateFilterResponseTypeDef,UpdateMemberDetectorsResponseTypeDef,UsageAccountResultTypeDef,UsageCriteriaTypeDef,UsageDataSourceResultTypeDef,UsageResourceResultTypeDef,UsageStatisticsTypeDef,)defget_structure()->AccessControlListTypeDef:return{...}

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

推荐PyPI第三方库


热门话题
java什么数据库最类似于Map,每个用户/id存储无限多个“键”和“值”?   java仅使用super pom进行测试   内存不足如何解析java。OutOfMemoryError:Java堆空间在增加堆大小的情况下将意味着延迟OutOfMemoryError   来自另一个类的mysql和java jdbc调用[运行时应用程序]   java通过下拉菜单更改搜索框搜索的内容   JAVAlang.ClassNotFoundException:sun。jdbc。odbc。JdbcOdbcDriver   java Selenium点击链接   JavaSpringHibernate:从唯一值列表中获取对象列表   java Bing广告与桌面身份验证问题   java如何在没有任何外部SDK的情况下从安卓打印到收据打印机?   未调用java菜单片段类   java在IDEA和PyCharm中同时为同一个项目工作   java我们如何为同一个异常提供不同的海关信息   jakarta ee中是否预定义了“请求”和“响应”变量或值?   java更好地解决“之前和之后”难题?   尝试将数据从Excel添加到Java   发送电子邮件的Java代码只适用于一个电子邮件id?   java如何从资产解析XML?