Type annotations for boto3.Batch 1.13.26 service, generated by mypy-boto3-buider 2.0.3
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.3.
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.26.1.tar.gz
Algorithm | Hash digest | |
---|---|---|
SHA256 | c8338aff61de15439b79c6b5826be63f63cff0e3a07df0793b212254706e2a57 |
|
MD5 | 9d695f8b6efd49ca26e73bf42f6f4ef0 |
|
BLAKE2b-256 | b002fd004fe9944a2bbc79193e1562152c4972484de329612f9a9d3f2dbbad89 |
Hashes for mypy_boto3_batch-1.13.26.1-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 790130a901326019ccc8272592f671384ab485a0498cf682c00f58b04833d7a1 |
|
MD5 | 79b30185c87b2e328fcfd5f6ee019cf9 |
|
BLAKE2b-256 | ebece20c9016929c9554cf82c716168a4983b3602e6329dffb74baf2abc3b89d |