Registry /
type-stubs / mypy-boto3-lakeformation
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.910 runs
installs and imports cleanly · install 0.0s · import 0.000s · 19.9MB
glibcpy 3.10–3.910 runs
installs and imports cleanly · install 3.4s · import 0.000s · 20MB
18MB installed
● package 18MB
Code
Verified usage
Verified import paths — ran on the pinned version, not inferred.
LakeFormationClient
✓ from mypy_boto3_lakeformation import LakeFormationClient
✗ from mypy_boto3_lakeformation import LakeFormationClient
This quickstart demonstrates how to initialize a `boto3` LakeFormation client with explicit type annotations and interact with it. It fetches the Data Lake settings and attempts to print the first Data Lake admin, leveraging `mypy-boto3-lakeformation`'s type definitions for enhanced code completion and error checking.
import boto3
from mypy_boto3_lakeformation.client import LakeFormationClient
from mypy_boto3_lakeformation.type_defs import (
GetDataLakeSettingsResponseTypeDef,
PrincipalPermissionsTypeDef
)
# Initialize boto3 client with explicit type annotation for static checking
# Make sure to have AWS credentials configured (e.g., via environment variables or ~/.aws/credentials)
client: LakeFormationClient = boto3.client("lakeformation", region_name="us-east-1")
try:
# Example: Get Data Lake Settings
response: GetDataLakeSettingsResponseTypeDef = client.get_data_lake_settings()
print("Successfully retrieved Data Lake Settings:")
# Accessing type-hinted response data
if "DataLakeSettings" in response:
settings = response["DataLakeSettings"]
if "DataLakeAdmins" in settings and settings["DataLakeAdmins"]:
admin: PrincipalPermissionsTypeDef = settings["DataLakeAdmins"][0]
print(f" First Data Lake Admin Principal: {admin['DataPrincipalIdentifier']}")
else:
print(" No Data Lake Admins found.")
else:
print(" 'DataLakeSettings' key not found in response.")
except Exception as e:
print(f"An error occurred: {e}")
Debug
Known issues
breakingStarting with `mypy-boto3-builder` 8.12.0 (and corresponding `mypy-boto3-*` releases like 1.42.79 for LakeFormation), Python 3.8 is no longer supported. Projects must use Python 3.9 or newer.fixUpgrade your Python environment to 3.9 or a later supported version.
affects: >=1.42.79
gotcha`mypy-boto3-lakeformation` provides only type annotations (`.pyi` stub files). You must also install the `boto3` library itself for your code to run. These stubs do not provide `boto3`'s runtime functionality.fixEnsure `boto3` is installed in your environment: `pip install boto3`.
affects: all
gotchaFor optimal and accurate type checking, the version of `mypy-boto3-lakeformation` should ideally match the major and minor version of your installed `boto3` library. Mismatched versions can lead to incorrect type hints or unresolved references.fixAlign the `mypy-boto3-lakeformation` version with your `boto3` version (e.g., if `boto3` is `1.42.x`, install `mypy-boto3-lakeformation==1.42.x`).
affects: all
breakingThe `mypy-boto3-builder` (which generates this package) introduced breaking changes to `TypeDef` naming conventions in version 8.9.0. If you explicitly imported TypeDefs with older, longer names (e.g., `CreateDistributionRequestRequestTypeDef`), they might have been shortened (e.g., to `CreateDistributionRequestTypeDef`).fixReview your `TypeDef` imports and adjust names according to the updated conventions, typically by removing redundant 'Request' or 'Response' suffixes where applicable.
affects: >=1.42.x (generated by builder >=8.9.0)
Upgrade
Version history
1.43.0latest on PyPI · released Apr 29, 2026
Audit
Dependencies
boto3requiredProvides runtime functionality; mypy-boto3-lakeformation only offers type stubs for boto3.
pythonrequiredRequires Python 3.9 or newer.