Registry / type-stubs / mypy-boto3-glue

mypy-boto3-glue

JSON →
library1.43.72pypypi✓ verified 24d ago

mypy-boto3-glue provides comprehensive type annotations for the AWS boto3 Glue client, enabling static type checking with tools like MyPy, Pyright, and enhanced IDE auto-completion. It is automatically generated by mypy-boto3-builder and currently aligns with boto3 version 1.42.70, with frequent updates following new boto3 releases.

pip install mypy-boto3-glue boto3
INSTALL
IMPORT
SIG · MYPY-BOTO3-GLUE
M
mypy-boto3-glue
type-stubspythonv1.43.72
Install
5.8s avg
Import
1168ms
Disk
53MB
Pass rate
10/ 10
Env Coverage10 / 10
glibc
3.93.13
musl
3.93.13
Install & Compatibility
Where this runs
tested against v1.43.72 · 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.910 runs
installs and imports cleanly · install 0.0s · import 1.217s · 54.9MB
glibc
py 3.103.910 runs
installs and imports cleanly · install 5.8s · import 1.119s · 55MB
53MB installed
● package 53MB
Code
Verified usage

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

GlueClient
from mypy_boto3_glue.client import GlueClient
Imports the typed client for AWS Glue.
GluePaginator
from mypy_boto3_glue.paginators import ListCrawlersPaginator
Imports typed paginators for specific Glue operations (e.g., ListCrawlersPaginator).
GlueTypeDef
from mypy_boto3_glue.type_defs import JobRunTypeDef
Imports typed dictionaries for Glue service data structures (e.g., JobRunTypeDef).

This quickstart demonstrates how to obtain a type-hinted `GlueClient` using `mypy-boto3-glue`. It leverages the `TYPE_CHECKING` guard to prevent runtime dependency on the stub package, a common practice for production environments. The primary benefit is improved auto-completion and static analysis for Glue service calls.

import boto3 from typing import TYPE_CHECKING from mypy_boto3_glue.client import GlueClient # Ensure boto3 is configured, e.g., via AWS environment variables or ~/.aws/credentials # client = boto3.client('glue') # Inferred type in modern IDEs/mypy def get_typed_glue_client() -> GlueClient: """Returns a type-hinted Glue client.""" return boto3.client('glue') if TYPE_CHECKING: # Example usage with type checking glue_client: GlueClient = get_typed_glue_client() response = glue_client.list_crawlers(MaxResults=10) for crawler in response.get('Crawlers', []): print(f"Crawler Name: {crawler.get('Name')}") print("Glue client configured. Run type checker (e.g., mypy) for full benefits.")
Debug
Known issues
breakingThe underlying `mypy-boto3-builder` (version 8.12.0 and later) removed support for Python 3.8. `mypy-boto3-glue` 1.42.70 and newer officially requires Python 3.9 or higher. Projects on Python 3.8 must pin to an older version of `mypy-boto3-glue`.
fix
Upgrade your Python environment to 3.9+ or pin `mypy-boto3-glue` to a version compatible with Python 3.8 (e.g., `<1.42.70`).
affects: >=1.42.70
breakingStarting with `mypy-boto3-builder` 8.9.0, some TypeDef names for method arguments were shortened or had 'Extra' postfixes moved. This could break existing type annotations in your code if you explicitly reference these TypeDefs.
fix
Review the `mypy_boto3_glue.type_defs` module for updated TypeDef names and adjust your explicit type annotations accordingly. For example, `CreateDistributionRequestRequestTypeDef` became `CreateDistributionRequestTypeDef`.
affects: >=1.40.0 (roughly, depends on boto3 sync)
gotchaFor users migrating from very old `mypy-boto3` installations (before `boto3-stubs`), the legacy `mypy-boto3` modules are no longer generated alongside `boto3-stubs` by the builder. Ensure you are importing directly from service-specific packages like `mypy_boto3_glue` or using `boto3-stubs[glue]` extras.
fix
Update your import statements to use the correct `mypy_boto3_SERVICE` package (e.g., `from mypy_boto3_glue.client import GlueClient`) or ensure `boto3-stubs[glue]` is installed.
affects: <8.9.0 of mypy-boto3-builder, affecting generated stubs
gotchaPyCharm users might experience performance issues due to Literal overloads. The `mypy-boto3-builder` documentation suggests using `boto3-stubs-lite` as a workaround for this known PyCharm issue.
fix
If experiencing slow performance in PyCharm, consider installing `boto3-stubs-lite[glue]` instead of `mypy-boto3-glue` or `boto3-stubs[glue]`. This version is more RAM-friendly but might require more explicit type annotations.
affects: All versions (PyCharm specific)
Upgrade
Version history
1.43.72latest on PyPI · released Aug 14, 2026
Audit
Dependencies
boto3requiredProvides the AWS SDK for Python, which these stubs type-annotate.
mypyoptionalPrimary static type checker for which these stubs are designed.
typing-extensionsoptionalMay be required for older Python versions to support advanced type features, though current stubs require Python 3.9+.
Agent activity
24 hits · last 30 days
node
22
OpenAI (training)
1
Resources
mypy-boto3-glue — pip install mypy-boto3-glue · libregistry