Type annotations for boto3.Personalize 1.14.23 service, generated by mypy-boto3-buider 2.2.0
Project description
mypy-boto3-personalize
Type annotations for boto3.Personalize 1.14.23 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 Personalize
service.
python -m pip install boto3-stubs[personalize]
How to use
Client annotations
PersonalizeClient
provides annotations for boto3.client("personalize")
.
import boto3
from mypy_boto3_personalize import PersonalizeClient
from mypy_boto3_personalize.paginator import (
ListBatchInferenceJobsPaginator,
ListCampaignsPaginator,
ListDatasetGroupsPaginator,
ListDatasetImportJobsPaginator,
ListDatasetsPaginator,
ListEventTrackersPaginator,
ListRecipesPaginator,
ListSchemasPaginator,
ListSolutionsPaginator,
ListSolutionVersionsPaginator,
)
from mypy_boto3_personalize.type_defs import AlgorithmImageTypeDef, ...
client: PersonalizeClient = boto3.client("personalize")
# 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: PersonalizeClient = session.client("personalize")
Paginators annotations
mypy_boto3_personalize.paginator
module contains type annotations for all paginators.
client: PersonalizeClient = boto3.client("personalize")
# Explicit type annotations are optional here
# Type should be correctly discovered by mypy and IDEs
# VSCode requires explicit type annotations
list_batch_inference_jobs_paginator: ListBatchInferenceJobsPaginator = client.get_paginator("list_batch_inference_jobs")
list_campaigns_paginator: ListCampaignsPaginator = client.get_paginator("list_campaigns")
list_dataset_groups_paginator: ListDatasetGroupsPaginator = client.get_paginator("list_dataset_groups")
list_dataset_import_jobs_paginator: ListDatasetImportJobsPaginator = client.get_paginator("list_dataset_import_jobs")
list_datasets_paginator: ListDatasetsPaginator = client.get_paginator("list_datasets")
list_event_trackers_paginator: ListEventTrackersPaginator = client.get_paginator("list_event_trackers")
list_recipes_paginator: ListRecipesPaginator = client.get_paginator("list_recipes")
list_schemas_paginator: ListSchemasPaginator = client.get_paginator("list_schemas")
list_solution_versions_paginator: ListSolutionVersionsPaginator = client.get_paginator("list_solution_versions")
list_solutions_paginator: ListSolutionsPaginator = client.get_paginator("list_solutions")
Typed dictionations
mypy_boto3_personalize.type_defs
module contains structures and shapes assembled
to typed dictionaries for additional type checking.
def get_structure() -> AlgorithmImageTypeDef:
return {
...
}
Dynamic type annotations
mypy_boto3
command generates boto3.client/resource
type annotations for
mypy_boto3_personalize
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("personalize")
session_client = boto3.Session().client("personalize")
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-personalize-1.14.23.0.tar.gz
Algorithm | Hash digest | |
---|---|---|
SHA256 | d26d8919ad1e1b86719ce1b40aab31b8501cdff70895e7611fc7e3dc577c19c1 |
|
MD5 | 75f28828f67848abc9e6ab0a0e5344c3 |
|
BLAKE2b-256 | 46e41a3c9f62bb5c30852d81f195611efa6d85ed938926f1af4668470f9e7a67 |
Hashes for mypy_boto3_personalize-1.14.23.0-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 23811e872fb2a7f85053fbe42443ce86b4261b5cba868a2c8b03d9f6a56c07fd |
|
MD5 | a7187c6893f376b36d9ee1c5c03ddccf |
|
BLAKE2b-256 | e8a10d94e1e24f45b1d1fbb9659cbf638ed16338feee06558917230fd4ad8fbd |