Skip to main content

Python SDK for Jellyfin

Project description

jellyfin-sdk-python


Logo Banner

A Python SDK for Jellyfin.

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

Install

pip install jellyfin-sdk

or

uv add jellyfin-sdk

Usage

Drop in replacement for jellyfin-apiclient-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

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

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

jellyfin_sdk-0.1.0.tar.gz (778.3 kB view details)

Uploaded Source

Built Distribution

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

jellyfin_sdk-0.1.0-py3-none-any.whl (1.7 MB view details)

Uploaded Python 3

File details

Details for the file jellyfin_sdk-0.1.0.tar.gz.

File metadata

  • Download URL: jellyfin_sdk-0.1.0.tar.gz
  • Upload date:
  • Size: 778.3 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: uv/0.8.13

File hashes

Hashes for jellyfin_sdk-0.1.0.tar.gz
Algorithm Hash digest
SHA256 a2a1e9e837574ed2b2efe4490dd131be96d4b77f4a9a916873dc4266d74763ec
MD5 24b16b04525b78bb07334ef37a50546c
BLAKE2b-256 dadaf72b35f6177789b36a6a26dc997c7bace78b1a94b53aa2057ddfa99f00e4

See more details on using hashes here.

File details

Details for the file jellyfin_sdk-0.1.0-py3-none-any.whl.

File metadata

File hashes

Hashes for jellyfin_sdk-0.1.0-py3-none-any.whl
Algorithm Hash digest
SHA256 d3c90b9fbbb320e8a3e1feb6c11589c0d0abf919f3f01a7e33969084ac45fc42
MD5 f7b12b2df220793b32186bd8c7815f2a
BLAKE2b-256 468e719297302428a31359388b7e4e8d1950ec2a976794e5dd9af42559854c88

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