Type annotations for boto3.Glacier 1.13.25 service, generated by mypy-boto3-buider 2.0.2
Project description
mypy-boto3-glacier
Type annotations for boto3.Glacier 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 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.25.0.tar.gz
Algorithm | Hash digest | |
---|---|---|
SHA256 | f67c7375248f8d4186897e2ca069542199ec60e749e250229a5dee1b6140df40 |
|
MD5 | ce01ed3bbf73281cf0cb3d225e90b599 |
|
BLAKE2b-256 | 87555d38fe6bbdc4a52b1c0b9d6de8e411964d461a08c9d49da32805ade374e6 |
Hashes for mypy_boto3_glacier-1.13.25.0-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | a00341486592a43ebe7abe1c6e8922b99fb9adba65dcf8c19134d893154c126a |
|
MD5 | d95ab2ff10071bda449c708720cb48b1 |
|
BLAKE2b-256 | 9f82ccb444295363326e4a599045885c8daf2c098728b7a37dfef010c435ead4 |