Type annotations for boto3.CloudSearch 1.14.0 service, generated by mypy-boto3-buider 2.2.0
Project description
mypy-boto3-cloudsearch
Type annotations for boto3.CloudSearch 1.14.0 service compatible with mypy, VSCode, PyCharm and other tools.
Generated by mypy-boto3-buider 2.2.0.
More information can be found on boto3-stubs page.
How to install
Make sure you have mypy installed and activated in your IDE.
Install boto3-stubs
for CloudSearch
service.
python -m pip install boto3-stubs[cloudsearch]
How to use
Client annotations
CloudSearchClient
provides annotations for boto3.client("cloudsearch")
.
import boto3
from mypy_boto3_cloudsearch import CloudSearchClient
from mypy_boto3_cloudsearch.type_defs import AccessPoliciesStatusTypeDef, ...
client: CloudSearchClient = boto3.client("cloudsearch")
# now client usage is checked by mypy and IDE should provide code auto-complete
# works for session as well
session = boto3.session.Session(region="us-west-1")
session_client: CloudSearchClient = session.client("cloudsearch")
Typed dictionations
mypy_boto3_cloudsearch.type_defs
module contains structures and shapes assembled
to typed dictionaries for additional type checking.
def get_structure() -> AccessPoliciesStatusTypeDef:
return {
...
}
Dynamic type annotations
mypy_boto3
command generates boto3.client/resource
type annotations for
mypy_boto3_cloudsearch
and other installed services.
# Run this command after you add or remove service packages
python -m mypy_boto3
Generated type annotations provide overloads for boto3.client
and boto3.resource
,
boto3.Session.client
and boto3.Session.resource
functions,
so explicit type annotations are not needed.
mypy
supports function overloads as expectedPyCharm
also supports function overloads, but consumes a lot of RAM, use carefully if you have many services installedVSCode
does not currently support function overloads, use explicit type annotations
# Type is discovered correctly by mypy and PyCharm
# VSCode still needs explicit type annotations
client = boto3.client("cloudsearch")
session_client = boto3.Session().client("cloudsearch")
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Hashes for mypy-boto3-cloudsearch-1.14.0.2.tar.gz
Algorithm | Hash digest | |
---|---|---|
SHA256 | 27b024e5de5288bb5aec6a9d081ec97dc7c06b8e38ac0991217fec1f55423bcd |
|
MD5 | 063f6819bfe7acd1eb6b2b07dcd4cef2 |
|
BLAKE2b-256 | 4f6c63c4e55800d7f0996a6a4c20c0062fddf594dbf2771c904c998396a6aed5 |
Hashes for mypy_boto3_cloudsearch-1.14.0.2-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 7e9050561759514cb514b232483e7b6259eaa7079272eee4f8bf5109551617aa |
|
MD5 | a3b9378fc73528f44fadaa361e6e3abe |
|
BLAKE2b-256 | d11cd67d9cb2b8580882f42f455c394c1f18caa5179f3b85fe5cb5aa7fa7a026 |