Registry / type-stubs / mypy-boto3-gamelift

mypy-boto3-gamelift

JSON →
library1.43.66pypypi✓ verified 23d ago

mypy-boto3-gamelift provides comprehensive type annotations for the boto3 AWS GameLift service. It enhances development experience by enabling static type checking for GameLift client methods and response/request structures. Currently at version 1.42.82, it is generated by the mypy-boto3-builder and generally releases new versions in sync with upstream boto3 and builder updates.

pip install mypy-boto3-gamelift boto3
INSTALL
IMPORT
SIG · MYPY-BOTO3-GAMELIF
M
mypy-boto3-gamelift
type-stubspythonv1.43.66
Install
3.8s avg
Import
687ms
Disk
51MB
Pass rate
10/ 10
Env Coverage10 / 10
glibc
3.93.13
musl
3.93.13
Install & Compatibility
Where this runs
tested against v1.43.66 · 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.95 runs
installs and imports cleanly · install 0.0s · import 0.724s · 52.5MB
glibc
py 3.103.95 runs
installs and imports cleanly · install 3.8s · import 0.650s · 53MB
51MB installed
● package 51MB
Code
Verified usage

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

GameLiftClient
from mypy_boto3_gamelift import GameLiftClient
from boto3.client import GameLiftClient
Type stubs are provided by mypy-boto3-gamelift, not directly by boto3 itself.
Client
from mypy_boto3_gamelift import Client
Client is a common alias for the service client type.
CreateGameSessionInputRequestTypeDef
from mypy_boto3_gamelift.type_defs import CreateGameSessionInputRequestTypeDef
from mypy_boto3_gamelift.type_defs import CreateGameSessionRequestRequestTypeDef
Type definition naming conventions were adjusted in builder v8.9.0, leading to shorter names for some TypeDefs.

This quickstart demonstrates how to initialize a type-hinted AWS GameLift client and use it to create a game session. It showcases importing the `Client` type and an example `TypeDef` for request parameters, ensuring static type checking for your boto3 interactions.

import boto3 from mypy_boto3_gamelift import Client from typing import TYPE_CHECKING # Best practice: use TYPE_CHECKING for type imports to avoid runtime import overhead if TYPE_CHECKING: from mypy_boto3_gamelift.type_defs import CreateGameSessionInputRequestTypeDef def create_gamelift_session(alias_id: str, capacity: int, region: str = "us-east-1") -> dict: client: Client = boto3.client("gamelift", region_name=region) # Example using a typed request body (if TYPE_CHECKING is True) request_body: 'CreateGameSessionInputRequestTypeDef' = { 'MaximumPlayerSessionCount': capacity, 'AliasId': alias_id # 'FleetId': 'YOUR_FLEET_ID' # Add FleetId if not using AliasId } try: response = client.create_game_session(**request_body) print(f"Game session created: {response['GameSession']['GameSessionId']}") return response except client.exceptions.ConflictException as e: print(f"Error creating game session: {e}") raise except Exception as e: print(f"An unexpected error occurred: {e}") raise # Example usage (replace with actual values): # if __name__ == "__main__": # try: # create_gamelift_session(alias_id="alias-xxxxxxx", capacity=10, region="us-west-2") # except Exception: # print("Failed to create game session.")
Debug
Known issues
breakingSupport for Python 3.8 was removed from `mypy-boto3-builder` (and consequently generated `mypy-boto3` packages including `mypy-boto3-gamelift`) in version 8.12.0.
fix
Upgrade your Python environment to 3.9 or higher. The package's `requires_python` metadata is `>=3.9`.
affects: mypy-boto3-gamelift >= 1.42.82 (generated by builder >= 8.12.0)
gotchaThis package provides only type annotations. The actual `boto3` library is a separate runtime dependency and must be installed alongside `mypy-boto3-gamelift` for your code to execute.
fix
Ensure `pip install boto3` is run in your project's environment.
affects: All versions
breakingType Definition (TypeDef) names for request/response bodies were sometimes shortened or had postfixes reordered in `mypy-boto3-builder` version 8.9.0. If you explicitly imported specific `type_defs` in previous versions, these names may have changed.
fix
Review your code for direct imports of specific `type_defs` and adjust names according to the latest generated stubs. Consult `mypy-boto3-builder` release notes for details on affected naming patterns.
affects: mypy-boto3-gamelift >= 1.42.82 (generated by builder >= 8.9.0)
gotchaThe `mypy-boto3` ecosystem closely tracks AWS service APIs. Specific services may be renamed or removed from generation (e.g., `sms-voice` was removed in builder v8.11.0). Be aware of potential service availability changes when upgrading major `boto3` or `mypy-boto3` versions.
fix
Refer to the `mypy-boto3-builder` release notes or `boto3` documentation for any service-specific changes when upgrading.
affects: All versions
Upgrade
Version history
1.43.66latest on PyPI · released Aug 7, 2026
Audit
Dependencies
boto3requiredThis package provides type stubs for boto3; boto3 itself is required for runtime execution.
Agent activity
12 hits · last 30 days
node
10
OpenAI (training)
1
Resources
mypy-boto3-gamelift — pip install mypy-boto3-gamelift · libregistry