Type annotations for boto3.WorkDocs 1.14.21 service, generated by mypy-boto3-buider 2.2.0
Project description
mypy-boto3-workdocs
Type annotations for boto3.WorkDocs 1.14.21 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 WorkDocs
service.
python -m pip install boto3-stubs[workdocs]
How to use
Client annotations
WorkDocsClient
provides annotations for boto3.client("workdocs")
.
import boto3
from mypy_boto3_workdocs import WorkDocsClient
from mypy_boto3_workdocs.paginator import (
DescribeActivitiesPaginator,
DescribeCommentsPaginator,
DescribeDocumentVersionsPaginator,
DescribeFolderContentsPaginator,
DescribeGroupsPaginator,
DescribeNotificationSubscriptionsPaginator,
DescribeResourcePermissionsPaginator,
DescribeRootFoldersPaginator,
DescribeUsersPaginator,
)
from mypy_boto3_workdocs.type_defs import ActivityTypeDef, ...
client: WorkDocsClient = boto3.client("workdocs")
# 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: WorkDocsClient = session.client("workdocs")
Paginators annotations
mypy_boto3_workdocs.paginator
module contains type annotations for all paginators.
client: WorkDocsClient = boto3.client("workdocs")
# Explicit type annotations are optional here
# Type should be correctly discovered by mypy and IDEs
# VSCode requires explicit type annotations
describe_activities_paginator: DescribeActivitiesPaginator = client.get_paginator("describe_activities")
describe_comments_paginator: DescribeCommentsPaginator = client.get_paginator("describe_comments")
describe_document_versions_paginator: DescribeDocumentVersionsPaginator = client.get_paginator("describe_document_versions")
describe_folder_contents_paginator: DescribeFolderContentsPaginator = client.get_paginator("describe_folder_contents")
describe_groups_paginator: DescribeGroupsPaginator = client.get_paginator("describe_groups")
describe_notification_subscriptions_paginator: DescribeNotificationSubscriptionsPaginator = client.get_paginator("describe_notification_subscriptions")
describe_resource_permissions_paginator: DescribeResourcePermissionsPaginator = client.get_paginator("describe_resource_permissions")
describe_root_folders_paginator: DescribeRootFoldersPaginator = client.get_paginator("describe_root_folders")
describe_users_paginator: DescribeUsersPaginator = client.get_paginator("describe_users")
Typed dictionations
mypy_boto3_workdocs.type_defs
module contains structures and shapes assembled
to typed dictionaries for additional type checking.
def get_structure() -> ActivityTypeDef:
return {
...
}
Dynamic type annotations
mypy_boto3
command generates boto3.client/resource
type annotations for
mypy_boto3_workdocs
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("workdocs")
session_client = boto3.Session().client("workdocs")
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-workdocs-1.14.21.0.tar.gz
Algorithm | Hash digest | |
---|---|---|
SHA256 | 4df603e032a4ed8be0d88af7665c34f195a0eaf8830ad59208aa21737ac5a138 |
|
MD5 | 9dd4a7d2782e885481572a8a52b4f2bc |
|
BLAKE2b-256 | 1c226c3ba759812f11ae2ca53e9289dcb3764f4507c73fc70d2988896e1e9991 |
Hashes for mypy_boto3_workdocs-1.14.21.0-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | a8f121e2688e35e0f977acbbabdd9c3697f617b82a7882bc1ea98ce1f7bb09fa |
|
MD5 | 4869728d4818569aafd8677625a77a1c |
|
BLAKE2b-256 | eeba588e3e54a6ec20abadcfacbf737f8ff0684b6fc3cb32b419388ceea83dd6 |