mypy-boto3-license-manager-linux-subscriptions type stubs

1.42.3 · active · verified Sat Apr 11

This library provides PEP 561 type annotations for the `boto3` AWS LicenseManagerLinuxSubscriptions service. It enables static type checking tools like MyPy to validate code interacting with this specific AWS service, catching potential errors at development time. The current version is 1.42.3, generated by `mypy-boto3-builder` 8.12.0, with frequent updates aligned with `boto3` releases and `mypy-boto3-builder` enhancements.

Warnings

Install

Imports

Quickstart

This example demonstrates how to use `boto3.client` with type hints from `mypy-boto3-license-manager-linux-subscriptions`. The `TYPE_CHECKING` block ensures that the stub imports are only active during type checking, avoiding runtime import errors if the stub package is not installed in the runtime environment. This allows type checkers to validate the usage of the License Manager Linux Subscriptions client and its responses.

import boto3
from typing import TYPE_CHECKING

if TYPE_CHECKING:
    from mypy_boto3_license_manager_linux_subscriptions import Client
    from mypy_boto3_license_manager_linux_subscriptions.type_defs import GetServiceSettingsResponseTypeDef

def get_license_settings() -> GetServiceSettingsResponseTypeDef:
    # mypy-boto3 provides type hints for the boto3 client
    client: Client = boto3.client("license-manager-linux-subscriptions")
    response = client.get_service_settings()
    print(f"License settings: {response}")
    return response

if __name__ == '__main__':
    # Example usage (ensure AWS credentials are configured)
    try:
        get_license_settings()
    except Exception as e:
        print(f"An error occurred: {e}")

view raw JSON →