Type annotations for boto3.Personalize 1.14.32 service, generated by mypy-boto3-buider 2.2.0
Project description
mypy-boto3-personalize
Type annotations for boto3.Personalize 1.14.32 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.32.0.tar.gz
Algorithm | Hash digest | |
---|---|---|
SHA256 | ad7d7e3c1ce1bcc31ab319fb1a5c69385ec60bef0682bf59b05f95b23c4ea349 |
|
MD5 | d44d2008daa5a49f3602f7616f4571c8 |
|
BLAKE2b-256 | e68b14533de882847a49c959e5ae0d52d6cc0d4f2ca24e7a90da41597262df43 |
Hashes for mypy_boto3_personalize-1.14.32.0-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | e66bf7e66af3ffbe967f113e80015579e98ce9395a0f240e383b749503655d22 |
|
MD5 | 8f0a8899933c4f90ee248ddf19e8aa9c |
|
BLAKE2b-256 | 992985df1276b57509f37f159c1c6cff36644ce3321d011d744f263fe9c7c6a1 |