Type annotations for boto3.WorkDocs 1.14.50 service, generated by mypy-boto3-buider 2.2.0
Project description
mypy-boto3-workdocs
Type annotations for boto3.WorkDocs 1.14.50 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.50.0.tar.gz
Algorithm | Hash digest | |
---|---|---|
SHA256 | cd0d1d950abca332cbae9b2be09def0a3db1e4bf7e84852d4406459f559afb48 |
|
MD5 | 8565d9517e243dc4930acf043deded9b |
|
BLAKE2b-256 | b6eeace3c07e63f8096fc4fab813f4d82e5eda4a615d1649c1d6e5e8d75beaf7 |
Hashes for mypy_boto3_workdocs-1.14.50.0-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 0985a59a162d70f277e1179c10584c28bdc2996fb2f5ff123caad1b2291f5781 |
|
MD5 | 976c47959cf01cc6d1b1bd76d1ee13e2 |
|
BLAKE2b-256 | c5eaa353bfa3615f48e712576489570d7f0f9a6535c66dba380a65a3a298e1ad |