Registry /
type-stubs / mypy-boto3-service-quotas
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.95 runs
installs and imports cleanly · install 0.0s · import 0.622s · 52MB
glibcpy 3.10–3.95 runs
installs and imports cleanly · install 4.0s · import 0.560s · 52MB
50MB installed
● package 50MB
Code
Verified usage
Verified import paths — ran on the pinned version, not inferred.
ServiceQuotasClient
✓ from mypy_boto3_service_quotas.client import ServiceQuotasClient
ListServiceQuotasOutputTypeDef
✓ from mypy_boto3_service_quotas.type_defs import ListServiceQuotasOutputTypeDef
✗ from mypy_boto3_service_quotas.client import ListServiceQuotasOutputTypeDef
Type definitions (TypedDicts) are found in the `type_defs` submodule, not directly under `client`.
This quickstart demonstrates how to initialize a typed ServiceQuotas client and make a basic API call to list service quotas, leveraging type hints for improved code quality and IDE support. It includes a fallback for dummy AWS credentials if not already configured, making it directly runnable for testing type checking.
import os
from typing import TYPE_CHECKING
import boto3
# For runtime, boto3 client usually works without explicit import from stubs
# For type checking, import the specific client and type defs
if TYPE_CHECKING:
from mypy_boto3_service_quotas.client import ServiceQuotasClient
from mypy_boto3_service_quotas.type_defs import ListServiceQuotasOutputTypeDef
def get_service_quotas_client() -> "ServiceQuotasClient":
"""Returns a typed Service Quotas client."""
# This assumes AWS credentials are configured via environment variables,
# shared credentials file, or IAM role.
return boto3.client(
"service-quotas", region_name=os.environ.get("AWS_REGION", "us-east-1")
)
def list_quotas():
"""Lists service quotas and prints the first few."""
client = get_service_quotas_client()
try:
response: "ListServiceQuotasOutputTypeDef" = client.list_service_quotas(
ServiceCode="ec2" # Example service code, change as needed
)
quotas = response.get("Quotas", [])
if quotas:
print(f"Found {len(quotas)} EC2 quotas. First 3:")
for quota in quotas[:3]:
print(f"- {quota.get('QuotaName')}: {quota.get('Value')} {quota.get('Unit')}")
else:
print("No EC2 quotas found for 'ec2' service code.")
except Exception as e:
print(f"Error listing quotas: {e}")
if __name__ == "__main__":
# Set dummy AWS credentials for local testing without actual auth
# In a real scenario, these would be properly configured.
if "AWS_ACCESS_KEY_ID" not in os.environ:
os.environ["AWS_ACCESS_KEY_ID"] = os.environ.get("AWS_ACCESS_KEY_ID", "TEST_KEY")
os.environ["AWS_SECRET_ACCESS_KEY"] = os.environ.get("AWS_SECRET_ACCESS_KEY", "TEST_SECRET")
os.environ["AWS_SESSION_TOKEN"] = os.environ.get("AWS_SESSION_TOKEN", "TEST_TOKEN")
os.environ["AWS_REGION"] = os.environ.get("AWS_REGION", "us-east-1") # Required for many AWS calls
print("Attempting to list service quotas...")
list_quotas()
Debug
Known issues
breakingSupport for Python 3.8 was removed starting with `mypy-boto3-builder` version 8.12.0. Users must upgrade to Python 3.9 or newer.fixUpgrade your Python environment to 3.9 or higher. For older Python versions, you might need to pin `mypy-boto3-service-quotas` to an older, compatible version, though this is not recommended.
affects: >=8.12.0 of mypy-boto3-builder (which generates mypy-boto3-service-quotas versions corresponding to boto3 >=1.42.10)
breakingBreaking changes in TypeDef naming conventions were introduced in `mypy-boto3-builder` 8.9.0. Type definitions for method arguments were shortened (e.g., `CreateDistributionRequestRequestTypeDef` became `CreateDistributionRequestTypeDef`), and conflicting `Extra` postfixes were moved (e.g., `CreateDistributionExtraRequestTypeDef` became `CreateDistributionRequestExtraTypeDef`).fixReview your code for direct usage of generated TypeDefs and update their names according to the new conventions. Consult the specific service's `type_defs.pyi` for the correct names.
affects: >=8.9.0 of mypy-boto3-builder (which generates mypy-boto3-service-quotas versions)
deprecatedIndividual AWS services may be deprecated or replaced by AWS. For example, `sms-voice` was replaced by `pinpoint-sms-voice`. While `service-quotas` has no known deprecation, always check the official AWS documentation for service lifecycle updates.fixMonitor AWS announcements for the services you use. If a service is deprecated, migrate to its successor as recommended by AWS.
affects: N/A (service-specific)
gotchaWhen using `mypy-boto3-service-quotas` with PyCharm, you might experience slow performance due to PyCharm's handling of Literal overloads (issue PY-40997).fixConsider disabling PyCharm's built-in type checker and using external tools like mypy or pyright for type checking, or if available for this specific service, using a 'lite' stub version (e.g., `boto3-stubs-lite`) if one is provided for the service and your usage patterns.
affects: All versions, specifically with PyCharm
gotchaIf you use `TYPE_CHECKING` guards to avoid runtime dependency on `mypy-boto3-service-quotas`, `pylint` might complain about undefined variables. This is because `pylint` does not always respect `TYPE_CHECKING` in the same way type checkers do.fixExplicitly assign `object` to the type-hinted symbols in the non-`TYPE_CHECKING` branch: `if TYPE_CHECKING: from mypy_boto3_service_quotas.client import ServiceQuotasClient else: ServiceQuotasClient = object`.
affects: All versions, when using `TYPE_CHECKING` with Pylint
Upgrade
Version history
1.43.0latest on PyPI · released Apr 29, 2026
Audit
Dependencies
boto3requiredThis package provides type stubs for boto3; boto3 itself must be installed to use the AWS SDK functionality.