mypy-boto3-opensearch 1.40.0


pip install mypy-boto3-opensearch

  Latest version

Released: Jul 31, 2025


Meta
Author: Vlad Emelianov
Requires Python: >=3.8

Classifiers

Development Status
  • 5 - Production/Stable

Intended Audience
  • Developers

Environment
  • Console

License
  • OSI Approved :: MIT License

Natural Language
  • English

Operating System
  • OS Independent

Programming Language
  • Python :: 3
  • Python :: 3.8
  • Python :: 3.9
  • Python :: 3.10
  • Python :: 3.11
  • Python :: 3.12
  • Python :: 3.13
  • Python :: 3.14
  • Python :: 3 :: Only
  • Python :: Implementation :: CPython

Typing
  • Stubs Only

mypy-boto3-opensearch

PyPI - mypy-boto3-opensearch PyPI - Python Version Docs PyPI - Downloads

boto3.typed

Type annotations for boto3 OpenSearchService 1.40.0 compatible with VSCode, PyCharm, Emacs, Sublime Text, mypy, pyright and other tools.

Generated with mypy-boto3-builder 8.11.0.

More information can be found on boto3-stubs page and in mypy-boto3-opensearch docs.

See how it helps you find and fix potential bugs:

types-boto3 demo

How to install

Generate locally (recommended)

You can generate type annotations for boto3 package locally with mypy-boto3-builder. Use uv for build isolation.

  1. Run mypy-boto3-builder in your package root directory: uvx --with 'boto3==1.40.0' mypy-boto3-builder
  2. Select boto3-stubs AWS SDK.
  3. Add OpenSearchService service.
  4. Use provided commands to install generated packages.

VSCode extension

Add AWS Boto3 extension to your VSCode and run AWS boto3: Quick Start command.

Click Modify and select boto3 common and OpenSearchService.

From PyPI with pip

Install boto3-stubs for OpenSearchService service.

# install with boto3 type annotations
python -m pip install 'boto3-stubs[opensearch]'

# Lite version does not provide session.client/resource overloads
# it is more RAM-friendly, but requires explicit type annotations
python -m pip install 'boto3-stubs-lite[opensearch]'

# standalone installation
python -m pip install mypy-boto3-opensearch

How to uninstall

python -m pip uninstall -y mypy-boto3-opensearch

Usage

VSCode

python -m pip install 'boto3-stubs[opensearch]'

Both type checking and code completion should now work. No explicit type annotations required, write your boto3 code as usual.

PyCharm

⚠️ Due to slow PyCharm performance on Literal overloads (issue PY-40997), it is recommended to use boto3-stubs-lite until the issue is resolved.

⚠️ If you experience slow performance and high CPU usage, try to disable PyCharm type checker and use mypy or pyright instead.

⚠️ To continue using PyCharm type checker, you can try to replace boto3-stubs with boto3-stubs-lite:

pip uninstall boto3-stubs
pip install boto3-stubs-lite

Install boto3-stubs[opensearch] in your environment:

python -m pip install 'boto3-stubs[opensearch]'

Both type checking and code completion should now work.

Emacs

  • Install boto3-stubs with services you use in your environment:
