Type annotations for boto3.WorkDocs 1.14.47 service, generated by mypy-boto3-buider 2.2.0
Project description
mypy-boto3-workdocs
Type annotations for boto3.WorkDocs 1.14.47 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.47.0.tar.gz
Algorithm | Hash digest | |
---|---|---|
SHA256 | 52cb709912270f6c4f213172e26ecfe9f89ff04502aff48da07d94a892dbd3c5 |
|
MD5 | 95a266a65b335aefd9409e85b3dba2b5 |
|
BLAKE2b-256 | fea34930e466814da1bb33b0ef281439c0cb927d8447d5ff86db98d77b56baef |
Hashes for mypy_boto3_workdocs-1.14.47.0-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | c44894451dcb4aa4114038943ad470b6182b5c98b56f3448860bab8a165c608a |
|
MD5 | e8a0d71bf47eb5fe5ffeaf8969aa6426 |
|
BLAKE2b-256 | 0f787f39a0064347d7654e1606b66f841cbdf11a44d40fb400d0087eba3d7211 |