Registry / type-stubs / mypy-boto3-s3control

mypy-boto3-s3control

JSON →
library1.43.17pypypi✓ verified 23d ago

mypy-boto3-s3control provides type annotations for the AWS Boto3 S3Control client, including explicit type hints for clients, paginators, waiters, and TypeDefs. This significantly enhances static analysis, code completion, and overall developer experience in IDEs like VSCode and PyCharm when working with the AWS SDK for Python (Boto3). It is part of the `mypy-boto3` ecosystem, which generates these stubs based on the latest Boto3 service definitions, with regular updates following Boto3 releases.

pip install mypy-boto3-s3control boto3
INSTALL
IMPORT
SIG · MYPY-BOTO3-S3CONTR
M
mypy-boto3-s3control
type-stubspythonv1.43.17
Install
5.5s avg
Import
666ms
Disk
52MB
Pass rate
10/ 10
Env Coverage10 / 10
glibc
3.93.13
musl
3.93.13
Install & Compatibility
Where this runs
tested against v1.43.17 · 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 0.701s · 53.7MB
glibc
py 3.103.910 runs
installs and imports cleanly · install 5.5s · import 0.630s · 54MB
52MB installed
● package 52MB
Code
Verified usage

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

S3ControlClient
from mypy_boto3_s3control.client import S3ControlClient
from mypy_boto3_s3control import S3ControlClient
While `from mypy_boto3_s3control import S3ControlClient` might work due to `__init__.py` re-exports, directly importing from `mypy_boto3_s3control.client` is more explicit and robust, especially for IDE type inference.
ListAccessPointsForDirectoryBucketsPaginator
from mypy_boto3_s3control.paginator import ListAccessPointsForDirectoryBucketsPaginator
For type hints of paginator objects.
CreateAccessPointRequestRequestTypeDef
from mypy_boto3_s3control.type_defs import CreateAccessPointRequestRequestTypeDef
For type hints of request/response dictionaries (TypedDicts).

This example demonstrates how to initialize a type-hinted `S3ControlClient` and use it to call a method like `list_access_points`. The type annotations ensure that method calls and their parameters/return types are checked statically by tools like MyPy or your IDE, catching potential errors before runtime. Remember to have `boto3` installed alongside `mypy-boto3-s3control`.

import boto3 from mypy_boto3_s3control.client import S3ControlClient from mypy_boto3_s3control.type_defs import ListAccessPointsResponseTypeDef def get_s3control_client() -> S3ControlClient: """Returns a typed S3Control client.""" # boto3.client returns an untyped client by default. # The explicit type annotation (S3ControlClient) provides type checking. client: S3ControlClient = boto3.client("s3control") return client def list_access_points(client: S3ControlClient, account_id: str) -> ListAccessPointsResponseTypeDef: """Lists S3 access points with type checking.""" response: ListAccessPointsResponseTypeDef = client.list_access_points( AccountId=account_id ) return response if __name__ == "__main__": # Replace with your AWS account ID aws_account_id = "012345678901" # os.environ.get('AWS_ACCOUNT_ID', '012345678901') s3_control_client = get_s3control_client() print(f"S3Control Client type: {type(s3_control_client)}") # Example usage (will typically require valid credentials and permissions) try: access_points = list_access_points(s3_control_client, aws_account_id) print(f"Found {len(access_points.get('AccessPointList', []))} S3 access points.") except Exception as e: print(f"Error listing access points (credentials/permissions might be needed): {e}")
Debug
Known issues
breakingPython 3.8 support was removed for all `mypy-boto3` packages, including `mypy-boto3-s3control`, starting with `mypy-boto3-builder` version 8.12.0.
fix
Upgrade your Python environment to 3.9 or newer. The `requires_python` metadata is `^3.9`.
affects: mypy-boto3-builder >=8.12.0 (generating packages like mypy-boto3-s3control)
breakingThe `mypy-boto3` ecosystem migrated to PEP 561 compliant packages with `mypy-boto3-builder` 8.12.0. While this is generally an improvement for type checker discovery, it might affect custom build systems or older IDE integrations that expect different package structures for stub files.
fix
Ensure your environment and tooling are up-to-date and correctly handle PEP 561 packages. Most modern type checkers and IDEs should support this automatically.
affects: mypy-boto3-builder >=8.12.0 (generating packages like mypy-boto3-s3control)
breakingTypedDicts for packed method arguments may have shorter names starting with `mypy-boto3-builder` version 8.9.0. For example, `CreateDistributionRequestRequestTypeDef` might become `CreateDistributionRequestTypeDef`. This could break code explicitly referencing the older, longer TypeDef names.
fix
Review and update explicit TypeDef references in your code to match the new naming conventions.
affects: mypy-boto3-builder >=8.9.0 (generating packages like mypy-boto3-s3control)
gotcha`mypy-boto3-s3control` provides *only* type annotations. You must also install `boto3` for the actual runtime functionality of the AWS SDK for Python.
fix
Ensure `boto3` is installed in your environment alongside `mypy-boto3-s3control` (e.g., `pip install boto3 mypy-boto3-s3control`).
affects: All versions
gotchaFor optimal type checking and auto-completion, especially if not using the `boto3-stubs` package with extras, explicitly annotating the client variable with `S3ControlClient` (e.g., `client: S3ControlClient = boto3.client("s3control")`) is highly recommended.
fix
Always add explicit type annotations when initializing Boto3 clients or resources from `boto3.client()` or `session.client()`.
affects: All versions
gotchaPyCharm users might experience slow performance with Literal overloads. The `mypy-boto3` documentation suggests using the `lite` versions of stub packages to mitigate this issue or disabling PyCharm's internal type checker in favor of external tools like `mypy` or `pyright`.
fix
If experiencing performance issues in PyCharm, consider installing `boto3-stubs-lite[s3control]` instead of `mypy-boto3-s3control`, or configure PyCharm to use an external type checker.
affects: All versions, specifically affecting PyCharm users
Upgrade
Version history
1.43.17latest on PyPI · released May 28, 2026
Audit
Dependencies
boto3requiredProvides the runtime AWS SDK for Python; mypy-boto3-s3control only provides type annotations.
pythonrequiredRequires Python 3.9 or newer.
Agent activity
23 hits · last 30 days
node
20
OpenAI (training)
1
Resources
mypy-boto3-s3control — pip install mypy-boto3-s3control · libregistry