Install & Compatibility
Where this runs
tested against v1.43.64 · 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.95 runs
installs and imports cleanly · install 0.0s · import 0.646s · 116.9MB
glibcpy 3.10–3.95 runs
installs and imports cleanly · install 5.8s · import 0.618s · 115MB
114MB installed
● package 114MB
Code
Verified usage
Verified import paths — ran on the pinned version, not inferred.
SSOAdminClient
✓ from mypy_boto3_sso_admin.client import SSOAdminClient
✗ from boto3.client import SSOAdminClient
While `boto3.client` is the runtime source, `mypy-boto3-sso-admin` provides dedicated type imports for comprehensive type hints. Using the `boto3` namespace directly would typically be for `boto3-stubs` not `mypy-boto3-*` packages.
ListInstancesResponseTypeDef
✓ from mypy_boto3_sso_admin.type_defs import ListInstancesResponseTypeDef
TypedDicts for service responses are imported directly from the stub package's `type_defs` module.
This quickstart demonstrates how to initialize a boto3 SSOAdmin client and use its methods with type annotations provided by `mypy-boto3-sso-admin`. It fetches and prints AWS SSO instances.
import boto3
from mypy_boto3_sso_admin.client import SSOAdminClient
from mypy_boto3_sso_admin.type_defs import ListInstancesResponseTypeDef
from os import environ
# Configure AWS credentials, e.g., via environment variables (AWS_ACCESS_KEY_ID, AWS_SECRET_ACCESS_KEY, AWS_REGION)
# or AWS CLI configuration. For this example, AWS_REGION is explicitly pulled from environment.
def get_sso_admin_client() -> SSOAdminClient:
"""Returns a boto3 SSO Admin client with type annotations from mypy-boto3-sso-admin."""
# The actual boto3.client() call returns an untyped client at runtime.
# The 'SSOAdminClient' type hint provides static analysis benefits.
return boto3.client("sso-admin", region_name=environ.get('AWS_REGION', 'us-east-1'))
client: SSOAdminClient = get_sso_admin_client()
try:
print("Attempting to list SSO Admin instances...")
response: ListInstancesResponseTypeDef = client.list_instances()
print("SSO Admin Instances:")
for instance in response.get("Instances", []):
print(f" ARN: {instance.get('InstanceArn')}, Status: {instance.get('Status')}")
except Exception as e:
print(f"Error listing SSO Admin instances: {e}")
print("Ensure AWS credentials and SSO Admin permissions are correctly configured.")
print("This code requires an AWS account with configured SSO Admin instances and appropriate permissions.")
Debug
Known issues
deprecatedThis `mypy-boto3-*` package is considered a 'legacy' stub format. The `mypy-boto3-builder` project officially recommends using the `boto3-stubs` packages (e.g., `pip install 'boto3-stubs[sso-admin]'`) for PEP 561 compliant type checking, which allows simpler imports from the standard `boto3` namespace.fixMigrate to `boto3-stubs[sso-admin]` and import types directly from `boto3` (e.g., `from boto3.client import SSOAdminClient`).
affects: All versions
breakingStarting with `mypy-boto3-builder` version 8.12.0 (which generates this stub package), support for Python 3.8 was removed for all generated packages.fixUpgrade your Python environment to 3.9 or newer.
affects: >=1.42.41 (builder 8.12.0) and later
gotchaType stubs are tightly coupled to the `boto3` library version. Installing `mypy-boto3-sso-admin` for a `boto3` version significantly different from `1.42.41` can lead to incorrect or incomplete type hints.fixAlways install `mypy-boto3-sso-admin` (or `boto3-stubs[sso-admin]`) with a version matching your `boto3` installation as closely as possible. The version number of `mypy-boto3-sso-admin` directly corresponds to the `boto3` version it types.
affects: All versions
breakingIn `mypy-boto3-builder` version 8.9.0, there were breaking changes to TypeDef naming conventions. Specifically, argument TypeDefs were shortened (e.g., `RequestRequestTypeDef` -> `RequestTypeDef`) and conflicting `Extra` postfixes were moved (e.g., `ExtraRequestTypeDef` -> `RequestExtraTypeDef`).fixReview and update your TypeDef import names if upgrading from older stub versions generated by builder < 8.9.0.
affects: <1.42.41 (builder 8.9.0) and earlier
gotchaAlthough `mypy-boto3-sso-admin` imports are explicit, ensure you run `mypy` with the correct configuration to pick up third-party type stubs. For some environments, `mypy` might require `mypy_path` configuration or `enable_incomplete_feature = "Implicit Namespace Packages"`.fixRefer to `mypy` documentation and the `mypy-boto3-builder` README for optimal configuration. Generally, `pip install` makes stubs discoverable automatically.
affects: All versions
Upgrade
Version history
1.43.64latest on PyPI · released Aug 4, 2026
Audit
Dependencies
boto3requiredRequired at runtime for actual AWS API calls, as these are type stubs for boto3.
mypyrequiredThe static type checker for which these type stubs are primarily used.
boto3-stubs[sso-admin]requiredThis package internally depends on and installs the corresponding boto3-stubs version for PEP 561 compliance, though direct imports use the mypy_boto3_sso_admin namespace.