Type annotations for boto3.WorkDocs 1.14.35 service, generated by mypy-boto3-buider 2.2.0
Project description
mypy-boto3-workdocs
Type annotations for boto3.WorkDocs 1.14.35 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.35.0.tar.gz
Algorithm | Hash digest | |
---|---|---|
SHA256 | b3064941e35e68fcf51d34b48325b79ae486f8172fb9b8b440c962aed30b0a56 |
|
MD5 | eeaaba2d85983d4e7e52db09e5377ff2 |
|
BLAKE2b-256 | dbee8a90eb202844069a41d06d05a3082a581b4756c6bfe882d5357184338ac6 |
Hashes for mypy_boto3_workdocs-1.14.35.0-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | e228aeb9eddcb517f0b5c0d913968dacbbb99b4c2626911e3f3442648e4471c1 |
|
MD5 | 4db2c3fc8f6f3e0c5323b88e0e677522 |
|
BLAKE2b-256 | 2df60322321f453751d60cc7a9e5ae86776f05c2622b4c236c018b814c876f11 |