Registry / type-stubs / mypy-boto3-servicediscovery

mypy-boto3-servicediscovery

JSON →
library1.43.48pypypi✓ verified 23d ago

mypy-boto3-servicediscovery provides high-quality type annotations for the `boto3` ServiceDiscovery client, paginators, and type definitions. It is part of the `boto3-stubs` project, generated by `mypy-boto3-builder 8.12.0`, and is currently at version 1.42.3. The project maintains an active release cadence, frequently updating to match new `boto3` versions and incorporate fixes.

pip install mypy-boto3-servicediscovery
INSTALL
IMPORT
SIG · MYPY-BOTO3-SERVICE
M
mypy-boto3-servicediscovery
type-stubspythonv1.43.48
Install
3.5s 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.48 · 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.5s · import 0.000s · 20MB
18MB installed
● package 18MB
Code
Verified usage

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

ServiceDiscoveryClient
from mypy_boto3_servicediscovery import ServiceDiscoveryClient
from mypy_boto3_servicediscovery import ServiceDiscoveryClient

This quickstart demonstrates how to use `mypy-boto3-servicediscovery` to obtain a type-hinted ServiceDiscovery client from `boto3.client`. It then calls `list_namespaces` and leverages the provided type definitions for the response, enhancing code completion and static analysis.

import boto3 from mypy_boto3_servicediscovery import ServiceDiscoveryClient from mypy_boto3_servicediscovery.type_defs import ListNamespacesResponseTypeDef def get_servicediscovery_namespaces() -> list[str]: # Explicit type annotation for better IDE support and type checking client: ServiceDiscoveryClient = boto3.client("servicediscovery") # The response object is also type-hinted response: ListNamespacesResponseTypeDef = client.list_namespaces() namespace_names = [ns['Name'] for ns in response.get('Namespaces', []) if 'Name' in ns] return namespace_names if __name__ == "__main__": # This code requires AWS credentials to be configured (e.g., via AWS CLI, env vars) # If no namespaces exist, it will return an empty list. try: namespaces = get_servicediscovery_namespaces() print(f"ServiceDiscovery Namespaces: {namespaces}") except Exception as e: print(f"An error occurred: {e}")
Debug
Known issues
breakingSupport for Python 3.8 has been officially removed starting with `mypy-boto3-builder 8.12.0` (which generated this package version). Users on Python 3.8 will encounter compatibility issues.
fix
Upgrade your Python environment to 3.9 or newer.
affects: >= 1.42.0 (generated by builder 8.12.0)
breakingType definition (TypeDef) naming conventions were changed in `mypy-boto3-builder 8.9.0`. Shorter names are now preferred, and 'Extra' postfixes are moved. For example, `CreateDistributionRequestRequestTypeDef` became `CreateDistributionRequestTypeDef`. If your code explicitly references these generated TypeDefs, it will break.
fix
Review and update your explicit TypeDef references according to the new naming conventions, or rely on implicit type inference where possible.
affects: >= 1.42.0 (generated by builder 8.9.0+)
breakingThe entire `mypy-boto3-builder` ecosystem migrated to PEP 561 compliant packages in `8.12.0`. While this improves type checker discovery, it might affect custom build or package management setups that relied on older distribution methods.
fix
Ensure your environment uses standard `pip install` or compatible tools. If encountering issues, refer to the `boto3-stubs` documentation for detailed installation and usage instructions.
affects: >= 1.42.0 (generated by builder 8.12.0)
gotchaFor Pylint compatibility when using the `TYPE_CHECKING` flag to conditionally import types, Pylint might complain about undefined variables. A common workaround is to set types to `object` in the `else` branch.
fix
Implement the `if TYPE_CHECKING:` block with an `else` branch that assigns `object` to the type symbols to avoid Pylint errors. Example: `if TYPE_CHECKING: from mypy_boto3_ec2 import EC2Client else: EC2Client = object`.
affects: All versions
gotchaAlthough `boto3-stubs` offers implicit type discovery, explicit type annotations for `boto3.client(...)` and `session.client(...)` calls (e.g., `client: ServiceDiscoveryClient = session.client("servicediscovery")`) are highly recommended for optimal IDE auto-completion and robust static analysis.
fix
Add explicit type annotations for client and resource objects when instantiating them from `boto3` or a `Session`.
affects: All versions
Upgrade
Version history
1.43.48latest on PyPI · released Jul 14, 2026
Audit
Dependencies
boto3requiredThis package provides type annotations for boto3's ServiceDiscovery client; boto3 itself is a runtime dependency for your application.
Agent activity
23 hits · last 30 days
node
20
OpenAI (training)
1
Resources
mypy-boto3-servicediscovery — pip install mypy-boto3-servicediscovery · libregistry