Type annotations for boto3.WorkDocs 1.14.53 service, generated by mypy-boto3-buider 2.4.0
Project description
mypy-boto3-workdocs
Type annotations for boto3.WorkDocs 1.14.53 service compatible with mypy, VSCode, PyCharm and other tools.
Generated by mypy-boto3-buider 2.4.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.53.0.tar.gz
Algorithm | Hash digest | |
---|---|---|
SHA256 | 97a4777af617c172d49ecb37dca7c25a9222d6826b77f88d4e94712424badc1b |
|
MD5 | 7cbcdf0d52cb2c0d2cbef419c26dd2ff |
|
BLAKE2b-256 | 2bfe355cb823dcd991fcbe9501ee919f2a91e8f3d52d7b39715bb3c8b05f171c |
Hashes for mypy_boto3_workdocs-1.14.53.0-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 5ac54af36b152d631549e6336aa8add1aaf247a54cdda9c9c6f43036fe25d3fd |
|
MD5 | c9acd51018e4e201e70d63cd6aad0910 |
|
BLAKE2b-256 | 561d5d8f2e012910c1b2efe986c8961a2e9250edeacb1eba37fdd6a738877679 |