# mypy-boto3-appstream
[![PyPI - mypy-boto3-appstream](https://img.shields.io/pypi/v/mypy-boto3-appstream.svg?color=blue)](https://pypi.org/project/mypy-boto3-appstream)
[![PyPI - Python Version](https://img.shields.io/pypi/pyversions/mypy-boto3-appstream.svg?color=blue)](https://pypi.org/project/mypy-boto3-appstream)
[![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-appstream?color=blue)](https://pypistats.org/packages/mypy-boto3-appstream)
![boto3.typed](https://github.com/vemel/mypy_boto3_builder/raw/master/logo.png)
Type annotations for
[boto3.AppStream 1.17.60](https://boto3.amazonaws.com/v1/documentation/api/1.17.60/reference/services/appstream.html#AppStream) 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-buider 4.6.0](https://github.com/vemel/mypy_boto3_builder).
More information can be found on [boto3-stubs](https://pypi.org/project/boto3-stubs/) page.
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-appstream](#mypy-boto3-appstream)
- [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)
- [Waiters annotations](#waiters-annotations)
- [Service Resource annotations](#service-resource-annotations)
- [Other resources annotations](#other-resources-annotations)
- [Collections annotations](#collections-annotations)
- [Typed dictionations](#typed-dictionations)
## How to install
Install `boto3-stubs` for `AppStream` service.
```bash
python -m pip install boto3-stubs[appstream]
```
## Usage
### 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[appstream]` in your environment: `python -m pip install 'boto3-stubs[appstream]'`
Both type checking and auto-complete should work for `AppStream` service.
No explicit type annotations required, write your `boto3` code as usual.
### PyCharm
- Install `boto-stubs[appstream]` in your environment: `python -m pip install 'boto3-stubs[appstream]'`
Both type checking and auto-complete should work for `AppStream` 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[appstream]` in your environment: `python -m pip install 'boto3-stubs[appstream]'`
- Run `mypy` as usual
Type checking should work for `AppStream` service.
No explicit type annotations required, write your `boto3` code as usual.
### pyright
- Install `pyright`: `yarn global add pyright`
- Install `boto-stubs[appstream]` in your environment: `python -m pip install 'boto3-stubs[appstream]'`
- Optionally, you can install `boto3-stubs` to `typings` folder.
Type checking should work for `AppStream` service.
No explicit type annotations required, write your `boto3` code as usual.
## Explicit type annotations
### Client annotations
`AppStreamClient` provides annotations for `boto3.client("appstream")`.
```python
import boto3
from mypy_boto3_appstream import AppStreamClient
client: AppStreamClient = boto3.client("appstream")
# 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: AppStreamClient = session.client("appstream")
```
### Paginators annotations
`mypy_boto3_appstream.paginator` module contains type annotations for all paginators.
```python
from mypy_boto3_appstream import AppStreamClient
from mypy_boto3_appstream.paginator import (
DescribeDirectoryConfigsPaginator,
DescribeFleetsPaginator,
DescribeImageBuildersPaginator,
DescribeImagesPaginator,
DescribeSessionsPaginator,
DescribeStacksPaginator,
DescribeUserStackAssociationsPaginator,
DescribeUsersPaginator,
ListAssociatedFleetsPaginator,
ListAssociatedStacksPaginator,
)
client: AppStreamClient = boto3.client("appstream")
# Explicit type annotations are optional here
# Type should be correctly discovered by mypy and IDEs
# VSCode requires explicit type annotations
describe_directory_configs_paginator: DescribeDirectoryConfigsPaginator = client.get_paginator("describe_directory_configs")
describe_fleets_paginator: DescribeFleetsPaginator = client.get_paginator("describe_fleets")
describe_image_builders_paginator: DescribeImageBuildersPaginator = client.get_paginator("describe_image_builders")
describe_images_paginator: DescribeImagesPaginator = client.get_paginator("describe_images")
describe_sessions_paginator: DescribeSessionsPaginator = client.get_paginator("describe_sessions")
describe_stacks_paginator: DescribeStacksPaginator = client.get_paginator("describe_stacks")
describe_user_stack_associations_paginator: DescribeUserStackAssociationsPaginator = client.get_paginator("describe_user_stack_associations")
describe_users_paginator: DescribeUsersPaginator = client.get_paginator("describe_users")
list_associated_fleets_paginator: ListAssociatedFleetsPaginator = client.get_paginator("list_associated_fleets")
list_associated_stacks_paginator: ListAssociatedStacksPaginator = client.get_paginator("list_associated_stacks")
```
### Waiters annotations
`mypy_boto3_appstream.waiter` module contains type annotations for all waiters.
```python
from mypy_boto3_appstream import AppStreamClient
from mypy_boto3_appstream.waiter import (
FleetStartedWaiter,
FleetStoppedWaiter,
)
client: AppStreamClient = boto3.client("appstream")
# Explicit type annotations are optional here
# Type should be correctly discovered by mypy and IDEs
# VSCode requires explicit type annotations
fleet_started_waiter: FleetStartedWaiter = client.get_waiter("fleet_started")
fleet_stopped_waiter: FleetStoppedWaiter = client.get_waiter("fleet_stopped")
```
### Typed dictionations
`mypy_boto3_appstream.type_defs` module contains structures and shapes assembled
to typed dictionaries for additional type checking.
```python
from mypy_boto3_appstream.type_defs import (
AccessEndpointTypeDef,
ApplicationSettingsResponseTypeDef,
ApplicationTypeDef,
ComputeCapacityStatusTypeDef,
DirectoryConfigTypeDef,
DomainJoinInfoTypeDef,
FleetErrorTypeDef,
FleetTypeDef,
ImageBuilderStateChangeReasonTypeDef,
ImageBuilderTypeDef,
ImagePermissionsTypeDef,
ImageStateChangeReasonTypeDef,
ImageTypeDef,
LastReportGenerationExecutionErrorTypeDef,
NetworkAccessConfigurationTypeDef,
ResourceErrorTypeDef,
ServiceAccountCredentialsTypeDef,
SessionTypeDef,
SharedImagePermissionsTypeDef,
StackErrorTypeDef,
StackTypeDef,
StorageConnectorTypeDef,
UsageReportSubscriptionTypeDef,
UserSettingTypeDef,
UserStackAssociationErrorTypeDef,
UserStackAssociationTypeDef,
UserTypeDef,
VpcConfigTypeDef,
ApplicationSettingsTypeDef,
BatchAssociateUserStackResultTypeDef,
BatchDisassociateUserStackRes
PyPI 官网下载 | mypy-boto3-appstream-1.17.60.0.tar.gz
版权申诉
33 浏览量
2022-01-13
11:21:01
上传
评论
收藏 16KB GZ 举报
挣扎的蓝藻
- 粉丝: 13w+
- 资源: 15万+
最新资源
- 基于matlab实现 powell算法 用matlab实现,使用方法内附详细说明.rar
- 基于matlab的手写字体识别程序,并对结果进行保存.rar
- 基于c语言指纹识别demo代码 包括了指纹图像方向图计算、频率计算、gabor滤波器增强,细化,特征点提取,特征点匹配.rar
- 基于c++NSGA-2思想的多目标优化程序,采用进化算法处理多目标实值优化问题.rar
- Linux系统中常用权限管理命令
- Coello Coello等人提出了MOPSO 该程序基于matlab实现针对测试函数matlab程序
- Linux系统中常用权限管理命令
- AIR-AP1815-K9-ME-8-5-182-0.tar For Cisco AP1815
- 实验七.zip
- ESP8266刷固件软件flash-download-tools-v3.6.5,AT固件,机智云固件
资源上传下载、课程学习等过程中有任何疑问或建议,欢迎提出宝贵意见哦~我们会及时处理!
点击此处反馈