Skip to main content

media-summarizer

PyPI version License: MIT Downloads LinkedIn

A lightweight Python package that interprets and summarizes user‑provided textual descriptions of multimedia content (e.g., video or audio transcripts). It turns raw or pre‑processed text extracts into structured overviews or key‑point lists, making content analysis, cataloguing, and review straightforward—without handling the media files themselves.


Installation

pip install media_summarizer

Quick Start

from media_summarizer import media_summarizer

# Example raw transcript or description
user_input = """
In this video the presenter explains the difference between supervised and unsupervised learning,
covers examples of classification, regression, clustering, and ends with a short Q&A.
"""

# Call the summarizer with default LLM (ChatLLM7)
summary = media_summarizer(user_input)

print(summary)
# -> ['The video covers supervised vs unsupervised learning', 
#     'Examples: classification, regression, clustering', 
#     'Ends with a short Q&A']

Parameters

Name Type Description
user_input str Textual content (e.g., transcript, description) to be summarized.
llm (optional) BaseChatModel A LangChain chat model instance. If omitted, the package creates a ChatLLM7 instance automatically.
api_key (optional) str API key for ChatLLM7. If omitted, the function reads the LLM7_API_KEY environment variable, and if that is missing it falls back to "None" (the default free‑tier key).

Using a Custom LLM

You can pass any LangChain‑compatible chat model instead of the default ChatLLM7.

OpenAI

from langchain_openai import ChatOpenAI
from media_summarizer import media_summarizer

llm = ChatOpenAI(model="gpt-4o-mini")
summary = media_summarizer(user_input, llm=llm)

Anthropic

from langchain_anthropic import ChatAnthropic
from media_summarizer import media_summarizer

llm = ChatAnthropic(model="claude-3-sonnet-20240229")
summary = media_summarizer(user_input, llm=llm)

Google Gemini

from langchain_google_genai import ChatGoogleGenerativeAI
from media_summarizer import media_summarizer

llm = ChatGoogleGenerativeAI(model="gemini-1.5-flash")
summary = media_summarizer(user_input, llm=llm)

API Key & Rate Limits

  • Default LLM: ChatLLM7 from the langchain_llm7 package (PyPI link).
  • Free Tier: The default rate limits of the LLM7 free tier are sufficient for most use cases of this package.
  • Higher Limits: Provide your own API key via the LLM7_API_KEY environment variable or directly:
summary = media_summarizer(user_input, api_key="your_personal_api_key")

License

Distributed under the MIT License. See the LICENSE file for details.


Contributing & Support

Feel free to open issues, submit pull requests, or contact the author for any questions.

Metadata

Release files for media-summarizer 2025.12.21160330

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for media-summarizer 2025.12.21160330
File Size Uploaded
media_summarizer-2025.12.21160330.tar.gz 6.8 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for media-summarizer 2025.12.21160330
File Interpreter ABI Platform
media_summarizer-2025.12.21160330-py3-none-any.whl Python 3 none any Details

Total release size: 14.2 kB

Release files / media_summarizer-2025.12.21160330.tar.gz

Download URL media_summarizer-2025.12.21160330.tar.gz
Size 6.8 kB
Tags Source
SHA-256 checksum
How to use checksums
a111ab42bd6f3d19379b200e1d412387a991eccb138b40e6021dbaf76039968f
BLAKE2b-256 checksum
How to use checksums
a91ac43e4f1f9e5b3ddb8be7e4c1c303eafddcb01ac5e6618a1295f62746bfd2
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.2.0 CPython/3.12.1

Release files / media_summarizer-2025.12.21160330-py3-none-any.whl

Download URL media_summarizer-2025.12.21160330-py3-none-any.whl
Size 7.4 kB
Tags Python 3
SHA-256 checksum
How to use checksums
a83e421d2403a5b38f10d898cee29582dbeb9ba74ea6743420a895ad8723e7ca
BLAKE2b-256 checksum
How to use checksums
b54f6afdb18bc8d24aacbc6b8789e6efb3a5917a588271d6a90f54b87dc3fe2d
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.2.0 CPython/3.12.1

Release history Release notifications | RSS feed

This release

2025.12.21160330 This release

2 release files

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page