Registry /
type-stubs / mypy-boto3-appconfigdata
Install & Compatibility
Where this runs
tested against v1.43.0 · pip install
no network on importno background threads
Install × environment matrix
Each cell = how many times install + import succeeded across repeated harness runs. Partial = flaky.
glibc = Debian/Ubuntu slim · musl = Alpine Linux
muslpy 3.10–3.910 runs
installs and imports cleanly · install 0.0s · import 0.000s · 19.6MB
glibcpy 3.10–3.910 runs
installs and imports cleanly · install 3.3s · import 0.000s · 20MB
18MB installed
● package 18MB
Code
Verified usage
Verified import paths — ran on the pinned version, not inferred.
AppConfigDataClient
✓ from mypy_boto3_appconfigdata import AppConfigDataClient
✗ from mypy_boto3_appconfigdata import AppConfigDataClient
This quickstart demonstrates how to use the `mypy-boto3-appconfigdata` type annotations with a boto3 AppConfigData client. It shows how to initialize the client with type hints, start a configuration session, and retrieve the latest configuration, including the use of generated TypedDicts for method parameters. Environment variables are used for AWS credentials for runnable examples.
import boto3
from mypy_boto3_appconfigdata import AppConfigDataClient
from mypy_boto3_appconfigdata.type_defs import GetLatestConfigurationRequestTypeDef
import os
def get_configuration_data(application: str, environment: str, configuration: str, client_id: str) -> dict:
session = boto3.Session(
aws_access_key_id=os.environ.get('AWS_ACCESS_KEY_ID', 'DUMMY_KEY'),
aws_secret_access_key=os.environ.get('AWS_SECRET_ACCESS_KEY', 'DUMMY_SECRET'),
region_name=os.environ.get('AWS_REGION', 'us-east-1')
)
client: AppConfigDataClient = session.client("appconfigdata")
# First, start a session to get a configuration token
start_session_params = {
"ApplicationIdentifier": application,
"ConfigurationIdentifier": configuration,
"ClientConfigurationVersion": "1.0" # Example version, replace as needed
}
start_session_response = client.start_configuration_session(**start_session_params)
configuration_token = start_session_response["InitialConfigurationToken"]
# Then, get the latest configuration using the token
get_config_params: GetLatestConfigurationRequestTypeDef = {
"ConfigurationToken": configuration_token
}
response = client.get_latest_configuration(**get_config_params)
# The configuration is returned as a streaming body
if 'Configuration' in response and response['Configuration']:
config_data = response['Configuration'].read().decode('utf-8')
print(f"Received configuration: {config_data}")
return {"data": config_data, "content_type": response.get('ContentType')}
return {}
# Example usage (will use dummy credentials if env vars are not set)
if __name__ == "__main__":
# These values would typically come from your AppConfig setup
app_id = "MyApplication"
env_id = "MyEnvironment"
config_id = "MyConfigurationProfile"
client_id = "my-unique-client"
print("Attempting to get AppConfig data...")
config = get_configuration_data(app_id, env_id, config_id, client_id)
if config:
print("Successfully retrieved configuration.")
else:
print("Failed to retrieve configuration or no configuration found.")
Debug
Known issues
breakingVersion 8.12.0 of the underlying `mypy-boto3-builder` (which generates this stub package) removed support for Python 3.8. Users on Python 3.8 must upgrade their Python version.fixUpgrade your Python environment to 3.9 or newer. Consider using Python 3.9+.
affects: mypy-boto3-builder >=8.12.0
breakingWith `mypy-boto3-builder` version 8.9.0, some TypeDef naming conventions changed (e.g., `CreateDistributionRequestRequestTypeDef` became `CreateDistributionRequestTypeDef`). While specific to other services, similar changes may occur in AppConfigData type definitions in future updates, requiring code adjustments.fixReview type definition imports and usages after upgrading. IDEs with type checking will highlight incorrect names.
affects: mypy-boto3-builder >=8.9.0, mypy-boto3-appconfigdata potentially affected by future builder releases
gotchaPylint may complain about undefined variables when using `TYPE_CHECKING` guards to conditionally import stubs. This happens if the `else` branch does not define the types (e.g., `Client = object`).fixIn the `else` block of your `if TYPE_CHECKING:` statement, explicitly set the imported types to `object` to satisfy Pylint. E.g., `else: AppConfigDataClient = object`.
affects: All versions when using `TYPE_CHECKING` with Pylint
gotchaPyCharm users might experience slow performance with `Literal` overloads in `boto3-stubs`. This is a known issue (PY-40997) within PyCharm itself.fixIf performance is an issue, consider installing the `boto3-stubs-lite[appconfigdata]` package instead, which is more RAM-friendly but requires more explicit type annotations. Alternatively, disable PyCharm's type checker and rely solely on external tools like mypy.
affects: All versions when used with affected PyCharm versions
Upgrade
Version history
1.43.0latest on PyPI · released Apr 29, 2026
Audit
Dependencies
boto3requiredRuntime dependency for the AWS SDK, these are type stubs for it.
mypyoptionalPrimary static type checker this library is designed for.
pythonrequiredRequires Python 3.9 or newer.