Type annotations for boto3.Glacier 1.13.26 service, generated by mypy-boto3-buider 2.0.3
Project description
mypy-boto3-glacier
Type annotations for boto3.Glacier 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 Glacier
service.
python -m pip install boto3-stubs[glacier]
# update installed packages index for automated type discovery
python -m mypy_boto3
Use boto3
with mypy_boto3_glacier
in your project and enjoy type checking and auto-complete.
import boto3
from mypy_boto3_glacier import GlacierClient
# Now mypy can check if your code is valid.
client: GlacierClient = boto3.client("glacier")
# works for session as well
session = boto3.session.Session(region="us-west-1")
session_client: GlacierClient = session.client("glacier")
# Do you prefer resource approach? We've got you covered!
from mypy_boto3_glacier import GlacierServiceResource
resource: glacier.GlacierServiceResource = boto3.resource("glacier")
# Waiters are also supported
import mypy_boto3_glacier.waiter as glacier_waiters
vault_exists_waiter: glacier_waiters.VaultExistsWaiter = client.get_waiter("vault_exists")
vault_not_exists_waiter: glacier_waiters.VaultNotExistsWaiter = client.get_waiter("vault_not_exists")
# Annotated paginators are included as well
import mypy_boto3_glacier.paginator as glacier_paginators
list_jobs_paginator: glacier_paginators.ListJobsPaginator = client.get_paginator("list_jobs")
list_multipart_uploads_paginator: glacier_paginators.ListMultipartUploadsPaginator = client.get_paginator("list_multipart_uploads")
list_parts_paginator: glacier_paginators.ListPartsPaginator = client.get_paginator("list_parts")
list_vaults_paginator: glacier_paginators.ListVaultsPaginator = client.get_paginator("list_vaults")
Automated type discovery
mypy_boto3
package can generate index for mypy_boto3_glacier
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_glacier as glacier
from mypy_boto3_glacier import GlacierClient
# with these
from mypy_boto3 import glacier
from mypy_boto3.glacier import GlacierClient
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-glacier-1.13.26.1.tar.gz
Algorithm | Hash digest | |
---|---|---|
SHA256 | 85b62f0c05937430be0a49a6c52f6d3f3b0d1a5851062fa66a8a6d2ff611b88c |
|
MD5 | 24acb581c665c128c6b47ba2a74b5d6a |
|
BLAKE2b-256 | 67a5b41d6363ef20ae4343f2db6505fa1900e35106f8ee0f123d9c88354c6d90 |
Hashes for mypy_boto3_glacier-1.13.26.1-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 966f458da9211447304288ab0464fa4ad8d8b2798b28c0f0f50f30e889bbee51 |
|
MD5 | d3337e60cd86ffe7410ceddcef055355 |
|
BLAKE2b-256 | 245cfdd0f4a59a5191cf42cc7cefba81522679f056d92e9e6312713e103aa928 |