Type annotations for boto3.Batch 1.13.26 service, generated by mypy-boto3-buider 2.0.2
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.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.26.0.tar.gz
Algorithm | Hash digest | |
---|---|---|
SHA256 | c36510f9b31408d0a21e8c21364250a8837da14430e2171e82b675007479d41b |
|
MD5 | 576dba9752f8be2720afc521de2b8527 |
|
BLAKE2b-256 | 89f2c179b557f2d909f60570ef4ec2fec7088607c74eec9e1d9dba90a7619c82 |
Hashes for mypy_boto3_batch-1.13.26.0-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | c150e3e01843506a545c4143d9f827689b5ac3f562c892665a014a6918637236 |
|
MD5 | 6606d232dee05f63d70d5e585c2869ca |
|
BLAKE2b-256 | 3054fd19705ed18faee9b57de602331300ad67f9bcf3ffd1f70e69b348b242a5 |