Type annotations for boto3.Batch 1.13.26 service, generated by mypy-boto3-buider 2.0.4
Project description
mypy-boto3-batch
Type annotations for boto3.Batch 1.13.26 service compatible with mypy, VSCode, PyCharm and other tools.
Generated by mypy-boto3-buider 2.0.4.
More information can be found on boto3-stubs page.
How to use
Make sure you have mypy installed and activated in your IDE.
Install boto3-stubs
for Batch
service.
python -m pip install boto3-stubs[batch]
Use boto3
with mypy_boto3_batch
in your project and enjoy type checking and auto-complete.
import boto3
from mypy_boto3_batch import BatchClient
# Now mypy can check if your code is valid.
client: BatchClient = boto3.client("batch")
# works for session as well
session = boto3.session.Session(region="us-west-1")
session_client: BatchClient = session.client("batch")
# Annotated paginators are included as well
import mypy_boto3_batch.paginator as batch_paginators
describe_compute_environments_paginator: batch_paginators.DescribeComputeEnvironmentsPaginator = client.get_paginator("describe_compute_environments")
describe_job_definitions_paginator: batch_paginators.DescribeJobDefinitionsPaginator = client.get_paginator("describe_job_definitions")
describe_job_queues_paginator: batch_paginators.DescribeJobQueuesPaginator = client.get_paginator("describe_job_queues")
list_jobs_paginator: batch_paginators.ListJobsPaginator = client.get_paginator("list_jobs")
Dynamic type annotations
mypy_boto3
command generates boto3.client/resource
type annotations for
mypy_boto3_batch
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
import boto3
# Type is discovered correctly by mypy and PyCharm
# VSCode still needs explicit type annotations
client = boto3.client("batch")
session_client = boto3.Session().client("batch")
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-batch-1.13.26.2.tar.gz
Algorithm | Hash digest | |
---|---|---|
SHA256 | 7b4b1795da4e88dbc188b0b893d666cdb6f31671bf647b7477359cb6b13457fc |
|
MD5 | 20119e3d42b1e6ab7fa50b003a19ad77 |
|
BLAKE2b-256 | ac7136470a0b4f43b60446d40e71eda58dad26f51ea0a618265386ba85598905 |
Hashes for mypy_boto3_batch-1.13.26.2-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 186a8e3c988c012a18b1045d0eb17e065b75b067821e77a24bee7cec1265c42a |
|
MD5 | 2467365fac1282fdb4863443ae2a1608 |
|
BLAKE2b-256 | 4314d5dea9ad9edcd70ed59c97ffc551933bb3039ed47f622909679dd9ddac6e |