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
Release history Release notifications | RSS feed
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)
Built Distribution
tldrwl-0.0.3-py3-none-any.whl
(4.2 kB
view hashes)