This package provides type annotations for the AWS boto3 client for the ApplicationDiscoveryService service. It ensures static type checking with tools like MyPy, catching potential errors before runtime. As of version 1.42.3, it is actively maintained and released in sync with `botocore` updates, typically multiple times a month.
pip install mypy-boto3-discoveryVerified import paths — ran on the pinned version, not inferred.
This example demonstrates how to initialize a type-hinted `ApplicationDiscoveryServiceClient` and call `describe_agents`. It uses `os.environ.get` for region to make it runnable without hardcoding. Remember to configure AWS credentials and ensure the necessary IAM permissions are granted.
Upgrade your Python environment to 3.9 or later. Consider using a virtual environment manager like `pyenv` or `conda`.
Ensure your `mypy` configuration correctly points to installed packages. If experiencing issues, verify the `py.typed` marker file exists in the installed package. Re-evaluate any custom stub file paths or `mypy` plugins.
Always install `boto3` (e.g., `pip install boto3`) alongside `mypy-boto3-discovery` or `boto3-stubs`.
Regularly update both `boto3` and your `mypy-boto3-discovery` (or `boto3-stubs`) packages. Consider pinning versions in your `requirements.txt` to ensure compatibility across your development team and CI/CD.