Registry / type-stubs / mypy-boto3-discovery

mypy-boto3-discovery

JSON →
library1.43.0pypypi✓ verified 23d ago

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-discovery
INSTALL
IMPORT
SIG · MYPY-BOTO3-DISCOVE
M
mypy-boto3-discovery
type-stubspythonv1.43.0
Install
3.4s avg
Import
Disk
18MB
Pass rate
10/ 10
Env Coverage10 / 10
glibc
3.93.13
musl
3.93.13
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
musl
py 3.103.910 runs
installs and imports cleanly · install 0.0s · import 0.000s · 19.8MB
glibc
py 3.103.910 runs
installs and imports cleanly · install 3.4s · import 0.000s · 20MB
18MB installed
● package 18MB
Code
Verified usage

Verified import paths — ran on the pinned version, not inferred.

ApplicationDiscoveryServiceClient
from mypy_boto3_discovery.client import ApplicationDiscoveryServiceClient
from mypy_boto3_discovery import ApplicationDiscoveryServiceClient
ServiceResource
from mypy_boto3_discovery.service_resource import ServiceResource
Client
from mypy_boto3_discovery.client import Client

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.

import boto3 from mypy_boto3_discovery.client import ApplicationDiscoveryServiceClient from mypy_boto3_discovery.type_defs import DescribeAgentsResponseTypeDef, AgentInfoTypeDef import os def list_discovery_agents() -> None: # Using type hints for the boto3 client client: ApplicationDiscoveryServiceClient = boto3.client( "discovery", region_name=os.environ.get('AWS_REGION', 'us-east-1') ) try: # The response object is type-hinted response: DescribeAgentsResponseTypeDef = client.describe_agents() agents: list[AgentInfoTypeDef] = response.get("agents", []) if agents: print("Discovery Agents:") for agent in agents: print(f" Agent ID: {agent.get('agentId')}") print(f" Agent Status: {agent.get('agentStatus')}") print(f" Host Name: {agent.get('hostName')}") print(f" Version: {agent.get('version')}") print(f" IP Address: {agent.get('agentIp')}") else: print("No discovery agents found.") except Exception as e: print(f"Error describing agents: {e}") if __name__ == "__main__": # Ensure AWS credentials are configured (e.g., via environment variables or ~/.aws/credentials) # and that the IAM user/role has permissions for 'discovery:DescribeAgents'. list_discovery_agents()
Debug
Known issues
breakingStarting with version 8.12.0, support for Python 3.8 has been removed. Projects using this library must upgrade to Python 3.9 or newer.
fix
Upgrade your Python environment to 3.9 or later. Consider using a virtual environment manager like `pyenv` or `conda`.
affects: >=8.12.0
breakingVersion 8.12.0 migrated all `mypy-boto3-*` packages to PEP 561-compliant distribution. While `pip install` generally works, advanced `mypy` configurations or custom build systems that directly manipulate stub files might require adjustments.
fix
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.
affects: >=8.12.0
gotchaThis package provides only type stubs. You must install the `boto3` library separately for your application to function at runtime. Type checkers will use these stubs, but `boto3` is the actual dependency for AWS SDK functionality.
fix
Always install `boto3` (e.g., `pip install boto3`) alongside `mypy-boto3-discovery` or `boto3-stubs`.
affects: All
gotchaFor the most accurate type checking, it is crucial to keep your `boto3` library version and your `mypy-boto3-*` stub versions in sync. Significant version discrepancies can lead to incorrect type hints or missing attributes as AWS services evolve.
fix
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.
affects: All
Upgrade
Version history
1.43.0latest on PyPI · released Apr 29, 2026
Audit
Dependencies
boto3requiredRequired at runtime to use the AWS SDK. This package only provides type stubs.
Agent activity
25 hits · last 30 days
node
20
OpenAI (training)
2
Resources
mypy-boto3-discovery — pip install mypy-boto3-discovery · libregistry