Type annotations for boto3.Personalize 1.14.5 service, generated by mypy-boto3-buider 2.2.0
Project description
mypy-boto3-personalize
Type annotations for boto3.Personalize 1.14.5 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.5.0.tar.gz
Algorithm | Hash digest | |
---|---|---|
SHA256 | a73910e3b9befc44168b06975b6f3daee486f88ef2902d2d86c6a3ad24631501 |
|
MD5 | f304e7d2da492e649b4d89c3fe0efeb9 |
|
BLAKE2b-256 | 4ed8f8d35697e21cdbe8db1816602bb105a7eeb7268a4668668bea5a3e80033b |
Hashes for mypy_boto3_personalize-1.14.5.0-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 91e8bd6c1b9f2993386d7a306da515693281950846fe0f15c2ed4396f11ea9e6 |
|
MD5 | 50fb3d38e511ae0c2df2801be03e325d |
|
BLAKE2b-256 | 6665ad8407aab977cbc8c8c11843610f53a2159daac44128fbddfdf84318497e |