Type annotations for boto3.Glacier 1.14.0 service, generated by mypy-boto3-buider 2.1.0
Project description
mypy-boto3-glacier
Type annotations for boto3.Glacier 1.14.0 service compatible with mypy, VSCode, PyCharm and other tools.
Generated by mypy-boto3-buider 2.1.0.
More information can be found on boto3-stubs page.
How to install
Make sure you have mypy installed and activated in your IDE.
Install boto3-stubs
for Glacier
service.
python -m pip install boto3-stubs[glacier]
How to use
Client annotations
GlacierClient
provides annotations for boto3.client("glacier")
.
import boto3
from mypy_boto3_glacier import GlacierClient
client: GlacierClient = boto3.client("glacier")
# now client usage is checked by mypy and IDE should provide code auto-complete
# works for session as well
session = boto3.session.Session(region="us-west-1")
session_client: GlacierClient = session.client("glacier")
Paginators annotations
mypy_boto3_glacier.paginator
module contains type annotations for all paginators.
from mypy_boto3_glacier import GlacierClient
from mypy_boto3_glacier.paginator import (
ListJobsPaginator,
ListMultipartUploadsPaginator,
ListPartsPaginator,
ListVaultsPaginator,
)
client: GlacierClient = boto3.client("glacier")
# Explicit type annotations are optional here
# Type should be correctly discovered by mypy and IDEs
# VSCode requires explicit type annotations
list_jobs_paginator: ListJobsPaginator = client.get_paginator("list_jobs")
list_multipart_uploads_paginator: ListMultipartUploadsPaginator = client.get_paginator("list_multipart_uploads")
list_parts_paginator: ListPartsPaginator = client.get_paginator("list_parts")
list_vaults_paginator: ListVaultsPaginator = client.get_paginator("list_vaults")
Waiters annotations
mypy_boto3_glacier.waiter
module contains type annotations for all waiters.
from mypy_boto3_glacier import GlacierClient
from mypy_boto3_glacier.waiter import (
VaultExistsWaiter,
VaultNotExistsWaiter,
)
client: GlacierClient = boto3.client("glacier")
# Explicit type annotations are optional here
# Type should be correctly discovered by mypy and IDEs
# VSCode requires explicit type annotations
vault_exists_waiter: VaultExistsWaiter = client.get_waiter("vault_exists")
vault_not_exists_waiter: VaultNotExistsWaiter = client.get_waiter("vault_not_exists")
Service Resource annotations
GlacierServiceResource
provides annotations for boto3.resource("glacier")
.
from mypy_boto3_glacier import GlacierServiceResource
resource: GlacierServiceResource = boto3.resource("glacier")
# now resource usage is checked by mypy and IDE should provide code auto-complete
# works for session as well
session = boto3.session.Session(region="us-west-1")
session_resource: GlacierServiceResource = session.resource("glacier")
Other resources annotations
mypy_boto3_glacier.service_resource
module contains type annotations for all resources.
from mypy_boto3_glacier import GlacierServiceResource
from mypy_boto3_glacier.service_resource import (
Account,
Archive,
Job,
MultipartUpload,
Notification,
Vault,
)
resource: GlacierServiceResource = boto3.resource("glacier")
# Explicit type annotations are optional here
# Type should be correctly discovered by mypy and IDEs
my_account: Account = resource.Account(...)
my_archive: Archive = resource.Archive(...)
my_job: Job = resource.Job(...)
my_multipart_upload: MultipartUpload = resource.MultipartUpload(...)
my_notification: Notification = resource.Notification(...)
my_vault: Vault = resource.Vault(...)
Collections annotations
mypy_boto3_glacier.service_resource
module contains type annotations
for all GlacierServiceResource
collections.
from mypy_boto3_glacier import GlacierServiceResource
from mypy_boto3_glacier.service_resource import (
ServiceResourceVaultsCollection,
)
resource: GlacierServiceResource = boto3.resource("glacier")
# Explicit type annotations are optional here
# Type should be correctly discovered by mypy and IDEs
vaults: glacier_resources.ServiceResourceVaultsCollection = resource.vaults
Typed dictionations
mypy_boto3_glacier.type_defs
module contains structures and shapes assembled
to typed dictionaries for additional type checking.
from mypy_boto3_glacier.type_defs import CSVInputTypeDef, ...
def get_structure() -> CSVInputTypeDef:
return {
...
}
Dynamic type annotations
mypy_boto3
command generates boto3.client/resource
type annotations for
mypy_boto3_glacier
and other installed services.
# Run this command after you add or remove service packages
python -m mypy_boto3
Generated type annotations provide overloads for boto3.client
and boto3.resource
,
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 carefully if you have many services installedVSCode
does not currently support function overloads, use explicit type annotations
import boto3
# Type is discovered correctly by mypy and PyCharm
# VSCode still needs explicit type annotations
client = boto3.client("glacier")
resource = boto3.resource("glacier")
session_client = boto3.Session().client("glacier")
session_resource = boto3.Session().resource("glacier")
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.14.0.1.tar.gz
Algorithm | Hash digest | |
---|---|---|
SHA256 | 33b4dc06e40cfe6230de39b3dec7d4da36781753f15bf3793b2c08af9c79f538 |
|
MD5 | 1ee606af46225de4d392a8b8f37f1c7c |
|
BLAKE2b-256 | 874353f8e0c4b1b72c4f1cd9d7913cf339d742dfe0331f292c2aede607df7b72 |
Hashes for mypy_boto3_glacier-1.14.0.1-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 5f753627c1839ebc5fe97863431fbe3f6c8f001b3997c7dafe7cc8196b6cbbbd |
|
MD5 | 4dd6d5a5fdd0622caf2160245dd2e5e6 |
|
BLAKE2b-256 | 9f61d6a542cf1be44534c68ce4326140a21386fb4795bc202d535aebd9c91c70 |