Type annotations for boto3.ConfigService 1.14.37 service, generated by mypy-boto3-buider 2.2.0
Project description
mypy-boto3-config
Type annotations for boto3.ConfigService 1.14.37 service compatible with mypy, VSCode, PyCharm and other tools.
Generated by mypy-boto3-buider 2.2.0.
More information can be found on boto3-stubs page.
How to install
Make sure you have mypy installed and activated in your IDE.
Install boto3-stubs
for ConfigService
service.
python -m pip install boto3-stubs[config]
How to use
Client annotations
ConfigServiceClient
provides annotations for boto3.client("config")
.
import boto3
from mypy_boto3_config import ConfigServiceClient
from mypy_boto3_config.paginator import (
DescribeAggregateComplianceByConfigRulesPaginator,
DescribeAggregationAuthorizationsPaginator,
DescribeComplianceByConfigRulePaginator,
DescribeComplianceByResourcePaginator,
DescribeConfigRuleEvaluationStatusPaginator,
DescribeConfigRulesPaginator,
DescribeConfigurationAggregatorSourcesStatusPaginator,
DescribeConfigurationAggregatorsPaginator,
DescribePendingAggregationRequestsPaginator,
DescribeRemediationExecutionStatusPaginator,
DescribeRetentionConfigurationsPaginator,
GetAggregateComplianceDetailsByConfigRulePaginator,
GetComplianceDetailsByConfigRulePaginator,
GetComplianceDetailsByResourcePaginator,
GetResourceConfigHistoryPaginator,
ListAggregateDiscoveredResourcesPaginator,
ListDiscoveredResourcesPaginator,
)
from mypy_boto3_config.type_defs import AccountAggregationSourceTypeDef, ...
client: ConfigServiceClient = boto3.client("config")
# now client usage is checked by mypy and IDE should provide code auto-complete
# works for session as well
session = boto3.session.Session(region="us-west-1")
session_client: ConfigServiceClient = session.client("config")
Paginators annotations
mypy_boto3_config.paginator
module contains type annotations for all paginators.
client: ConfigServiceClient = boto3.client("config")
# Explicit type annotations are optional here
# Type should be correctly discovered by mypy and IDEs
# VSCode requires explicit type annotations
describe_aggregate_compliance_by_config_rules_paginator: DescribeAggregateComplianceByConfigRulesPaginator = client.get_paginator("describe_aggregate_compliance_by_config_rules")
describe_aggregation_authorizations_paginator: DescribeAggregationAuthorizationsPaginator = client.get_paginator("describe_aggregation_authorizations")
describe_compliance_by_config_rule_paginator: DescribeComplianceByConfigRulePaginator = client.get_paginator("describe_compliance_by_config_rule")
describe_compliance_by_resource_paginator: DescribeComplianceByResourcePaginator = client.get_paginator("describe_compliance_by_resource")
describe_config_rule_evaluation_status_paginator: DescribeConfigRuleEvaluationStatusPaginator = client.get_paginator("describe_config_rule_evaluation_status")
describe_config_rules_paginator: DescribeConfigRulesPaginator = client.get_paginator("describe_config_rules")
describe_configuration_aggregator_sources_status_paginator: DescribeConfigurationAggregatorSourcesStatusPaginator = client.get_paginator("describe_configuration_aggregator_sources_status")
describe_configuration_aggregators_paginator: DescribeConfigurationAggregatorsPaginator = client.get_paginator("describe_configuration_aggregators")
describe_pending_aggregation_requests_paginator: DescribePendingAggregationRequestsPaginator = client.get_paginator("describe_pending_aggregation_requests")
describe_remediation_execution_status_paginator: DescribeRemediationExecutionStatusPaginator = client.get_paginator("describe_remediation_execution_status")
describe_retention_configurations_paginator: DescribeRetentionConfigurationsPaginator = client.get_paginator("describe_retention_configurations")
get_aggregate_compliance_details_by_config_rule_paginator: GetAggregateComplianceDetailsByConfigRulePaginator = client.get_paginator("get_aggregate_compliance_details_by_config_rule")
get_compliance_details_by_config_rule_paginator: GetComplianceDetailsByConfigRulePaginator = client.get_paginator("get_compliance_details_by_config_rule")
get_compliance_details_by_resource_paginator: GetComplianceDetailsByResourcePaginator = client.get_paginator("get_compliance_details_by_resource")
get_resource_config_history_paginator: GetResourceConfigHistoryPaginator = client.get_paginator("get_resource_config_history")
list_aggregate_discovered_resources_paginator: ListAggregateDiscoveredResourcesPaginator = client.get_paginator("list_aggregate_discovered_resources")
list_discovered_resources_paginator: ListDiscoveredResourcesPaginator = client.get_paginator("list_discovered_resources")
Typed dictionations
mypy_boto3_config.type_defs
module contains structures and shapes assembled
to typed dictionaries for additional type checking.
def get_structure() -> AccountAggregationSourceTypeDef:
return {
...
}
Dynamic type annotations
mypy_boto3
command generates boto3.client/resource
type annotations for
mypy_boto3_config
and other installed services.
# Run this command after you add or remove service packages
python -m mypy_boto3
Generated type annotations provide overloads for boto3.client
and boto3.resource
,
boto3.Session.client
and boto3.Session.resource
functions,
so explicit type annotations are not needed.
mypy
supports function overloads as expectedPyCharm
also supports function overloads, but consumes a lot of RAM, use carefully if you have many services installedVSCode
does not currently support function overloads, use explicit type annotations
# Type is discovered correctly by mypy and PyCharm
# VSCode still needs explicit type annotations
client = boto3.client("config")
session_client = boto3.Session().client("config")
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Hashes for mypy-boto3-config-1.14.37.0.tar.gz
Algorithm | Hash digest | |
---|---|---|
SHA256 | fab80efb46f9d4022c76bbc25c1ceb2f21895f72bf22b28a76667aab4247625e |
|
MD5 | fb71a43ffa93d6b179a1e67318e37f79 |
|
BLAKE2b-256 | d7af59506ba704d02c6fc73b2f519b203d0ccc4af9252d3b774dbd9800805fae |
Hashes for mypy_boto3_config-1.14.37.0-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 9edc9677f57871ed80d25a332a4c69c7b0811a0ee375828f29fb7360620e9c87 |
|
MD5 | cca8f4d1d344a75a87ea84850f3f7efb |
|
BLAKE2b-256 | 5893c8d421a0f96a1d5ed954a9528d4a3a34479293a8fb673a95404abb8925eb |