{"id":2609,"library":"mypy-boto3-scheduler","title":"Type Annotations for boto3 EventBridgeScheduler","description":"mypy-boto3-scheduler provides type annotations for the boto3 EventBridgeScheduler service, currently at version 1.42.3. These stubs are generated by mypy-boto3-builder (version 8.12.0) and are designed to enhance type checking for boto3 code with tools like mypy, pyright, and various IDEs. The mypy-boto3-builder project has a rapid release cadence, frequently updating stubs to match boto3 releases and introducing new features or breaking changes.","status":"active","version":"1.42.3","language":"en","source_language":"en","source_url":"https://github.com/youtype/mypy_boto3_builder","tags":["boto3","aws","mypy","type-checking","stubs","eventbridgescheduler","aws-sdk"],"install":[{"cmd":"pip install mypy-boto3-scheduler","lang":"bash","label":"Install standalone stubs"},{"cmd":"pip install 'boto3-stubs[scheduler]'","lang":"bash","label":"Install with boto3-stubs meta-package"}],"dependencies":[{"reason":"Provides the AWS SDK runtime functionality that these stubs type-check.","package":"boto3"},{"reason":"A static type checker that utilizes these stubs for code analysis.","package":"mypy","optional":true},{"reason":"Another static type checker that utilizes these stubs for code analysis, often integrated into IDEs.","package":"pyright","optional":true}],"imports":[{"note":"The client is typically available directly under the top-level package for convenience. Importing from `mypy_boto3_scheduler.client` is also valid but less common for the primary client.","wrong":"from mypy_boto3_scheduler.client import EventBridgeSchedulerClient","symbol":"EventBridgeSchedulerClient","correct":"from mypy_boto3_scheduler import EventBridgeSchedulerClient"}],"quickstart":{"code":"import boto3\nfrom mypy_boto3_scheduler import EventBridgeSchedulerClient\n\ndef get_scheduler_client() -> EventBridgeSchedulerClient:\n    \"\"\"Returns a type-hinted EventBridgeScheduler client.\"\"\"\n    # boto3.client('scheduler') without explicit type annotation\n    # would return a 'Client' type, losing type-checking benefits.\n    client: EventBridgeSchedulerClient = boto3.client(\"scheduler\")\n    return client\n\nif __name__ == \"__main__\":\n    # Example usage: List schedules\n    scheduler_client = get_scheduler_client()\n    try:\n        response = scheduler_client.list_schedules(MaxResults=1)\n        print(\"Successfully listed schedules.\")\n        for schedule in response.get('Schedules', []):\n            print(f\" - {schedule.get('Name')}\")\n    except Exception as e:\n        print(f\"Error listing schedules: {e}\")","lang":"python","description":"This quickstart demonstrates how to import the `EventBridgeSchedulerClient` type and use it to explicitly type-hint your `boto3` client. This enables static type checking and provides rich IDE auto-completion for all client methods and their arguments."},"warnings":[{"fix":"Upgrade your Python environment to 3.9 or higher.","message":"The `mypy-boto3-builder` (which generates this stub) removed support for Python 3.8. All generated stubs from builder version 8.12.0 onwards require Python 3.9 or newer.","severity":"breaking","affected_versions":"mypy-boto3-builder>=8.12.0"},{"fix":"Review and update type definition names in your code if you were explicitly referencing them.","message":"The `mypy-boto3-builder 8.9.0` introduced breaking changes in how TypeDef names are generated. Type definitions for packed method arguments might have shorter names (e.g., `CreateDistributionRequestRequestTypeDef` became `CreateDistributionRequestTypeDef`). Conflicting `Extra` postfixes were also moved to the end.","severity":"breaking","affected_versions":"mypy-boto3-builder>=8.9.0"},{"fix":"Migrate usage to the `pinpoint-sms-voice` service and its corresponding stubs.","message":"The `sms-voice` service was removed from the `mypy-boto3` ecosystem in `mypy-boto3-builder 8.11.0`. Users should switch to `pinpoint-sms-voice` instead. While this specifically impacts `sms-voice` stubs, it's a relevant deprecation policy for the broader `mypy-boto3` project.","severity":"deprecated","affected_versions":"mypy-boto3-builder>=8.11.0"},{"fix":"Add `else: YourClient = object` for conditional imports: `if TYPE_CHECKING: from mypy_boto3_service import YourClient else: YourClient = object`.","message":"When using `typing.TYPE_CHECKING` guards to conditionally import stubs for Pylint, it might report undefined variables. To resolve this, ensure that types are set to `object` in the non-`TYPE_CHECKING` branch.","severity":"gotcha","affected_versions":"All"},{"fix":"Always explicitly annotate the client or resource variable with the imported stub type, e.g., `client: EventBridgeSchedulerClient = boto3.client(\"scheduler\")`.","message":"For `mypy-boto3-lite` or standalone packages like this one, explicit type annotations are often necessary for `boto3.Session().client()` and `boto3.Session().resource()` calls to ensure full IDE auto-completion and type inference, even if `mypy` might sometimes infer them.","severity":"gotcha","affected_versions":"All"}],"env_vars":null,"last_verified":"2026-04-10T00:00:00.000Z","next_check":"2026-07-09T00:00:00.000Z"}