Type annotations for boto3.Batch 1.14.0 service, generated by mypy-boto3-buider 2.0.4
Project description
mypy-boto3-batch
Type annotations for boto3.Batch 1.14.0 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.14.0.0.tar.gz
Algorithm | Hash digest | |
---|---|---|
SHA256 | 6c9e01b2ce6feac6d594cc15e9235ccd55bd75f055279b7fdb106aba179d37a0 |
|
MD5 | 02d223842d4993b63844c4e493a519dd |
|
BLAKE2b-256 | 0ff18f55229db64b046eaff26ce922ee41a1786e897647ff7f05aa5db8c62dbd |
Hashes for mypy_boto3_batch-1.14.0.0-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 4962c4108d6c1176b7707ca4ede3e2f0f2cf175a70b1922cbd3b6669eb3d223e |
|
MD5 | 83ea4a84b2a015b8af34cef6fdbb30c3 |
|
BLAKE2b-256 | 01ed8bcc1bae682425cd245bf191e64817efd0603908cf46b4aa25afe2089db2 |