plex-api-client 0.33.2
Python Client SDK Generated by Speakeasy
Requires Python: >=3.9.2

# plexpy

<div align="left">
    <a href="https://speakeasyapi.dev/"><img src="https://custom-icon-badges.demolab.com/badge/-Built%20By%20Speakeasy-212015?style=for-the-badge&logoColor=FBE331&logo=speakeasy&labelColor=545454" /></a>
    <a href="https://opensource.org/licenses/MIT">
        <img src="https://img.shields.io/badge/License-MIT-blue.svg" style="width: 100px; height: 28px;" />
    </a>
</div>

<!-- Start Summary [summary] -->
## Summary


<!-- End Summary [summary] -->

<!-- Start Table of Contents [toc] -->
## Table of Contents
<!-- $toc-max-depth=2 -->
* [plexpy](https://github.com/LukeHagar/plexpy/blob/master/./#plexpy)
  * [SDK Installation](https://github.com/LukeHagar/plexpy/blob/master/./#sdk-installation)
  * [IDE Support](https://github.com/LukeHagar/plexpy/blob/master/./#ide-support)
  * [SDK Example Usage](https://github.com/LukeHagar/plexpy/blob/master/./#sdk-example-usage)
  * [Available Resources and Operations](https://github.com/LukeHagar/plexpy/blob/master/./#available-resources-and-operations)
  * [File uploads](https://github.com/LukeHagar/plexpy/blob/master/./#file-uploads)
  * [Retries](https://github.com/LukeHagar/plexpy/blob/master/./#retries)
  * [Error Handling](https://github.com/LukeHagar/plexpy/blob/master/./#error-handling)
  * [Server Selection](https://github.com/LukeHagar/plexpy/blob/master/./#server-selection)
  * [Custom HTTP Client](https://github.com/LukeHagar/plexpy/blob/master/./#custom-http-client)
  * [Authentication](https://github.com/LukeHagar/plexpy/blob/master/./#authentication)
  * [Resource Management](https://github.com/LukeHagar/plexpy/blob/master/./#resource-management)
  * [Debugging](https://github.com/LukeHagar/plexpy/blob/master/./#debugging)
* [Development](https://github.com/LukeHagar/plexpy/blob/master/./#development)
  * [Maturity](https://github.com/LukeHagar/plexpy/blob/master/./#maturity)
  * [Contributions](https://github.com/LukeHagar/plexpy/blob/master/./#contributions)

<!-- End Table of Contents [toc] -->

<!-- Start SDK Installation [installation] -->
## SDK Installation

> [!NOTE]
> **Python version upgrade policy**
>
> Once a Python version reaches its [official end of life date](https://devguide.python.org/versions/), a 3-month grace period is provided for users to upgrade. Following this grace period, the minimum python version supported in the SDK will be updated.

The SDK can be installed with *uv*, *pip*, or *poetry* package managers.

### uv

*uv* is a fast Python package installer and resolver, designed as a drop-in replacement for pip and pip-tools. It's recommended for its speed and modern Python tooling capabilities.

```bash
uv add plex-api-client
```

### PIP

*PIP* is the default package installer for Python, enabling easy installation and management of packages from PyPI via the command line.

```bash
pip install plex-api-client
```

### Poetry

*Poetry* is a modern tool that simplifies dependency management and package publishing by using a single `pyproject.toml` file to handle project metadata and dependencies.

```bash
poetry add plex-api-client
```

### Shell and script usage with `uv`

You can use this SDK in a Python shell with [uv](https://docs.astral.sh/uv/) and the `uvx` command that comes with it like so:

```shell
uvx --from plex-api-client python
```

It's also possible to write a standalone Python script without needing to set up a whole project like so:

```python
#!/usr/bin/env -S uv run --script
# /// script
# requires-python = ">=3.9"
# dependencies = [
#     "plex-api-client",
# ]
# ///

from plex_api_client import PlexAPI

sdk = PlexAPI(
  # SDK arguments
)

# Rest of script here...
```

Once that is saved to a file, you can run it with `uv run script.py` where
`script.py` can be replaced with the actual file name.
<!-- End SDK Installation [installation] -->

<!-- Start IDE Support [idesupport] -->
## IDE Support

### PyCharm

Generally, the SDK will work well with most IDEs out of the box. However, when using PyCharm, you can enjoy much better integration with Pydantic by installing an additional plugin.

- [PyCharm Pydantic Plugin](https://docs.pydantic.dev/latest/integrations/pycharm/)
<!-- End IDE Support [idesupport] -->

<!-- Start SDK Example Usage [usage] -->
## SDK Example Usage

### Example

```python
# Synchronous Example
from plex_api_client import PlexAPI
from plex_api_client.models import components, operations


with PlexAPI(
    accepts=components.Accepts.APPLICATION_XML,
    client_identifier="abc123",
    product="Plex for Roku",
    version="2.4.1",
    platform="Roku",
    platform_version="4.3 build 1057",
    device="Roku 3",
    model="4200X",
    device_vendor="Roku",
    device_name="Living Room TV",
    marketplace="googlePlay",
    token="<YOUR_API_KEY_HERE>",
) as plex_api:

    res = plex_api.transcoder.start_transcode_session(request=operations.StartTranscodeSessionRequest(
        transcode_type=components.TranscodeType.MUSIC,
        extension=operations.Extension.MPD,
        advanced_subtitles=components.AdvancedSubtitles.BURN,
        audio_boost=50,
        audio_channel_count=5,
        auto_adjust_quality=components.BoolInt.TRUE,
        auto_adjust_subtitle=components.BoolInt.TRUE,
        direct_play=components.BoolInt.TRUE,
        direct_stream=components.BoolInt.TRUE,
        direct_stream_audio=components.BoolInt.TRUE,
        disable_resolution_rotation=components.BoolInt.TRUE,
        has_mde=components.BoolInt.TRUE,
        location=operations.StartTranscodeSessionQueryParamLocation.WAN,
        media_buffer_size=102400,
        media_index=0,
        music_bitrate=5000,
        offset=90.5,
        part_index=0,
        path="/library/metadata/151671",
        peak_bitrate=12000,
        photo_resolution="1080x1080",
        protocol=operations.StartTranscodeSessionQueryParamProtocol.DASH,
        seconds_per_segment=5,
        subtitle_size=50,
        video_bitrate=12000,
        video_quality=50,
        video_resolution="1080x1080",
        x_plex_client_profile_extra="add-limitation(scope=videoCodec&scopeName=*&type=upperBound&name=video.frameRate&value=60&replace=true)+append-transcode-target-codec(type=videoProfile&context=streaming&videoCodec=h264%2Chevc&audioCodec=aac&protocol=dash)",
        x_plex_client_profile_name="generic",
    ))

    assert res.response_stream is not None

    # Handle response
    print(res.response_stream)
```

</br>

The same SDK client can also be used to make asynchronous requests by importing asyncio.

```python
# Asynchronous Example
import asyncio
from plex_api_client import PlexAPI
from plex_api_client.models import components, operations

async def main():

    async with PlexAPI(
        accepts=components.Accepts.APPLICATION_XML,
        client_identifier="abc123",
        product="Plex for Roku",
        version="2.4.1",
        platform="Roku",
        platform_version="4.3 build 1057",
        device="Roku 3",
        model="4200X",
        device_vendor="Roku",
        device_name="Living Room TV",
        marketplace="googlePlay",
        token="<YOUR_API_KEY_HERE>",
    ) as plex_api:

        res = await plex_api.transcoder.start_transcode_session_async(request=operations.StartTranscodeSessionRequest(
            transcode_type=components.TranscodeType.MUSIC,
            extension=operations.Extension.MPD,
            advanced_subtitles=components.AdvancedSubtitles.BURN,
            audio_boost=50,
            audio_channel_count=5,
            auto_adjust_quality=components.BoolInt.TRUE,
            auto_adjust_subtitle=components.BoolInt.TRUE,
            direct_play=components.BoolInt.TRUE,
            direct_stream=components.BoolInt.TRUE,
            direct_stream_audio=components.BoolInt.TRUE,
            disable_resolution_rotation=components.BoolInt.TRUE,
            has_mde=components.BoolInt.TRUE,
            location=operations.StartTranscodeSessionQueryParamLocation.WAN,
            media_buffer_size=102400,
            media_index=0,
            music_bitrate=5000,
            offset=90.5,
            part_index=0,
            path="/library/metadata/151671",
            peak_bitrate=12000,
            photo_resolution="1080x1080",
            protocol=operations.StartTranscodeSessionQueryParamProtocol.DASH,
            seconds_per_segment=5,
            subtitle_size=50,
            video_bitrate=12000,
            video_quality=50,
            video_resolution="1080x1080",
            x_plex_client_profile_extra="add-limitation(scope=videoCodec&scopeName=*&type=upperBound&name=video.frameRate&value=60&replace=true)+append-transcode-target-codec(type=videoProfile&context=streaming&videoCodec=h264%2Chevc&audioCodec=aac&protocol=dash)",
            x_plex_client_profile_name="generic",
        ))

        assert res.response_stream is not None

        # Handle response
        print(res.response_stream)

asyncio.run(main())
```
<!-- End SDK Example Usage [usage] -->

<!-- Start Available Resources and Operations [operations] -->
## Available Resources and Operations

<details open>
<summary>Available methods</summary>

### [Activities](https://github.com/LukeHagar/plexpy/blob/master/./docs/sdks/activities/README.md)

* [list_activities](https://github.com/LukeHagar/plexpy/blob/master/./docs/sdks/activities/README.md#list_activities) - Get all activities
* [cancel_activity](https://github.com/LukeHagar/plexpy/blob/master/./docs/sdks/activities/README.md#cancel_activity) - Cancel a running activity

### [Authentication](https://github.com/LukeHagar/plexpy/blob/master/./docs/sdks/authentication/README.md)

* [get_token_details](https://github.com/LukeHagar/plexpy/blob/master/./docs/sdks/authentication/README.md#get_token_details) - Get Token Details
* [post_users_sign_in_data](https://github.com/LukeHagar/plexpy/blob/master/./docs/sdks/authentication/README.md#post_users_sign_in_data) - Get User Sign In Data

### [Butler](https://github.com/LukeHagar/plexpy/blob/master/./docs/sdks/butler/README.md)

* [stop_tasks](https://github.com/LukeHagar/plexpy/blob/master/./docs/sdks/butler/README.md#stop_tasks) - Stop all Butler tasks
* [get_tasks](https://github.com/LukeHagar/plexpy/blob/master/./docs/sdks/butler/README.md#get_tasks) - Get all Butler tasks
* [start_tasks](https://github.com/LukeHagar/plexpy/blob/master/./docs/sdks/butler/README.md#start_tasks) - Start all Butler tasks
* [stop_task](https://github.com/LukeHagar/plexpy/blob/master/./docs/sdks/butler/README.md#stop_task) - Stop a single Butler task
* [start_task](https://github.com/LukeHagar/plexpy/blob/master/./docs/sdks/butler/README.md#start_task) - Start a single Butler task

### [Collections](https://github.com/LukeHagar/plexpy/blob/master/./docs/sdks/collections/README.md)

* [create_collection](https://github.com/LukeHagar/plexpy/blob/master/./docs/sdks/collections/README.md#create_collection) - Create collection

### [Content](https://github.com/LukeHagar/plexpy/blob/master/./docs/sdks/content/README.md)

* [get_collection_items](https://github.com/LukeHagar/plexpy/blob/master/./docs/sdks/content/README.md#get_collection_items) - Get items in a collection
* [get_metadata_item](https://github.com/LukeHagar/plexpy/blob/master/./docs/sdks/content/README.md#get_metadata_item) - Get a metadata item
* [get_albums](https://github.com/LukeHagar/plexpy/blob/master/./docs/sdks/content/README.md#get_albums) - Set section albums
* [list_content](https://github.com/LukeHagar/plexpy/blob/master/./docs/sdks/content/README.md#list_content) - Get items in the section
* [get_all_leaves](https://github.com/LukeHagar/plexpy/blob/master/./docs/sdks/content/README.md#get_all_leaves) - Set section leaves
* [get_arts](https://github.com/LukeHagar/plexpy/blob/master/./docs/sdks/content/README.md#get_arts) - Set section artwork
* [get_categories](https://github.com/LukeHagar/plexpy/blob/master/./docs/sdks/content/README.md#get_categories) - Set section categories
* [get_cluster](https://github.com/LukeHagar/plexpy/blob/master/./docs/sdks/content/README.md#get_cluster) - Set section clusters
* [get_sonic_path](https://github.com/LukeHagar/plexpy/blob/master/./docs/sdks/content/README.md#get_sonic_path) - Similar tracks to transition from one to another
* [get_folders](https://github.com/LukeHagar/plexpy/blob/master/./docs/sdks/content/README.md#get_folders) - Get all folder locations
* [list_moments](https://github.com/LukeHagar/plexpy/blob/master/./docs/sdks/content/README.md#list_moments) - Set section moments
* [get_sonically_similar](https://github.com/LukeHagar/plexpy/blob/master/./docs/sdks/content/README.md#get_sonically_similar) - The nearest audio tracks
* [get_collection_image](https://github.com/LukeHagar/plexpy/blob/master/./docs/sdks/content/README.md#get_collection_image) - Get a collection's image

### [Devices](https://github.com/LukeHagar/plexpy/blob/master/./docs/sdks/devices/README.md)

* [get_available_grabbers](https://github.com/LukeHagar/plexpy/blob/master/./docs/sdks/devices/README.md#get_available_grabbers) - Get available grabbers
* [list_devices](https://github.com/LukeHagar/plexpy/blob/master/./docs/sdks/devices/README.md#list_devices) - Get all devices
* [add_device](https://github.com/LukeHagar/plexpy/blob/master/./docs/sdks/devices/README.md#add_device) - Add a device
* [discover_devices](https://github.com/LukeHagar/plexpy/blob/master/./docs/sdks/devices/README.md#discover_devices) - Tell grabbers to discover devices
* [remove_device](https://github.com/LukeHagar/plexpy/blob/master/./docs/sdks/devices/README.md#remove_device) - Remove a device
* [get_device_details](https://github.com/LukeHagar/plexpy/blob/master/./docs/sdks/devices/README.md#get_device_details) - Get device details
* [modify_device](https://github.com/LukeHagar/plexpy/blob/master/./docs/sdks/devices/README.md#modify_device) - Enable or disable a device
* [set_channelmap](https://github.com/LukeHagar/plexpy/blob/master/./docs/sdks/devices/README.md#set_channelmap) - Set a device's channel mapping
* [get_devices_channels](https://github.com/LukeHagar/plexpy/blob/master/./docs/sdks/devices/README.md#get_devices_channels) - Get a device's channels
* [set_device_preferences](https://github.com/LukeHagar/plexpy/blob/master/./docs/sdks/devices/README.md#set_device_preferences) - Set device preferences
* [stop_scan](https://github.com/LukeHagar/plexpy/blob/master/./docs/sdks/devices/README.md#stop_scan) - Tell a device to stop scanning for channels
* [scan](https://github.com/LukeHagar/plexpy/blob/master/./docs/sdks/devices/README.md#scan) - Tell a device to scan for channels
* [get_thumb](https://github.com/LukeHagar/plexpy/blob/master/./docs/sdks/devices/README.md#get_thumb) - Get device thumb

### [DownloadQueue](https://github.com/LukeHagar/plexpy/blob/master/./docs/sdks/downloadqueue/README.md)

* [create_download_queue](https://github.com/LukeHagar/plexpy/blob/master/./docs/sdks/downloadqueue/README.md#create_download_queue) - Create download queue
* [get_download_queue](https://github.com/LukeHagar/plexpy/blob/master/./docs/sdks/downloadqueue/README.md#get_download_queue) - Get a download queue
* [add_download_queue_items](https://github.com/LukeHagar/plexpy/blob/master/./docs/sdks/downloadqueue/README.md#add_download_queue_items) - Add to download queue
* [list_download_queue_items](https://github.com/LukeHagar/plexpy/blob/master/./docs/sdks/downloadqueue/README.md#list_download_queue_items) - Get download queue items
* [get_item_decision](https://github.com/LukeHagar/plexpy/blob/master/./docs/sdks/downloadqueue/README.md#get_item_decision) - Grab download queue item decision
* [get_download_queue_media](https://github.com/LukeHagar/plexpy/blob/master/./docs/sdks/downloadqueue/README.md#get_download_queue_media) - Grab download queue media
* [remove_download_queue_items](https://github.com/LukeHagar/plexpy/blob/master/./docs/sdks/downloadqueue/README.md#remove_download_queue_items) - Delete download queue items
* [get_download_queue_items](https://github.com/LukeHagar/plexpy/blob/master/./docs/sdks/downloadqueue/README.md#get_download_queue_items) - Get download queue items
* [restart_processing_download_queue_items](https://github.com/LukeHagar/plexpy/blob/master/./docs/sdks/downloadqueue/README.md#restart_processing_download_queue_items) - Restart processing of items from the decision

### [DVRs](https://github.com/LukeHagar/plexpy/blob/master/./docs/sdks/dvrs/README.md)

* [list_dv_rs](https://github.com/LukeHagar/plexpy/blob/master/./docs/sdks/dvrs/README.md#list_dv_rs) - Get DVRs
* [create_dvr](https://github.com/LukeHagar/plexpy/blob/master/./docs/sdks/dvrs/README.md#create_dvr) - Create a DVR
* [delete_dvr](https://github.com/LukeHagar/plexpy/blob/master/./docs/sdks/dvrs/README.md#delete_dvr) - Delete a single DVR
* [get_dvr](https://github.com/LukeHagar/plexpy/blob/master/./docs/sdks/dvrs/README.md#get_dvr) - Get a single DVR
* [delete_lineup](https://github.com/LukeHagar/plexpy/blob/master/./docs/sdks/dvrs/README.md#delete_lineup) - Delete a DVR Lineup
* [add_lineup](https://github.com/LukeHagar/plexpy/blob/master/./docs/sdks/dvrs/README.md#add_lineup) - Add a DVR Lineup
* [set_dvr_preferences](https://github.com/LukeHagar/plexpy/blob/master/./docs/sdks/dvrs/README.md#set_dvr_preferences) - Set DVR preferences
* [stop_dvr_reload](https://github.com/LukeHagar/plexpy/blob/master/./docs/sdks/dvrs/README.md#stop_dvr_reload) - Tell a DVR to stop reloading program guide
* [reload_guide](https://github.com/LukeHagar/plexpy/blob/master/./docs/sdks/dvrs/README.md#reload_guide) - Tell a DVR to reload program guide
* [tune_channel](https://github.com/LukeHagar/plexpy/blob/master/./docs/sdks/dvrs/README.md#tune_channel) - Tune a channel on a DVR
* [remove_device_from_dvr](https://github.com/LukeHagar/plexpy/blob/master/./docs/sdks/dvrs/README.md#remove_device_from_dvr) - Remove a device from an existing DVR
* [add_device_to_dvr](https://github.com/LukeHagar/plexpy/blob/master/./docs/sdks/dvrs/README.md#add_device_to_dvr) - Add a device to an existing DVR

### [Epg](https://github.com/LukeHagar/plexpy/blob/master/./docs/sdks/epg/README.md)

* [compute_channel_map](https://github.com/LukeHagar/plexpy/blob/master/./docs/sdks/epg/README.md#compute_channel_map) - Compute the best channel map
* [get_channels](https://github.com/LukeHagar/plexpy/blob/master/./docs/sdks/epg/README.md#get_channels) - Get channels for a lineup
* [get_countries](https://github.com/LukeHagar/plexpy/blob/master/./docs/sdks/epg/README.md#get_countries) - Get all countries
* [get_all_languages](https://github.com/LukeHagar/plexpy/blob/master/./docs/sdks/epg/README.md#get_all_languages) - Get all languages
* [get_lineup](https://github.com/LukeHagar/plexpy/blob/master/./docs/sdks/epg/README.md#get_lineup) - Compute the best lineup
* [get_lineup_channels](https://github.com/LukeHagar/plexpy/blob/master/./docs/sdks/epg/README.md#get_lineup_channels) - Get the channels for mulitple lineups
* [get_countries_lineups](https://github.com/LukeHagar/plexpy/blob/master/./docs/sdks/epg/README.md#get_countries_lineups) - Get lineups for a country via postal code
* [get_country_regions](https://github.com/LukeHagar/plexpy/blob/master/./docs/sdks/epg/README.md#get_country_regions) - Get regions for a country
* [list_lineups](https://github.com/LukeHagar/plexpy/blob/master/./docs/sdks/epg/README.md#list_lineups) - Get lineups for a region

### [Events](https://github.com/LukeHagar/plexpy/blob/master/./docs/sdks/events/README.md)

* [get_notifications](https://github.com/LukeHagar/plexpy/blob/master/./docs/sdks/events/README.md#get_notifications) - Connect to Eventsource
* [connect_web_socket](https://github.com/LukeHagar/plexpy/blob/master/./docs/sdks/events/README.md#connect_web_socket) - Connect to WebSocket

### [General](https://github.com/LukeHagar/plexpy/blob/master/./docs/sdks/general/README.md)

* [get_server_info](https://github.com/LukeHagar/plexpy/blob/master/./docs/sdks/general/README.md#get_server_info) - Get PMS info
* [get_identity](https://github.com/LukeHagar/plexpy/blob/master/./docs/sdks/general/README.md#get_identity) - Get PMS identity
* [get_source_connection_information](https://github.com/LukeHagar/plexpy/blob/master/./docs/sdks/general/README.md#get_source_connection_information) - Get Source Connection Information
* [get_transient_token](https://github.com/LukeHagar/plexpy/blob/master/./docs/sdks/general/README.md#get_transient_token) - Get Transient Tokens

### [Hubs](https://github.com/LukeHagar/plexpy/blob/master/./docs/sdks/hubs/README.md)

* [get_all_hubs](https://github.com/LukeHagar/plexpy/blob/master/./docs/sdks/hubs/README.md#get_all_hubs) - Get global hubs
* [get_continue_watching](https://github.com/LukeHagar/plexpy/blob/master/./docs/sdks/hubs/README.md#get_continue_watching) - Get the continue watching hub
* [get_hub_items](https://github.com/LukeHagar/plexpy/blob/master/./docs/sdks/hubs/README.md#get_hub_items) - Get a hub's items
* [get_promoted_hubs](https://github.com/LukeHagar/plexpy/blob/master/./docs/sdks/hubs/README.md#get_promoted_hubs) - Get the hubs which are promoted
* [get_metadata_hubs](https://github.com/LukeHagar/plexpy/blob/master/./docs/sdks/hubs/README.md#get_metadata_hubs) - Get hubs for section by metadata item
* [get_postplay_hubs](https://github.com/LukeHagar/plexpy/blob/master/./docs/sdks/hubs/README.md#get_postplay_hubs) - Get postplay hubs
* [get_related_hubs](https://github.com/LukeHagar/plexpy/blob/master/./docs/sdks/hubs/README.md#get_related_hubs) - Get related hubs
* [get_section_hubs](https://github.com/LukeHagar/plexpy/blob/master/./docs/sdks/hubs/README.md#get_section_hubs) - Get section hubs
* [reset_section_defaults](https://github.com/LukeHagar/plexpy/blob/master/./docs/sdks/hubs/README.md#reset_section_defaults) - Reset hubs to defaults
* [list_hubs](https://github.com/LukeHagar/plexpy/blob/master/./docs/sdks/hubs/README.md#list_hubs) - Get hubs
* [create_custom_hub](https://github.com/LukeHagar/plexpy/blob/master/./docs/sdks/hubs/README.md#create_custom_hub) - Create a custom hub
* [move_hub](https://github.com/LukeHagar/plexpy/blob/master/./docs/sdks/hubs/README.md#move_hub) - Move Hub
* [delete_custom_hub](https://github.com/LukeHagar/plexpy/blob/master/./docs/sdks/hubs/README.md#delete_custom_hub) - Delete a custom hub
* [update_hub_visibility](https://github.com/LukeHagar/plexpy/blob/master/./docs/sdks/hubs/README.md#update_hub_visibility) - Change hub visibility

### [Library](https://github.com/LukeHagar/plexpy/blob/master/./docs/sdks/library/README.md)

* [get_library_items](https://github.com/LukeHagar/plexpy/blob/master/./docs/sdks/library/README.md#get_library_items) - Get all items in library
* [delete_caches](https://github.com/LukeHagar/plexpy/blob/master/./docs/sdks/library/README.md#delete_caches) - Delete library caches
* [clean_bundles](https://github.com/LukeHagar/plexpy/blob/master/./docs/sdks/library/README.md#clean_bundles) - Clean bundles
* [ingest_transient_item](https://github.com/LukeHagar/plexpy/blob/master/./docs/sdks/library/README.md#ingest_transient_item) - Ingest a transient item
* [get_library_matches](https://github.com/LukeHagar/plexpy/blob/master/./docs/sdks/library/README.md#get_library_matches) - Get library matches
* [optimize_database](https://github.com/LukeHagar/plexpy/blob/master/./docs/sdks/library/README.md#optimize_database) - Optimize the Database
* [get_random_artwork](https://github.com/LukeHagar/plexpy/blob/master/./docs/sdks/library/README.md#get_random_artwork) - Get random artwork
* [get_sections](https://github.com/LukeHagar/plexpy/blob/master/./docs/sdks/library/README.md#get_sections) - Get library sections (main Media Provider Only)
* [add_section](https://github.com/LukeHagar/plexpy/blob/master/./docs/sdks/library/README.md#add_section) - Add a library section
* [stop_all_refreshes](https://github.com/LukeHagar/plexpy/blob/master/./docs/sdks/library/README.md#stop_all_refreshes) - Stop refresh
* [get_sections_prefs](https://github.com/LukeHagar/plexpy/blob/master/./docs/sdks/library/README.md#get_sections_prefs) - Get section prefs
* [refresh_sections_metadata](https://github.com/LukeHagar/plexpy/blob/master/./docs/sdks/library/README.md#refresh_sections_metadata) - Refresh all sections
* [get_tags](https://github.com/LukeHagar/plexpy/blob/master/./docs/sdks/library/README.md#get_tags) - Get all library tags of a type
* [delete_metadata_item](https://github.com/LukeHagar/plexpy/blob/master/./docs/sdks/library/README.md#delete_metadata_item) - Delete a metadata item
* [edit_metadata_item](https://github.com/LukeHagar/plexpy/blob/master/./docs/sdks/library/README.md#edit_metadata_item) - Edit a metadata item
* [detect_ads](https://github.com/LukeHagar/plexpy/blob/master/./docs/sdks/library/README.md#detect_ads) - Ad-detect an item
* [get_all_item_leaves](https://github.com/LukeHagar/plexpy/blob/master/./docs/sdks/library/README.md#get_all_item_leaves) - Get the leaves of an item
* [analyze_metadata](https://github.com/LukeHagar/plexpy/blob/master/./docs/sdks/library/README.md#analyze_metadata) - Analyze an item
* [generate_thumbs](https://github.com/LukeHagar/plexpy/blob/master/./docs/sdks/library/README.md#generate_thumbs) - Generate thumbs of chapters for an item
* [detect_credits](https://github.com/LukeHagar/plexpy/blob/master/./docs/sdks/library/README.md#detect_credits) - Credit detect a metadata item
* [get_extras](https://github.com/LukeHagar/plexpy/blob/master/./docs/sdks/library/README.md#get_extras) - Get an item's extras
* [add_extras](https://github.com/LukeHagar/plexpy/blob/master/./docs/sdks/library/README.md#add_extras) - Add to an item's extras
* [get_file](https://github.com/LukeHagar/plexpy/blob/master/./docs/sdks/library/README.md#get_file) - Get a file from a metadata or media bundle
* [start_bif_generation](https://github.com/LukeHagar/plexpy/blob/master/./docs/sdks/library/README.md#start_bif_generation) - Start BIF generation of an item
* [detect_intros](https://github.com/LukeHagar/plexpy/blob/master/./docs/sdks/library/README.md#detect_intros) - Intro detect an item
* [create_marker](https://github.com/LukeHagar/plexpy/blob/master/./docs/sdks/library/README.md#create_marker) - Create a marker
* [match_item](https://github.com/LukeHagar/plexpy/blob/master/./docs/sdks/library/README.md#match_item) - Match a metadata item
* [list_matches](https://github.com/LukeHagar/plexpy/blob/master/./docs/sdks/library/README.md#list_matches) - Get metadata matches for an item
* [merge_items](https://github.com/LukeHagar/plexpy/blob/master/./docs/sdks/library/README.md#merge_items) - Merge a metadata item
* [list_sonically_similar](https://github.com/LukeHagar/plexpy/blob/master/./docs/sdks/library/README.md#list_sonically_similar) - Get nearest tracks to metadata item
* [set_item_preferences](https://github.com/LukeHagar/plexpy/blob/master/./docs/sdks/library/README.md#set_item_preferences) - Set metadata preferences
* [refresh_items_metadata](https://github.com/LukeHagar/plexpy/blob/master/./docs/sdks/library/README.md#refresh_items_metadata) - Refresh a metadata item
* [get_related_items](https://github.com/LukeHagar/plexpy/blob/master/./docs/sdks/library/README.md#get_related_items) - Get related items
* [list_similar](https://github.com/LukeHagar/plexpy/blob/master/./docs/sdks/library/README.md#list_similar) - Get similar items
* [split_item](https://github.com/LukeHagar/plexpy/blob/master/./docs/sdks/library/README.md#split_item) - Split a metadata item
* [add_subtitles](https://github.com/LukeHagar/plexpy/blob/master/./docs/sdks/library/README.md#add_subtitles) - Add subtitles
* [get_item_tree](https://github.com/LukeHagar/plexpy/blob/master/./docs/sdks/library/README.md#get_item_tree) - Get metadata items as a tree
* [unmatch](https://github.com/LukeHagar/plexpy/blob/master/./docs/sdks/library/README.md#unmatch) - Unmatch a metadata item
* [list_top_users](https://github.com/LukeHagar/plexpy/blob/master/./docs/sdks/library/README.md#list_top_users) - Get metadata top users
* [detect_voice_activity](https://github.com/LukeHagar/plexpy/blob/master/./docs/sdks/library/README.md#detect_voice_activity) - Detect voice activity
* [get_augmentation_status](https://github.com/LukeHagar/plexpy/blob/master/./docs/sdks/library/README.md#get_augmentation_status) - Get augmentation status
* [set_stream_selection](https://github.com/LukeHagar/plexpy/blob/master/./docs/sdks/library/README.md#set_stream_selection) - Set stream selection
* [get_person](https://github.com/LukeHagar/plexpy/blob/master/./docs/sdks/library/README.md#get_person) - Get person details
* [list_person_media](https://github.com/LukeHagar/plexpy/blob/master/./docs/sdks/library/README.md#list_person_media) - Get media for a person
* [delete_library_section](https://github.com/LukeHagar/plexpy/blob/master/./docs/sdks/library/README.md#delete_library_section) - Delete a library section
* [get_library_details](https://github.com/LukeHagar/plexpy/blob/master/./docs/sdks/library/README.md#get_library_details) - Get a library section by id
* [edit_section](https://github.com/LukeHagar/plexpy/blob/master/./docs/sdks/library/README.md#edit_section) - Edit a library section
* [update_items](https://github.com/LukeHagar/plexpy/blob/master/./docs/sdks/library/README.md#update_items) - Set the fields of the filtered items
* [start_analysis](https://github.com/LukeHagar/plexpy/blob/master/./docs/sdks/library/README.md#start_analysis) - Analyze a section
* [autocomplete](https://github.com/LukeHagar/plexpy/blob/master/./docs/sdks/library/README.md#autocomplete) - Get autocompletions for search
* [get_collections](https://github.com/LukeHagar/plexpy/blob/master/./docs/sdks/library/README.md#get_collections) - Get collections in a section
* [get_common](https://github.com/LukeHagar/plexpy/blob/master/./docs/sdks/library/README.md#get_common) - Get common fields for items
* [empty_trash](https://github.com/LukeHagar/plexpy/blob/master/./docs/sdks/library/README.md#empty_trash) - Empty section trash
* [get_section_filters](https://github.com/LukeHagar/plexpy/blob/master/./docs/sdks/library/README.md#get_section_filters) - Get section filters
* [get_first_characters](https://github.com/LukeHagar/plexpy/blob/master/./docs/sdks/library/README.md#get_first_characters) - Get list of first characters
* [delete_indexes](https://github.com/LukeHagar/plexpy/blob/master/./docs/sdks/library/README.md#delete_indexes) - Delete section indexes
* [delete_intros](https://github.com/LukeHagar/plexpy/blob/master/./docs/sdks/library/README.md#delete_intros) - Delete section intro markers
* [get_section_preferences](https://github.com/LukeHagar/plexpy/blob/master/./docs/sdks/library/README.md#get_section_preferences) - Get section prefs
* [set_section_preferences](https://github.com/LukeHagar/plexpy/blob/master/./docs/sdks/library/README.md#set_section_preferences) - Set section prefs
* [cancel_refresh](https://github.com/LukeHagar/plexpy/blob/master/./docs/sdks/library/README.md#cancel_refresh) - Cancel section refresh
* [refresh_section](https://github.com/LukeHagar/plexpy/blob/master/./docs/sdks/library/README.md#refresh_section) - Refresh section
* [get_available_sorts](https://github.com/LukeHagar/plexpy/blob/master/./docs/sdks/library/README.md#get_available_sorts) - Get a section sorts
* [get_stream_levels](https://github.com/LukeHagar/plexpy/blob/master/./docs/sdks/library/README.md#get_stream_levels) - Get loudness about a stream in json
* [get_stream_loudness](https://github.com/LukeHagar/plexpy/blob/master/./docs/sdks/library/README.md#get_stream_loudness) - Get loudness about a stream
* [get_chapter_image](https://github.com/LukeHagar/plexpy/blob/master/./docs/sdks/library/README.md#get_chapter_image) - Get a chapter image
* [set_item_artwork](https://github.com/LukeHagar/plexpy/blob/master/./docs/sdks/library/README.md#set_item_artwork) - Set an item's artwork, theme, etc
* [update_item_artwork](https://github.com/LukeHagar/plexpy/blob/master/./docs/sdks/library/README.md#update_item_artwork) - Set an item's artwork, theme, etc
* [delete_marker](https://github.com/LukeHagar/plexpy/blob/master/./docs/sdks/library/README.md#delete_marker) - Delete a marker
* [edit_marker](https://github.com/LukeHagar/plexpy/blob/master/./docs/sdks/library/README.md#edit_marker) - Edit a marker
* [delete_media_item](https://github.com/LukeHagar/plexpy/blob/master/./docs/sdks/library/README.md#delete_media_item) - Delete a media item
* [get_part_index](https://github.com/LukeHagar/plexpy/blob/master/./docs/sdks/library/README.md#get_part_index) - Get BIF index for a part
* [delete_collection](https://github.com/LukeHagar/plexpy/blob/master/./docs/sdks/library/README.md#delete_collection) - Delete a collection
* [get_section_image](https://github.com/LukeHagar/plexpy/blob/master/./docs/sdks/library/README.md#get_section_image) - Get a section composite image
* [delete_stream](https://github.com/LukeHagar/plexpy/blob/master/./docs/sdks/library/README.md#delete_stream) - Delete a stream
* [get_stream](https://github.com/LukeHagar/plexpy/blob/master/./docs/sdks/library/README.md#get_stream) - Get a stream
* [set_stream_offset](https://github.com/LukeHagar/plexpy/blob/master/./docs/sdks/library/README.md#set_stream_offset) - Set a stream offset
* [get_item_artwork](https://github.com/LukeHagar/plexpy/blob/master/./docs/sdks/library/README.md#get_item_artwork) - Get an item's artwork, theme, etc
* [get_media_part](https://github.com/LukeHagar/plexpy/blob/master/./docs/sdks/library/README.md#get_media_part) - Get a media part
* [get_image_from_bif](https://github.com/LukeHagar/plexpy/blob/master/./docs/sdks/library/README.md#get_image_from_bif) - Get an image from part BIF

### [LibraryCollections](https://github.com/LukeHagar/plexpy/blob/master/./docs/sdks/librarycollections/README.md)

* [add_collection_items](https://github.com/LukeHagar/plexpy/blob/master/./docs/sdks/librarycollections/README.md#add_collection_items) - Add items to a collection
* [delete_collection_item](https://github.com/LukeHagar/plexpy/blob/master/./docs/sdks/librarycollections/README.md#delete_collection_item) - Delete an item from a collection
* [move_collection_item](https://github.com/LukeHagar/plexpy/blob/master/./docs/sdks/librarycollections/README.md#move_collection_item) - Reorder an item in the collection

### [LibraryPlaylists](https://github.com/LukeHagar/plexpy/blob/master/./docs/sdks/libraryplaylists/README.md)

* [create_playlist](https://github.com/LukeHagar/plexpy/blob/master/./docs/sdks/libraryplaylists/README.md#create_playlist) - Create a Playlist
* [upload_playlist](https://github.com/LukeHagar/plexpy/blob/master/./docs/sdks/libraryplaylists/README.md#upload_playlist) - Upload
* [delete_playlist](https://github.com/LukeHagar/plexpy/blob/master/./docs/sdks/libraryplaylists/README.md#delete_playlist) - Delete a Playlist
* [update_playlist](https://github.com/LukeHagar/plexpy/blob/master/./docs/sdks/libraryplaylists/README.md#update_playlist) - Editing a Playlist
* [get_playlist_generators](https://github.com/LukeHagar/plexpy/blob/master/./docs/sdks/libraryplaylists/README.md#get_playlist_generators) - Get a playlist's generators
* [clear_playlist_items](https://github.com/LukeHagar/plexpy/blob/master/./docs/sdks/libraryplaylists/README.md#clear_playlist_items) - Clearing a playlist
* [add_playlist_items](https://github.com/LukeHagar/plexpy/blob/master/./docs/sdks/libraryplaylists/README.md#add_playlist_items) - Adding to  a Playlist
* [delete_playlist_item](https://github.com/LukeHagar/plexpy/blob/master/./docs/sdks/libraryplaylists/README.md#delete_playlist_item) - Delete a Generator
* [get_playlist_generator](https://github.com/LukeHagar/plexpy/blob/master/./docs/sdks/libraryplaylists/README.md#get_playlist_generator) - Get a playlist generator
* [modify_playlist_generator](https://github.com/LukeHagar/plexpy/blob/master/./docs/sdks/libraryplaylists/README.md#modify_playlist_generator) - Modify a Generator
* [get_playlist_generator_items](https://github.com/LukeHagar/plexpy/blob/master/./docs/sdks/libraryplaylists/README.md#get_playlist_generator_items) - Get a playlist generator's items
* [move_playlist_item](https://github.com/LukeHagar/plexpy/blob/master/./docs/sdks/libraryplaylists/README.md#move_playlist_item) - Moving items in a playlist
* [refresh_playlist](https://github.com/LukeHagar/plexpy/blob/master/./docs/sdks/libraryplaylists/README.md#refresh_playlist) - Reprocess a generator

### [LiveTV](https://github.com/LukeHagar/plexpy/blob/master/./docs/sdks/livetv/README.md)

* [get_sessions](https://github.com/LukeHagar/plexpy/blob/master/./docs/sdks/livetv/README.md#get_sessions) - Get all sessions
* [get_live_tv_session](https://github.com/LukeHagar/plexpy/blob/master/./docs/sdks/livetv/README.md#get_live_tv_session) - Get a single session
* [get_session_playlist_index](https://github.com/LukeHagar/plexpy/blob/master/./docs/sdks/livetv/README.md#get_session_playlist_index) - Get a session playlist index
* [get_session_segment](https://github.com/LukeHagar/plexpy/blob/master/./docs/sdks/livetv/README.md#get_session_segment) - Get a single session segment

### [Log](https://github.com/LukeHagar/plexpy/blob/master/./docs/sdks/log/README.md)

* [write_log](https://github.com/LukeHagar/plexpy/blob/master/./docs/sdks/log/README.md#write_log) - Logging a multi-line message to the Plex Media Server log
* [write_message](https://github.com/LukeHagar/plexpy/blob/master/./docs/sdks/log/README.md#write_message) - Logging a single-line message to the Plex Media Server log
* [enable_papertrail](https://github.com/LukeHagar/plexpy/blob/master/./docs/sdks/log/README.md#enable_papertrail) - Enabling Papertrail

### [PlayQueue](https://github.com/LukeHagar/plexpy/blob/master/./docs/sdks/playqueue/README.md)

* [create_play_queue](https://github.com/LukeHagar/plexpy/blob/master/./docs/sdks/playqueue/README.md#create_play_queue) - Create a play queue
* [get_play_queue](https://github.com/LukeHagar/plexpy/blob/master/./docs/sdks/playqueue/README.md#get_play_queue) - Retrieve a play queue
* [add_to_play_queue](https://github.com/LukeHagar/plexpy/blob/master/./docs/sdks/playqueue/README.md#add_to_play_queue) - Add a generator or playlist to a play queue
* [clear_play_queue](https://github.com/LukeHagar/plexpy/blob/master/./docs/sdks/playqueue/README.md#clear_play_queue) - Clear a play queue
* [reset_play_queue](https://github.com/LukeHagar/plexpy/blob/master/./docs/sdks/playqueue/README.md#reset_play_queue) - Reset a play queue
* [shuffle](https://github.com/LukeHagar/plexpy/blob/master/./docs/sdks/playqueue/README.md#shuffle) - Shuffle a play queue
* [unshuffle](https://github.com/LukeHagar/plexpy/blob/master/./docs/sdks/playqueue/README.md#unshuffle) - Unshuffle a play queue
* [delete_play_queue_item](https://github.com/LukeHagar/plexpy/blob/master/./docs/sdks/playqueue/README.md#delete_play_queue_item) - Delete an item from a play queue
* [move_play_queue_item](https://github.com/LukeHagar/plexpy/blob/master/./docs/sdks/playqueue/README.md#move_play_queue_item) - Move an item in a play queue

### [Playlist](https://github.com/LukeHagar/plexpy/blob/master/./docs/sdks/playlist/README.md)

* [list_playlists](https://github.com/LukeHagar/plexpy/blob/master/./docs/sdks/playlist/README.md#list_playlists) - List playlists
* [get_playlist](https://github.com/LukeHagar/plexpy/blob/master/./docs/sdks/playlist/README.md#get_playlist) - Retrieve Playlist
* [get_playlist_items](https://github.com/LukeHagar/plexpy/blob/master/./docs/sdks/playlist/README.md#get_playlist_items) - Retrieve Playlist Contents

### [Plex](https://github.com/LukeHagar/plexpy/blob/master/./docs/sdks/plex/README.md)

* [get_server_resources](https://github.com/LukeHagar/plexpy/blob/master/./docs/sdks/plex/README.md#get_server_resources) - Get Server Resources

### [Preferences](https://github.com/LukeHagar/plexpy/blob/m