Type annotations for boto3.Textract 1.17.67 service, generated by mypy-boto3-buider 4.10.0
Project description
mypy-boto3-textract
Type annotations for boto3.Textract 1.17.67 service compatible with VSCode, PyCharm, Emacs, Sublime Text, mypy, pyright and other tools.
Generated by mypy-boto3-buider 4.10.0.
More information can be found on boto3-stubs page and in mypy-boto3-textract docs
See how it helps to find and fix potential bugs:
How to install
Install boto3-stubs
for Textract
service.
python -m pip install boto3-stubs[textract]
Usage
VSCode
- Install Python extension
- Install Pylance extension
- Set
Pylance
as your Python Language Server - Install
boto-stubs[textract]
in your environment:python -m pip install 'boto3-stubs[textract]'
Both type checking and auto-complete should work for Textract
service. No
explicit type annotations required, write your boto3
code as usual.
PyCharm
- Install
boto-stubs[textract]
in your environment:python -m pip install 'boto3-stubs[textract]'
Both type checking and auto-complete should work for Textract
service. No
explicit type annotations required, write your boto3
code as usual.
Auto-complete can be slow on big projects or if you have a lot of installed
boto3-stubs
submodules.
Other IDEs
Not tested, but as long as your IDE support mypy
or pyright
, everything
should work.
mypy
- Install
mypy
:python -m pip install mypy
- Install
boto-stubs[textract]
in your environment:python -m pip install 'boto3-stubs[textract]'
- Run
mypy
as usual
Type checking should work for Textract
service. No explicit type annotations
required, write your boto3
code as usual.
pyright
- Install
pyright
:yarn global add pyright
- Install
boto-stubs[textract]
in your environment:python -m pip install 'boto3-stubs[textract]'
- Optionally, you can install
boto3-stubs
totypings
folder.
Type checking should work for Textract
service. No explicit type annotations
required, write your boto3
code as usual.
Explicit type annotations
Client annotations
TextractClient
provides annotations for boto3.client("textract")
.
import boto3
from mypy_boto3_textract import TextractClient
client: TextractClient = boto3.client("textract")
# 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: TextractClient = session.client("textract")
Literals
mypy_boto3_textract.literals
module contains literals extracted from shapes
that can be used in user code for type checking.
from mypy_boto3_textract.literals import (
BlockType,
ContentClassifier,
EntityType,
FeatureType,
JobStatus,
RelationshipType,
SelectionStatus,
TextType,
)
def check_value(value: BlockType) -> bool:
...
Typed dictionaries
mypy_boto3_textract.type_defs
module contains structures and shapes assembled
to typed dictionaries for additional type checking.
from mypy_boto3_textract.type_defs import (
AnalyzeDocumentResponseTypeDef,
BlockTypeDef,
BoundingBoxTypeDef,
DetectDocumentTextResponseTypeDef,
DocumentLocationTypeDef,
DocumentMetadataTypeDef,
DocumentTypeDef,
GeometryTypeDef,
GetDocumentAnalysisResponseTypeDef,
GetDocumentTextDetectionResponseTypeDef,
HumanLoopActivationOutputTypeDef,
HumanLoopConfigTypeDef,
HumanLoopDataAttributesTypeDef,
NotificationChannelTypeDef,
OutputConfigTypeDef,
PointTypeDef,
RelationshipTypeDef,
ResponseMetadata,
S3ObjectTypeDef,
StartDocumentAnalysisResponseTypeDef,
StartDocumentTextDetectionResponseTypeDef,
WarningTypeDef,
)
def get_structure() -> AnalyzeDocumentResponseTypeDef:
return {
...
}
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-textract-1.17.67.0.tar.gz
Algorithm | Hash digest | |
---|---|---|
SHA256 | 06c33159f63c36b6398bd19d4b5ee9af029b9313b485deacc7d4c790b5225511 |
|
MD5 | 6a4d92f3637278e507c71b57df727094 |
|
BLAKE2b-256 | 67281e56389a5d01f3e48284c3af3485a30d3f76c08b5838ceb3e132b30e3617 |
Hashes for mypy_boto3_textract-1.17.67.0-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 878e771519d75b66f999f1f5fabc3b734950d14dcc80aaf74d951d4a56a44fc5 |
|
MD5 | f475b0f34e263c52cc716e462283ad99 |
|
BLAKE2b-256 | 6c6c357802241ec55e962c543c59662e8706aa22f12f47742dc1674634870e0e |