Type annotations for boto3.Batch 1.13.25 service, generated by mypy-boto3-buider 2.0.2
Project description
mypy-boto3-batch
Type annotations for boto3.Batch 1.13.25 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.25.0.tar.gz
Algorithm | Hash digest | |
---|---|---|
SHA256 | edc5a0ff7d90b9b5003d1f255cbf3aab1cfeb3fb9e82229a8699c3c66fc28164 |
|
MD5 | 9225ec299795a272e4249dde9ab03f1f |
|
BLAKE2b-256 | 3160f5e878c3aa9ef1f4de0b02f156f28b56cec41a7ce857ad010102ccc0a9c1 |
Hashes for mypy_boto3_batch-1.13.25.0-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 110bb698ff15adf49bd9a2830cee1cc723fbc04599c2cb07b1443515701f78c2 |
|
MD5 | c06792cff37abb9d2bc4ba6e72f23457 |
|
BLAKE2b-256 | e9e8fbaa8f98588a613c05f3d7104284739a1adf1296ab98a011673bd27620b4 |