Skip to main content

Type annotations for boto3.Lightsail 1.14.25 service, generated by mypy-boto3-buider 2.2.0

Project description

mypy-boto3-lightsail

PyPI - mypy-boto3-lightsail PyPI - Python Version Docs

Type annotations for boto3.Lightsail 1.14.25 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 Lightsail service.

python -m pip install boto3-stubs[lightsail]

How to use

Client annotations

LightsailClient provides annotations for boto3.client("lightsail").

import boto3

from mypy_boto3_lightsail import LightsailClient
from mypy_boto3_lightsail.paginator import (
    GetActiveNamesPaginator,
    GetBlueprintsPaginator,
    GetBundlesPaginator,
    GetCloudFormationStackRecordsPaginator,
    GetDiskSnapshotsPaginator,
    GetDisksPaginator,
    GetDomainsPaginator,
    GetExportSnapshotRecordsPaginator,
    GetInstanceSnapshotsPaginator,
    GetInstancesPaginator,
    GetKeyPairsPaginator,
    GetLoadBalancersPaginator,
    GetOperationsPaginator,
    GetRelationalDatabaseBlueprintsPaginator,
    GetRelationalDatabaseBundlesPaginator,
    GetRelationalDatabaseEventsPaginator,
    GetRelationalDatabaseParametersPaginator,
    GetRelationalDatabaseSnapshotsPaginator,
    GetRelationalDatabasesPaginator,
    GetStaticIpsPaginator,
)
from mypy_boto3_lightsail.type_defs import AddOnTypeDef, ...

client: LightsailClient = boto3.client("lightsail")

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

Paginators annotations

mypy_boto3_lightsail.paginator module contains type annotations for all paginators.

client: LightsailClient = boto3.client("lightsail")

# Explicit type annotations are optional here
# Type should be correctly discovered by mypy and IDEs
# VSCode requires explicit type annotations
get_active_names_paginator: GetActiveNamesPaginator = client.get_paginator("get_active_names")
get_blueprints_paginator: GetBlueprintsPaginator = client.get_paginator("get_blueprints")
get_bundles_paginator: GetBundlesPaginator = client.get_paginator("get_bundles")
get_cloud_formation_stack_records_paginator: GetCloudFormationStackRecordsPaginator = client.get_paginator("get_cloud_formation_stack_records")
get_disk_snapshots_paginator: GetDiskSnapshotsPaginator = client.get_paginator("get_disk_snapshots")
get_disks_paginator: GetDisksPaginator = client.get_paginator("get_disks")
get_domains_paginator: GetDomainsPaginator = client.get_paginator("get_domains")
get_export_snapshot_records_paginator: GetExportSnapshotRecordsPaginator = client.get_paginator("get_export_snapshot_records")
get_instance_snapshots_paginator: GetInstanceSnapshotsPaginator = client.get_paginator("get_instance_snapshots")
get_instances_paginator: GetInstancesPaginator = client.get_paginator("get_instances")
get_key_pairs_paginator: GetKeyPairsPaginator = client.get_paginator("get_key_pairs")
get_load_balancers_paginator: GetLoadBalancersPaginator = client.get_paginator("get_load_balancers")
get_operations_paginator: GetOperationsPaginator = client.get_paginator("get_operations")
get_relational_database_blueprints_paginator: GetRelationalDatabaseBlueprintsPaginator = client.get_paginator("get_relational_database_blueprints")
get_relational_database_bundles_paginator: GetRelationalDatabaseBundlesPaginator = client.get_paginator("get_relational_database_bundles")
get_relational_database_events_paginator: GetRelationalDatabaseEventsPaginator = client.get_paginator("get_relational_database_events")
get_relational_database_parameters_paginator: GetRelationalDatabaseParametersPaginator = client.get_paginator("get_relational_database_parameters")
get_relational_database_snapshots_paginator: GetRelationalDatabaseSnapshotsPaginator = client.get_paginator("get_relational_database_snapshots")
get_relational_databases_paginator: GetRelationalDatabasesPaginator = client.get_paginator("get_relational_databases")
get_static_ips_paginator: GetStaticIpsPaginator = client.get_paginator("get_static_ips")

Typed dictionations

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

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

Dynamic type annotations

mypy_boto3 command generates boto3.client/resource type annotations for mypy_boto3_lightsail 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("lightsail")

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

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-lightsail-1.14.25.0.tar.gz (21.2 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_lightsail-1.14.25.0-py3-none-any.whl (20.8 kB view details)

Uploaded Python 3

File details

Details for the file mypy-boto3-lightsail-1.14.25.0.tar.gz.

File metadata

  • Download URL: mypy-boto3-lightsail-1.14.25.0.tar.gz
  • Upload date:
  • Size: 21.2 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.2.0 pkginfo/1.5.0.1 requests/2.24.0 setuptools/41.2.0 requests-toolbelt/0.9.1 tqdm/4.48.0 CPython/3.8.3

File hashes

Hashes for mypy-boto3-lightsail-1.14.25.0.tar.gz
Algorithm Hash digest
SHA256 706e0db9beae9dca073db8f5805c4b35f94f6f15474184309fe9ec11d87d2e7d
MD5 1340cf3010bf4508cdb6585d5f383b1f
BLAKE2b-256 b859890baca83bd6e97ea427fc8bb668449741dd2c6db375d9c42455e979a5a6

See more details on using hashes here.

File details

Details for the file mypy_boto3_lightsail-1.14.25.0-py3-none-any.whl.

File metadata

  • Download URL: mypy_boto3_lightsail-1.14.25.0-py3-none-any.whl
  • Upload date:
  • Size: 20.8 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.2.0 pkginfo/1.5.0.1 requests/2.24.0 setuptools/41.2.0 requests-toolbelt/0.9.1 tqdm/4.48.0 CPython/3.8.3

File hashes

Hashes for mypy_boto3_lightsail-1.14.25.0-py3-none-any.whl
Algorithm Hash digest
SHA256 ba8e04c5cbf2b60b82d957cfc0f244f4d32b4eeefc734096c534255e4e7f6b2e
MD5 c10f7d0095c284a2046e6f7f4bf700e8
BLAKE2b-256 5e35f04796e3cb2711ee010a148eb0177930be5126dd8ad9c1d69a2eb88a1cec

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