Type annotations for boto3.ConfigService 1.14.21 service, generated by mypy-boto3-buider 2.2.0
Project description
mypy-boto3-config
Type annotations for boto3.ConfigService 1.14.21 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.21.0.tar.gz
Algorithm | Hash digest | |
---|---|---|
SHA256 | ba14e7818c83e31ec51636bf2f57e0d635937304689a4ba15d150b65e24b8497 |
|
MD5 | e908fc4449f9c724fa6464fc4b8a2132 |
|
BLAKE2b-256 | 69a24968d5b731220da7d1a3a9667243bbabb91d286269ad475d5a14012ec99c |
Hashes for mypy_boto3_config-1.14.21.0-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | f4d39227d04e92383b7730249b9ab101365d893baaf104cf038bd59d3406fb4e |
|
MD5 | 1a7ee1692df0bbc032c3807a2001b179 |
|
BLAKE2b-256 | e1cb3ce80f30833783ffce54bc83b1824303c246f2e477603f89dc35cb0a5b7e |