Type annotations for boto3.Batch 1.13.24 service, generated by mypy-boto3-buider 2.0.2
Project description
mypy-boto3-batch
Type annotations for boto3.Batch 1.13.24 service compatible with mypy, VSCode, PyCharm and other tools.
Generated by mypy-boto3-buider 2.0.2.
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]
# update installed packages index for automated type discovery
python -m mypy_boto3
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")
Automated type discovery
mypy_boto3
package can generate index for mypy_boto3_batch
and other installed services.
# Run this command when you add or remove service packages
python -m mypy_boto3
Generated index provides overloads for boto3.client
and boto3.service
,
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 carefullyVSCode
does not currently support function overloads
Also, generated index allows you to import types from mypy_boto3
:
# you can replace imports
import mypy_boto3_batch as batch
from mypy_boto3_batch import BatchClient
# with these
from mypy_boto3 import batch
from mypy_boto3.batch import BatchClient
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.24.3.tar.gz
Algorithm | Hash digest | |
---|---|---|
SHA256 | 53c6b06ee7bc440446a3ba839ee4c5bc2ffdcbca0fb28c15f3128e2f538bc2be |
|
MD5 | bcf4d188dde08e9438992a9e87fd5694 |
|
BLAKE2b-256 | 3ce43fb0c2ecc7392920c151f8eb306dc697b5663a6c538037442364a8600937 |
Hashes for mypy_boto3_batch-1.13.24.3-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 0944a08a8d6bfaf8429ff5c132845305db0d3376630084813ea26ea313e8f110 |
|
MD5 | 09d1d32da2162786f9bc1d793be8b4fa |
|
BLAKE2b-256 | e907eaf662a4a08de793e3c896a8d9f085b04ba3b415cbd2f13d88fdf2cdc5d0 |