Type annotations for boto3.Braket 1.14.54 service, generated by mypy-boto3-buider 2.4.0
Project description
mypy-boto3-braket
Type annotations for boto3.Braket 1.14.54 service compatible with mypy, VSCode, PyCharm and other tools.
Generated by mypy-boto3-buider 2.4.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 Braket
service.
python -m pip install boto3-stubs[braket]
How to use
Client annotations
BraketClient
provides annotations for boto3.client("braket")
.
import boto3
from mypy_boto3_braket import BraketClient
from mypy_boto3_braket.paginator import SearchDevicesPaginator, SearchQuantumTasksPaginator
from mypy_boto3_braket.type_defs import DeviceSummaryTypeDef, ...
client: BraketClient = boto3.client("braket")
# 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: BraketClient = session.client("braket")
Paginators annotations
mypy_boto3_braket.paginator
module contains type annotations for all paginators.
client: BraketClient = boto3.client("braket")
# Explicit type annotations are optional here
# Type should be correctly discovered by mypy and IDEs
# VSCode requires explicit type annotations
search_devices_paginator: SearchDevicesPaginator = client.get_paginator("search_devices")
search_quantum_tasks_paginator: SearchQuantumTasksPaginator = client.get_paginator("search_quantum_tasks")
Typed dictionations
mypy_boto3_braket.type_defs
module contains structures and shapes assembled
to typed dictionaries for additional type checking.
def get_structure() -> DeviceSummaryTypeDef:
return {
...
}
Dynamic type annotations
mypy_boto3
command generates boto3.client/resource
type annotations for
mypy_boto3_braket
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("braket")
session_client = boto3.Session().client("braket")
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-braket-1.14.54.0.tar.gz
Algorithm | Hash digest | |
---|---|---|
SHA256 | b7f5e75a89c9800346d3c991b259e7fdca9aacd73c24a137f39e52317e5745f8 |
|
MD5 | 7e6c99e10645acf2f5e7edbcf110117e |
|
BLAKE2b-256 | 9fad3d78d0b1941611b2c6cba70af2577be8086878f4db15e67632c70c4deb64 |
Hashes for mypy_boto3_braket-1.14.54.0-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | e10c74af8d7c041055d7898cc58e556d971f299cac2da6ef12c0196b9a84ab4f |
|
MD5 | 6a9b5ef387fae0c38042cd6e0fe88b95 |
|
BLAKE2b-256 | 935122447bf00a94aa5f26c138e990972e10464467dbc1be167d3669b0dbadd7 |