Metadata-Version: 2.3
Name: jellyfin-sdk
Version: 0.1.0
Summary: Python SDK for Jellyfin
Author: Webysther Sperandio
Author-email: Webysther Sperandio <webysther@gmail.com>
License: MPL-2.0
Requires-Dist: urllib3>=2.1.0,<3.0.0
Requires-Dist: python-dateutil>=2.8.2
Requires-Dist: aiohttp>=3.8.4
Requires-Dist: aiohttp-retry>=2.8.3
Requires-Dist: pydantic>=2
Requires-Dist: typing-extensions>=4.7.1
Requires-Dist: lazy-imports>=1,<2
Requires-Dist: httpx>=0.24.1,<1.0.0
Requires-Dist: httpx-oauth>=0.6.0,<1.0.0
Requires-Dist: websockets>=11.0.3,<12.0.0
Requires-Dist: jellyfin-apiclient-python>=1.11.0
Requires-Python: >=3.10
Description-Content-Type: text/markdown

<h1 align="center">jellyfin-sdk-python</h1>

---

<p align="center">
<img alt="Logo Banner" src="https://raw.githubusercontent.com/jellyfin/jellyfin-ux/master/branding/SVG/banner-logo-solid.svg?sanitize=true"/>
</p>

A Python SDK for Jellyfin.

> Warning: This project is under active development, so API changes may occur.

## Install

```sh
pip install jellyfin-sdk
```

or

```sh
uv add jellyfin-sdk
```

## Usage

### Drop in replacement for jellyfin-apiclient-python

```python
# from
from jellyfin_apiclient_python import JellyfinClient
from jellyfin_apiclient_python.api import API

# to 
from jellyfin.legacy import JellyfinClient
from jellyfin.legacy.api import API
```

### Login

```python
import os

os.environ["JELLYFIN_URL"] = "https://jellyfin.example.com"
os.environ["JELLYFIN_API_KEY"] = "MY_TOKEN"


# legacy (jellyfin-apiclient-python)
from jellyfin.legacy import JellyfinClient
client = JellyfinClient()
client.authenticate(
    {"Servers": [{"AccessToken": os.getenv("JELLYFIN_API_KEY"), "address": os.getenv("JELLYFIN_URL")}]}, 
    discover=False
)
system_info = client.jellyfin.get_system_info()

print(system_info.get("Version"), system_info.get("ServerName"))

# generated (bindings openapi spec)
from jellyfin.generated.api_10_10 import Configuration, ApiClient, SystemApi

configuration = Configuration(host = os.getenv("JELLYFIN_URL"))
client = ApiClient(configuration, header_name='X-Emby-Token', header_value=os.getenv("JELLYFIN_API_KEY"))
system_info = SystemApi(client).get_system_info()

print(system_info.version, system_info.server_name)

# new
import jellyfin

api = jellyfin.api(os.getenv("JELLYFIN_URL"), os.getenv("JELLYFIN_API_KEY"))

print(api.system.info.version, api.system.info.server_name)
```

### Supported Jellyfin Versions

| SDK Version | Jellyfin API Target |
|:-:|:-:|
| 0.1.0 | 10.10.x-10.11.x |