Type annotations for boto3.Personalize 1.14.35 service, generated by mypy-boto3-buider 2.2.0
Project description
mypy-boto3-personalize
Type annotations for boto3.Personalize 1.14.35 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.35.0.tar.gz
Algorithm | Hash digest | |
---|---|---|
SHA256 | 5e8c7250ba6ded9b7637a308e4bb208a06a7bceab60cfe4749cd52bd95ffc5a9 |
|
MD5 | ca39aa7ccc2b2dda1dbeabf6f8e4619e |
|
BLAKE2b-256 | f6158923ff53fdd2db1f0883ed701bb8a6a1b30511c42ceb2498ee41db9f56d8 |
Hashes for mypy_boto3_personalize-1.14.35.0-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | d6e33fb33513cf6bc3a12e38c90ba0cefc6c6353169578b24804b2e709df5161 |
|
MD5 | 4dfb3aec67843d416122f3185c186894 |
|
BLAKE2b-256 | 9ec242d63bc8c6e94078fbe42341036d109cc5353488bbecd4c1bd9625afd482 |