Type annotations for boto3.Glacier 1.13.26 service, generated by mypy-boto3-buider 2.0.2
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.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.26.0.tar.gz
Algorithm | Hash digest | |
---|---|---|
SHA256 | 9bd4551671745bb497f73942e8d9c423926f02181022894e4326b32abfebe824 |
|
MD5 | 5e0bf3fef345a7e4e749dcedf3321090 |
|
BLAKE2b-256 | 73ed1d90bdae93f98e2f7424b13f3f6a5d677d4dfdc1c4c7ff03bdac4703c9e5 |
Hashes for mypy_boto3_glacier-1.13.26.0-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | ae7f2fe34399fb7af314fb5f04a14b5ce4f62e3c7f5f62e9667ee442ee4dd0cd |
|
MD5 | a48d09195889c28807230fb39858eec9 |
|
BLAKE2b-256 | ed62d21d0e87f24809e815825164a52a05c7998e3302ea4dbbb30aaad67c93f5 |