Skip to main content

Type annotations for boto3.Greengrass 1.14.2 service, generated by mypy-boto3-buider 2.2.0

Project description

mypy-boto3-greengrass

PyPI - mypy-boto3-greengrass PyPI - Python Version Docs

Type annotations for boto3.Greengrass 1.14.2 service compatible with mypy, VSCode, PyCharm and other tools.

Generated by mypy-boto3-buider 2.2.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 Greengrass service.

python -m pip install boto3-stubs[greengrass]

How to use

Client annotations

GreengrassClient provides annotations for boto3.client("greengrass").

import boto3

from mypy_boto3_greengrass import GreengrassClient
from mypy_boto3_greengrass.paginator import (
    ListBulkDeploymentDetailedReportsPaginator,
    ListBulkDeploymentsPaginator,
    ListConnectorDefinitionsPaginator,
    ListConnectorDefinitionVersionsPaginator,
    ListCoreDefinitionsPaginator,
    ListCoreDefinitionVersionsPaginator,
    ListDeploymentsPaginator,
    ListDeviceDefinitionsPaginator,
    ListDeviceDefinitionVersionsPaginator,
    ListFunctionDefinitionsPaginator,
    ListFunctionDefinitionVersionsPaginator,
    ListGroupsPaginator,
    ListGroupVersionsPaginator,
    ListLoggerDefinitionsPaginator,
    ListLoggerDefinitionVersionsPaginator,
    ListResourceDefinitionsPaginator,
    ListResourceDefinitionVersionsPaginator,
    ListSubscriptionDefinitionsPaginator,
    ListSubscriptionDefinitionVersionsPaginator,
)
from mypy_boto3_greengrass.type_defs import BulkDeploymentMetricsTypeDef, ...

client: GreengrassClient = boto3.client("greengrass")

# 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: GreengrassClient = session.client("greengrass")

Paginators annotations

mypy_boto3_greengrass.paginator module contains type annotations for all paginators.

client: GreengrassClient = boto3.client("greengrass")

# Explicit type annotations are optional here
# Type should be correctly discovered by mypy and IDEs
# VSCode requires explicit type annotations
list_bulk_deployment_detailed_reports_paginator: ListBulkDeploymentDetailedReportsPaginator = client.get_paginator("list_bulk_deployment_detailed_reports")
list_bulk_deployments_paginator: ListBulkDeploymentsPaginator = client.get_paginator("list_bulk_deployments")
list_connector_definition_versions_paginator: ListConnectorDefinitionVersionsPaginator = client.get_paginator("list_connector_definition_versions")
list_connector_definitions_paginator: ListConnectorDefinitionsPaginator = client.get_paginator("list_connector_definitions")
list_core_definition_versions_paginator: ListCoreDefinitionVersionsPaginator = client.get_paginator("list_core_definition_versions")
list_core_definitions_paginator: ListCoreDefinitionsPaginator = client.get_paginator("list_core_definitions")
list_deployments_paginator: ListDeploymentsPaginator = client.get_paginator("list_deployments")
list_device_definition_versions_paginator: ListDeviceDefinitionVersionsPaginator = client.get_paginator("list_device_definition_versions")
list_device_definitions_paginator: ListDeviceDefinitionsPaginator = client.get_paginator("list_device_definitions")
list_function_definition_versions_paginator: ListFunctionDefinitionVersionsPaginator = client.get_paginator("list_function_definition_versions")
list_function_definitions_paginator: ListFunctionDefinitionsPaginator = client.get_paginator("list_function_definitions")
list_group_versions_paginator: ListGroupVersionsPaginator = client.get_paginator("list_group_versions")
list_groups_paginator: ListGroupsPaginator = client.get_paginator("list_groups")
list_logger_definition_versions_paginator: ListLoggerDefinitionVersionsPaginator = client.get_paginator("list_logger_definition_versions")
list_logger_definitions_paginator: ListLoggerDefinitionsPaginator = client.get_paginator("list_logger_definitions")
list_resource_definition_versions_paginator: ListResourceDefinitionVersionsPaginator = client.get_paginator("list_resource_definition_versions")
list_resource_definitions_paginator: ListResourceDefinitionsPaginator = client.get_paginator("list_resource_definitions")
list_subscription_definition_versions_paginator: ListSubscriptionDefinitionVersionsPaginator = client.get_paginator("list_subscription_definition_versions")
list_subscription_definitions_paginator: ListSubscriptionDefinitionsPaginator = client.get_paginator("list_subscription_definitions")

Typed dictionations

mypy_boto3_greengrass.type_defs module contains structures and shapes assembled to typed dictionaries for additional type checking.

def get_structure() -> BulkDeploymentMetricsTypeDef:
    return {
      ...
    }

Dynamic type annotations

mypy_boto3 command generates boto3.client/resource type annotations for mypy_boto3_greengrass 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 expected
  • PyCharm also supports function overloads, but consumes a lot of RAM, use carefully if you have many services installed
  • VSCode does not currently support function overloads, use explicit type annotations
# Type is discovered correctly by mypy and PyCharm
# VSCode still needs explicit type annotations
client = boto3.client("greengrass")

session_client = boto3.Session().client("greengrass")

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

mypy-boto3-greengrass-1.14.2.0.tar.gz (14.7 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

mypy_boto3_greengrass-1.14.2.0-py3-none-any.whl (14.0 kB view details)

Uploaded Python 3

File details

Details for the file mypy-boto3-greengrass-1.14.2.0.tar.gz.

File metadata

  • Download URL: mypy-boto3-greengrass-1.14.2.0.tar.gz
  • Upload date:
  • Size: 14.7 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.1.1 pkginfo/1.5.0.1 requests/2.23.0 setuptools/41.2.0 requests-toolbelt/0.9.1 tqdm/4.46.1 CPython/3.8.3

File hashes

Hashes for mypy-boto3-greengrass-1.14.2.0.tar.gz
Algorithm Hash digest
SHA256 a6574ca4848aa8d1e6c4b8a973fd710f2c0d1ceeb7c99ee3509d86f283869012
MD5 5c48f12e7450a8172e1f2257fa218a20
BLAKE2b-256 ecf1189c7a3eef36f78a28b603ba62f421c88e014b0b1ebaba5416c66f1b7b07

See more details on using hashes here.

File details

Details for the file mypy_boto3_greengrass-1.14.2.0-py3-none-any.whl.

File metadata

  • Download URL: mypy_boto3_greengrass-1.14.2.0-py3-none-any.whl
  • Upload date:
  • Size: 14.0 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.1.1 pkginfo/1.5.0.1 requests/2.23.0 setuptools/41.2.0 requests-toolbelt/0.9.1 tqdm/4.46.1 CPython/3.8.3

File hashes

Hashes for mypy_boto3_greengrass-1.14.2.0-py3-none-any.whl
Algorithm Hash digest
SHA256 efc3561b9ca524468a1048ceb0fe717d93d3ca1937b2bccbd4a7404e9d1df440
MD5 ae8c5b8c91394b5a183bf62d2a0a8637
BLAKE2b-256 629ca11a47479279643a24df635496f849be843338b482557c1f8a19bf5d7b4b

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page