python -m pip install 'boto3-stubs[opensearch]'
(use-package lsp-pyright
  :ensure t
  :hook (python-mode . (lambda ()
                          (require 'lsp-pyright)
                          (lsp)))  ; or lsp-deferred
  :init (when (executable-find "python3")
          (setq lsp-pyright-python-executable-cmd "python3"))
  )
  • Make sure emacs uses the environment where you have installed boto3-stubs

Type checking should now work. No explicit type annotations required, write your boto3 code as usual.

Sublime Text

  • Install boto3-stubs[opensearch] with services you use in your environment:
python -m pip install 'boto3-stubs[opensearch]'

Type checking should now work. No explicit type annotations required, write your boto3 code as usual.

Other IDEs

Not tested, but as long as your IDE supports mypy or pyright, everything should work.

mypy

  • Install mypy: python -m pip install mypy
  • Install boto3-stubs[opensearch] in your environment:
python -m pip install 'boto3-stubs[opensearch]'

Type checking should now work. No explicit type annotations required, write your boto3 code as usual.

pyright

  • Install pyright: npm i -g pyright
  • Install boto3-stubs[opensearch] in your environment:
python -m pip install 'boto3-stubs[opensearch]'

Optionally, you can install boto3-stubs to typings directory.

Type checking should now work. No explicit type annotations required, write your boto3 code as usual.

Pylint compatibility

It is totally safe to use TYPE_CHECKING flag in order to avoid mypy-boto3-opensearch dependency in production. However, there is an issue in pylint that it complains about undefined variables. To fix it, set all types to object in non-TYPE_CHECKING mode.

from typing import TYPE_CHECKING

if TYPE_CHECKING:
    from mypy_boto3_ec2 import EC2Client, EC2ServiceResource
    from mypy_boto3_ec2.waiters import BundleTaskCompleteWaiter
    from mypy_boto3_ec2.paginators import DescribeVolumesPaginator
else:
    EC2Client = object
    EC2ServiceResource = object
    BundleTaskCompleteWaiter = object
    DescribeVolumesPaginator = object

...

Explicit type annotations

Client annotations

OpenSearchServiceClient provides annotations for boto3.client("opensearch").

from boto3.session import Session

from mypy_boto3_opensearch import OpenSearchServiceClient

client: OpenSearchServiceClient = Session().client("opensearch")

# now client usage is checked by mypy and IDE should provide code completion

Paginators annotations

mypy_boto3_opensearch.paginator module contains type annotations for all paginators.

from boto3.session import Session

from mypy_boto3_opensearch import OpenSearchServiceClient
from mypy_boto3_opensearch.paginator import ListApplicationsPaginator

client: OpenSearchServiceClient = Session().client("opensearch")

# Explicit type annotations are optional here
# Types should be correctly discovered by mypy and IDEs
list_applications_paginator: ListApplicationsPaginator = client.get_paginator("list_applications")

Literals

mypy_boto3_opensearch.literals module contains literals extracted from shapes that can be used in user code for type checking.

Full list of OpenSearchService Literals can be found in docs.

from mypy_boto3_opensearch.literals import AWSServicePrincipalType


def check_value(value: AWSServicePrincipalType) -> bool: ...

Type definitions

mypy_boto3_opensearch.type_defs module contains structures and shapes assembled to typed dictionaries and unions for additional type checking.

Full list of OpenSearchService TypeDefs can be found in docs.

# TypedDict usage example
from mypy_boto3_opensearch.type_defs import NaturalLanguageQueryGenerationOptionsInputTypeDef


def get_value() -> NaturalLanguageQueryGenerationOptionsInputTypeDef:
    return {
        "DesiredState": ...,
    }

How it works

Fully automated mypy-boto3-builder carefully generates type annotations for each service, patiently waiting for boto3 updates. It delivers drop-in type annotations for you and makes sure that:

  • All available boto3 services are covered.
  • Each public class and method of every boto3 service gets valid type annotations extracted from botocore schemas.
  • Type annotations include up-to-date documentation.
  • Link to documentation is provided for every method.
  • Code is processed by ruff for readability.

What's new

Implemented features

  • Fully type annotated boto3, botocore, aiobotocore and aioboto3 libraries
  • mypy, pyright, VSCode, PyCharm, Sublime Text and Emacs compatibility
  • Client, ServiceResource, Resource, Waiter Paginator type annotations for each service
  • Generated TypeDefs for each service
  • Generated Literals for each service
  • Auto discovery of types for boto3.client and boto3.resource calls
  • Auto discovery of types for session.client and session.resource calls
  • Auto discovery of types for client.get_waiter and client.get_paginator calls
  • Auto discovery of types for ServiceResource and Resource collections
  • Auto discovery of types for aiobotocore.Session.create_client calls

Latest changes

Builder changelog can be found in Releases.

Versioning

mypy-boto3-opensearch version is the same as related boto3 version and follows Python Packaging version specifiers.

Thank you

Documentation

All services type annotations can be found in boto3 docs

Support and contributing

This package is auto-generated. Please reports any bugs or request new features in mypy-boto3-builder repository.

1.40.0 Jul 31, 2025
1.39.5 Jul 15, 2025
1.39.0 Jun 30, 2025
1.38.0 Apr 22, 2025
1.37.27 Apr 03, 2025
1.37.0 Feb 24, 2025
1.36.0 Jan 15, 2025
1.35.93 Jan 07, 2025
1.35.72 Dec 02, 2024
1.35.58 Nov 11, 2024
1.35.52 Oct 30, 2024
1.35.50 Oct 28, 2024
1.35.0 Aug 16, 2024
1.34.142 Jul 09, 2024
1.34.136 Jun 28, 2024
1.34.134 Jun 26, 2024
1.34.130 Jun 19, 2024
1.34.111 May 22, 2024
1.34.95 Apr 30, 2024
1.34.43 Feb 15, 2024
1.34.36 Feb 06, 2024
1.34.13 Jan 04, 2024
1.34.1 Dec 14, 2023
1.34.0 Dec 13, 2023
1.33.3 Nov 29, 2023
1.33.0 Nov 28, 2023
1.29.0 Nov 14, 2023
1.28.72 Oct 26, 2023
1.28.67 Oct 19, 2023
1.28.64 Oct 16, 2023
1.28.36 Aug 28, 2023
1.28.16 Aug 01, 2023
1.28.15.post1 Jul 29, 2023
1.28.15 Jul 28, 2023
1.28.12 Jul 27, 2023
1.28.0 Jul 06, 2023
1.27.0 Jul 03, 2023
1.26.152 Jun 12, 2023
1.26.133 May 11, 2023
1.26.127 May 04, 2023
1.26.126 May 03, 2023
1.26.77 Feb 22, 2023
1.26.61 Jan 31, 2023
1.26.53 Jan 19, 2023
1.26.5 Nov 08, 2022
1.26.0.post1 Nov 01, 2022
1.26.0 Nov 01, 2022
1.25.0 Oct 25, 2022
1.24.40 Jul 28, 2022
1.24.36.post1 Jul 23, 2022
1.24.0 May 31, 2022
1.23.0.post1 May 13, 2022
1.23.0 May 13, 2022
1.22.8 May 06, 2022
1.22.0.post1 Apr 25, 2022
1.22.0 Apr 25, 2022
1.21.34 Apr 05, 2022
1.21.31 Apr 01, 2022
1.21.30 Mar 31, 2022
1.21.27 Mar 27, 2022
1.21.23.post1 Mar 23, 2022
1.21.23 Mar 22, 2022
1.21.0 Feb 14, 2022
1.20.49 Feb 07, 2022
1.20.46.post1 Jan 29, 2022
1.20.45 Jan 27, 2022
1.20.35.post1 Jan 13, 2022
1.20.30 Jan 06, 2022
1.20.12 Nov 23, 2021
1.20.1 Nov 09, 2021
1.20.0 Nov 08, 2021
1.19.12.post1 Mar 31, 2022
1.19.12 Nov 05, 2021
1.19.11 Nov 05, 2021
1.19.10 Nov 04, 2021
1.19.9 Nov 02, 2021
1.19.8 Nov 01, 2021
1.19.7 Oct 29, 2021
1.19.6 Oct 28, 2021
1.19.5 Oct 27, 2021
1.19.4 Oct 26, 2021
1.19.3 Oct 25, 2021
1.19.2 Oct 22, 2021
1.19.1.post1 Oct 22, 2021
1.19.1 Oct 21, 2021
1.19.0 Oct 20, 2021
1.18.65 Oct 19, 2021
1.18.64 Oct 18, 2021
1.18.63 Oct 15, 2021
1.18.62 Oct 14, 2021
1.18.61 Oct 13, 2021
1.18.60 Oct 12, 2021
1.18.59 Oct 11, 2021
1.18.58 Oct 08, 2021
1.18.57 Oct 07, 2021
1.18.56 Oct 06, 2021
1.18.55 Oct 05, 2021
1.18.54 Oct 04, 2021
1.18.53 Oct 01, 2021
1.18.52 Sep 30, 2021
1.18.51 Sep 29, 2021
1.18.50 Sep 28, 2021
1.18.49 Sep 27, 2021
1.18.48 Sep 24, 2021
1.18.47 Sep 23, 2021
1.18.46 Sep 22, 2021
1.18.45 Sep 21, 2021
1.18.44 Sep 17, 2021
1.18.43 Sep 16, 2021
1.18.42 Sep 14, 2021
1.18.41 Sep 13, 2021
1.18.40 Sep 10, 2021
1.18.39 Sep 09, 2021
1.18.38 Sep 08, 2021
Extras: None
Dependencies:
typing-extensions