Type annotations for boto3.Personalize 1.14.45 service, generated by mypy-boto3-buider 2.2.0
Project description
mypy-boto3-personalize
Type annotations for boto3.Personalize 1.14.45 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.45.0.tar.gz
Algorithm | Hash digest | |
---|---|---|
SHA256 | 7e22d9071ca197417b5e625c131fec6f242c9c5efd20b0390fc80b7336daa1c3 |
|
MD5 | 5cd7db1ac0df18d8c09eb9f763adafdc |
|
BLAKE2b-256 | 6e807ce8ec95a17fcd3756335acd3d241afc1f5aa3836b7eda75074bc9c5a950 |
Hashes for mypy_boto3_personalize-1.14.45.0-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 17241f90be69ba2b3f916e5c37d8a849e9f6c7e136d3f005a7d240a345debc6c |
|
MD5 | 6b2575e9b6012822936131020bfdfa36 |
|
BLAKE2b-256 | eedea972bd4219b78be2898c4a2fc6f0cceeb211da9c02b485bb1dfd39b688bc |