Skip to main content

Too long, didn't read/watch/listen

Project description

tldrwl (too long, didn't read/watch/listen)

About

  • Summarize text with a single API call
  • Summarize video with a single API call
  • Summarize audio with a single API call
  • Sync APIs
  • Async APIs

Install

pip install tldrwl

Examples

Text

#!/usr/bin/env python3
# my_script.py

import asyncio
from tldrwl.summarize_text import TextSummarizer

def main_sync() -> None:
    summary = TextSummarizer().summarize_text(text)

    print(summary)
    print(summary.estimated_cost_usd)

async def main_async() -> None:
    summary = await TextSummarizer().summarize_text_async(text)

    print(summary)
    print(summary.estimated_cost_usd)


async def main() -> None:
    await main_async()
    main_sync()

if __name__ == "__main__":
    asyncio.run(main())
OPENAI_API_KEY="..." python3 my_script.py

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

tldrwl-0.0.3.tar.gz (3.4 kB view hashes)

Uploaded Source

Built Distribution

tldrwl-0.0.3-py3-none-any.whl (4.2 kB view hashes)

Uploaded Python 3

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page