Skip to main content

Type annotations for boto3.MediaLive 1.14.31 service, generated by mypy-boto3-buider 2.2.0

Project description

mypy-boto3-medialive

PyPI - mypy-boto3-medialive PyPI - Python Version Docs

Type annotations for boto3.MediaLive 1.14.31 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 MediaLive service.

python -m pip install boto3-stubs[medialive]

How to use

Client annotations

MediaLiveClient provides annotations for boto3.client("medialive").

import boto3

from mypy_boto3_medialive import MediaLiveClient
from mypy_boto3_medialive.paginator import (
    DescribeSchedulePaginator,
    ListChannelsPaginator,
    ListInputDevicesPaginator,
    ListInputSecurityGroupsPaginator,
    ListInputsPaginator,
    ListMultiplexesPaginator,
    ListMultiplexProgramsPaginator,
    ListOfferingsPaginator,
    ListReservationsPaginator,
)
from mypy_boto3_medialive.type_defs import AacSettingsTypeDef, ...
from mypy_boto3_medialive.waiter import (
    ChannelCreatedWaiter,
    ChannelDeletedWaiter,
    ChannelRunningWaiter,
    ChannelStoppedWaiter,
    InputAttachedWaiter,
    InputDeletedWaiter,
    InputDetachedWaiter,
    MultiplexCreatedWaiter,
    MultiplexDeletedWaiter,
    MultiplexRunningWaiter,
    MultiplexStoppedWaiter,
)

client: MediaLiveClient = boto3.client("medialive")

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

Paginators annotations

mypy_boto3_medialive.paginator module contains type annotations for all paginators.

client: MediaLiveClient = boto3.client("medialive")

# Explicit type annotations are optional here
# Type should be correctly discovered by mypy and IDEs
# VSCode requires explicit type annotations
describe_schedule_paginator: DescribeSchedulePaginator = client.get_paginator("describe_schedule")
list_channels_paginator: ListChannelsPaginator = client.get_paginator("list_channels")
list_input_devices_paginator: ListInputDevicesPaginator = client.get_paginator("list_input_devices")
list_input_security_groups_paginator: ListInputSecurityGroupsPaginator = client.get_paginator("list_input_security_groups")
list_inputs_paginator: ListInputsPaginator = client.get_paginator("list_inputs")
list_multiplex_programs_paginator: ListMultiplexProgramsPaginator = client.get_paginator("list_multiplex_programs")
list_multiplexes_paginator: ListMultiplexesPaginator = client.get_paginator("list_multiplexes")
list_offerings_paginator: ListOfferingsPaginator = client.get_paginator("list_offerings")
list_reservations_paginator: ListReservationsPaginator = client.get_paginator("list_reservations")

Waiters annotations

mypy_boto3_medialive.waiter module contains type annotations for all waiters.

client: MediaLiveClient = boto3.client("medialive")

# Explicit type annotations are optional here
# Type should be correctly discovered by mypy and IDEs
# VSCode requires explicit type annotations
channel_created_waiter: ChannelCreatedWaiter = client.get_waiter("channel_created")
channel_deleted_waiter: ChannelDeletedWaiter = client.get_waiter("channel_deleted")
channel_running_waiter: ChannelRunningWaiter = client.get_waiter("channel_running")
channel_stopped_waiter: ChannelStoppedWaiter = client.get_waiter("channel_stopped")
input_attached_waiter: InputAttachedWaiter = client.get_waiter("input_attached")
input_deleted_waiter: InputDeletedWaiter = client.get_waiter("input_deleted")
input_detached_waiter: InputDetachedWaiter = client.get_waiter("input_detached")
multiplex_created_waiter: MultiplexCreatedWaiter = client.get_waiter("multiplex_created")
multiplex_deleted_waiter: MultiplexDeletedWaiter = client.get_waiter("multiplex_deleted")
multiplex_running_waiter: MultiplexRunningWaiter = client.get_waiter("multiplex_running")
multiplex_stopped_waiter: MultiplexStoppedWaiter = client.get_waiter("multiplex_stopped")

Typed dictionations

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

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

Dynamic type annotations

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

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

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-medialive-1.14.31.0.tar.gz (23.9 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_medialive-1.14.31.0-py3-none-any.whl (24.1 kB view details)

Uploaded Python 3

File details

Details for the file mypy-boto3-medialive-1.14.31.0.tar.gz.

File metadata

  • Download URL: mypy-boto3-medialive-1.14.31.0.tar.gz
  • Upload date:
  • Size: 23.9 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.2.0 pkginfo/1.5.0.1 requests/2.24.0 setuptools/47.1.0 requests-toolbelt/0.9.1 tqdm/4.48.0 CPython/3.8.5

File hashes

Hashes for mypy-boto3-medialive-1.14.31.0.tar.gz
Algorithm Hash digest
SHA256 34efa1ede949a4ddb72f0cb32c68867889774e5040557cae8d8f3191f264532a
MD5 2ad17a8a43930edfb4f8e24ccb6f2253
BLAKE2b-256 cfa0d109f773dd412b7f78557417ddb5d1700cde7be40866d276e005fc319b29

See more details on using hashes here.

File details

Details for the file mypy_boto3_medialive-1.14.31.0-py3-none-any.whl.

File metadata

  • Download URL: mypy_boto3_medialive-1.14.31.0-py3-none-any.whl
  • Upload date:
  • Size: 24.1 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/47.1.0 requests-toolbelt/0.9.1 tqdm/4.48.0 CPython/3.8.5

File hashes

Hashes for mypy_boto3_medialive-1.14.31.0-py3-none-any.whl
Algorithm Hash digest
SHA256 100a9f3d7e905ef456fd8893141d287c4f74302e4ff67605504f55d008094e9f
MD5 6e6f9cb8d6df88795b15bfa023b2733c
BLAKE2b-256 fda192ed672b57311fd54c929a188c9d5cc74b3749c2beb88b03466b7ba2219d

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