Type annotations for boto3.Glacier 1.13.24 service, generated by mypy-boto3-buider 2.0.2
Project description
mypy-boto3-glacier
Type annotations for boto3.Glacier 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 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.24.3.tar.gz
Algorithm | Hash digest | |
---|---|---|
SHA256 | 6396953d62671e1771f4678443b6f8ac08de7d48f64ed7b57ffbfe5633f51f7a |
|
MD5 | d759f57e7979fc6a0a6ef08bf385dc32 |
|
BLAKE2b-256 | 6b0bcd70cf15f72080cbccf923cdad441959465d8d609fc328c5304bb9b0f5f2 |
Hashes for mypy_boto3_glacier-1.13.24.3-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | f4b40b515135a24a91f3a9fcff4a978d86b4d067a3b38aa47c4dd2c55d3ac829 |
|
MD5 | 2923312843b1a67d79d69e0628bf64da |
|
BLAKE2b-256 | c01bec7d19da6ac33341e5d8672575abad9f13df9b35ae9c6501d0587310eb8c |