<a id="mypy-boto3-translate"></a>
# mypy-boto3-translate
[![PyPI - mypy-boto3-translate](https://img.shields.io/pypi/v/mypy-boto3-translate.svg?color=blue)](https://pypi.org/project/mypy-boto3-translate)
[![PyPI - Python Version](https://img.shields.io/pypi/pyversions/mypy-boto3-translate.svg?color=blue)](https://pypi.org/project/mypy-boto3-translate)
[![Docs](https://img.shields.io/readthedocs/mypy-boto3-builder.svg?color=blue)](https://mypy-boto3-builder.readthedocs.io/)
[![PyPI - Downloads](https://img.shields.io/pypi/dw/mypy-boto3-translate?color=blue)](https://pypistats.org/packages/mypy-boto3-translate)
![boto3.typed](https://github.com/vemel/mypy_boto3_builder/raw/master/logo.png)
Type annotations for
[boto3.Translate 1.18.36](https://boto3.amazonaws.com/v1/documentation/api/1.18.36/reference/services/translate.html#Translate)
service compatible with [VSCode](https://code.visualstudio.com/),
[PyCharm](https://www.jetbrains.com/pycharm/),
[Emacs](https://www.gnu.org/software/emacs/),
[Sublime Text](https://www.sublimetext.com/),
[mypy](https://github.com/python/mypy),
[pyright](https://github.com/microsoft/pyright) and other tools.
Generated by
[mypy-boto3-builder 5.2.0](https://github.com/vemel/mypy_boto3_builder).
More information can be found on
[boto3-stubs](https://pypi.org/project/boto3-stubs/) page and in
[mypy-boto3-translate docs](https://vemel.github.io/boto3_stubs_docs/mypy_boto3_translate/)
See how it helps to find and fix potential bugs:
![boto3-stubs demo](https://github.com/vemel/mypy_boto3_builder/raw/master/demo.gif)
- [mypy-boto3-translate](#mypy-boto3-translate)
- [How to install](#how-to-install)
- [Usage](#usage)
- [VSCode](#vscode)
- [PyCharm](#pycharm)
- [Other IDEs](#other-ides)
- [mypy](#mypy)
- [pyright](#pyright)
- [Explicit type annotations](#explicit-type-annotations)
- [Client annotations](#client-annotations)
- [Paginators annotations](#paginators-annotations)
- [Literals](#literals)
- [Typed dictionaries](#typed-dictionaries)
- [Versioning](#versioning)
- [Documentation](#documentation)
- [Support and contributing](#support-and-contributing)
<a id="how-to-install"></a>
## How to install
Install `boto3-stubs` for `Translate` service.
```bash
python -m pip install boto3-stubs[translate]
```
<a id="usage"></a>
## Usage
<a id="vscode"></a>
### VSCode
- Install
[Python extension](https://marketplace.visualstudio.com/items?itemName=ms-python.python)
- Install
[Pylance extension](https://marketplace.visualstudio.com/items?itemName=ms-python.vscode-pylance)
- Set `Pylance` as your Python Language Server
- Install `boto-stubs[translate]` in your environment:
`python -m pip install 'boto3-stubs[translate]'`
Both type checking and auto-complete should work for `Translate` service. No
explicit type annotations required, write your `boto3` code as usual.
<a id="pycharm"></a>
### PyCharm
- Install `boto-stubs[translate]` in your environment:
`python -m pip install 'boto3-stubs[translate]'`
Both type checking and auto-complete should work for `Translate` 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.
<a id="other-ides"></a>
### Other IDEs
Not tested, but as long as your IDE supports `mypy` or `pyright`, everything
should work.
<a id="mypy"></a>
### mypy
- Install `mypy`: `python -m pip install mypy`
- Install `boto-stubs[translate]` in your environment:
`python -m pip install 'boto3-stubs[translate]'`
- Run `mypy` as usual
Type checking should work for `Translate` service. No explicit type annotations
required, write your `boto3` code as usual.
<a id="pyright"></a>
### pyright
- Install `pyright`: `yarn global add pyright`
- Install `boto-stubs[translate]` in your environment:
`python -m pip install 'boto3-stubs[translate]'`
- Optionally, you can install `boto3-stubs` to `typings` folder.
Type checking should work for `Translate` service. No explicit type annotations
required, write your `boto3` code as usual.
<a id="explicit-type-annotations"></a>
## Explicit type annotations
<a id="client-annotations"></a>
### Client annotations
`TranslateClient` provides annotations for `boto3.client("translate")`.
```python
import boto3
from mypy_boto3_translate import TranslateClient
client: TranslateClient = boto3.client("translate")
# 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: TranslateClient = session.client("translate")
```
<a id="paginators-annotations"></a>
### Paginators annotations
`mypy_boto3_translate.paginator` module contains type annotations for all
paginators.
```python
from mypy_boto3_translate import TranslateClient
from mypy_boto3_translate.paginator import (
ListTerminologiesPaginator,
)
client: TranslateClient = boto3.client("translate")
# Explicit type annotations are optional here
# Type should be correctly discovered by mypy and IDEs
# VSCode requires explicit type annotations
list_terminologies_paginator: ListTerminologiesPaginator = client.get_paginator("list_terminologies")
```
<a id="literals"></a>
### Literals
`mypy_boto3_translate.literals` module contains literals extracted from shapes
that can be used in user code for type checking.
```python
from mypy_boto3_translate.literals import (
EncryptionKeyTypeType,
JobStatusType,
ListTerminologiesPaginatorName,
MergeStrategyType,
ParallelDataFormatType,
ParallelDataStatusType,
TerminologyDataFormatType,
)
def check_value(value: EncryptionKeyTypeType) -> bool:
...
```
<a id="typed-dictionaries"></a>
### Typed dictionaries
`mypy_boto3_translate.type_defs` module contains structures and shapes
assembled to typed dictionaries for additional type checking.
```python
from mypy_boto3_translate.type_defs import (
AppliedTerminologyTypeDef,
CreateParallelDataRequestRequestTypeDef,
CreateParallelDataResponseTypeDef,
DeleteParallelDataRequestRequestTypeDef,
DeleteParallelDataResponseTypeDef,
DeleteTerminologyRequestRequestTypeDef,
DescribeTextTranslationJobRequestRequestTypeDef,
DescribeTextTranslationJobResponseTypeDef,
EncryptionKeyTypeDef,
GetParallelDataRequestRequestTypeDef,
GetParallelDataResponseTypeDef,
GetTerminologyRequestRequestTypeDef,
GetTerminologyResponseTypeDef,
ImportTerminologyRequestRequestTypeDef,
ImportTerminologyResponseTypeDef,
InputDataConfigTypeDef,
JobDetailsTypeDef,
ListParallelDataRequestRequestTypeDef,
ListParallelDataResponseTypeDef,
ListTerminologiesRequestRequestTypeDef,
ListTerminologiesResponseTypeDef,
ListTextTranslationJobsRequestRequestTypeDef,
ListTextTranslationJobsResponseTypeDef,
OutputDataConfigTypeDef,
PaginatorConfigTypeDef,
ParallelDataConfigTypeDef,
ParallelDataDataLocationTypeDef,
ParallelDataPropertiesTypeDef,
ResponseMetadataTypeDef,
StartTextTranslationJobRequestRequestTypeDef,
StartTextTranslationJobResponseTypeDef,
StopTextTranslationJobRequestRequestTypeDef,
StopTextTranslationJobResponseTypeDef,
TermTypeDef,
TerminologyDataLocationTypeDef,
TerminologyDataTypeDef,
TerminologyPropertiesTypeDef,
TextTranslationJobFilterTypeDef,
TextTranslationJobPropertiesTypeDef,
TranslateTextRequestRequestTypeDef,
TranslateTextResponseTypeDef,
UpdateParallelDataRequestRequestTypeDef,
UpdateParallelDataResponseTypeDef,
)
def get_structure() -> AppliedTerminologyTypeDef:
return {
...
}
```
<a id="versioning"></a>
## Versioning
`mypy-boto3-translate` version is the same as related `boto3` version and
follows [PEP 440](https://www.python.org/dev/peps/pep-0440/) format.
<a id="documentation"></a>
## Documentation
All type annotations can be f
PyPI 官网下载 | mypy-boto3-translate-1.18.36.tar.gz
版权申诉
55 浏览量
2022-01-14
05:03:23
上传
评论
收藏 12KB GZ 举报
挣扎的蓝藻
- 粉丝: 13w+
- 资源: 15万+
最新资源
- 计算机视觉(CV)open CV 人脸识别程序.docx
- python 端午节游戏,选择三个传统的端午节活动之一:包粽子、赛龙舟或挂艾草 根据玩家的选择,游戏会描述相应的情节,并在完成后
- 数据库连接(MySQL与VS2022)_vs2022 mysql-CSDN博客 (2024_6_1 19_11_34).html
- 数电实验五:555单稳态触发电路、555单稳态触发电路、555构成的施密特触发器
- MySQLTuner,一个用Perl编写的脚本,它允许你快速审查MySQL安装情况,并进行调整以提高性能和稳定性
- 冒泡排序 基础排序 插入排序 快速排序 双路快速排序 三路快速排序 堆排序.zip
- 数电实验四:加法计数器、减法计数器、加法器、建议数字钟、74LS192功能测试
- JSP基于网络超市商品销售管理系统的设计与实现(源代码+lw).zip
- JSP基于WEB网上论坛设计与实现(源代码+lw+开题报告+答辩PPT+外文翻译).zip
- JSP基于WEB的图书馆借阅系统的设计与实现(源代码+lw).zip
资源上传下载、课程学习等过程中有任何疑问或建议,欢迎提出宝贵意见哦~我们会及时处理!
点击此处反馈