Skip to main content

Tiny Python wrapper for the PromptTube Public API v0.

Project description

PromptTube Python SDK (v0.1.0)

Tiny wrapper around the PromptTube Public API v0.

Install

Copy prompttube.py into your project, or publish this folder as a package.

Usage

from prompttube import PromptTube

client = PromptTube(
    api_key="ptu_...",
    base_url="https://prompttube.ai",
)

prompts = client.list_prompts(limit=10)
run = client.run(
    messages=[{"role": "user", "content": "Summarize this text."}],
    tier="basic",
)
summary = client.create_summary(
    text=run["text"],
    intent="Conversation recap",
    reusable_prompt="You are a helpful summarizer.",
)

print(len(prompts["items"]), run["text"], summary["summaryId"])

Endpoints covered

  • Read: /api/v0/prompts
  • Run: /api/v0/run
  • Summaries: /api/v0/summaries

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

prompttube_sdk-0.1.1.tar.gz (2.2 kB view details)

Uploaded Source

Built Distribution

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

prompttube_sdk-0.1.1-py3-none-any.whl (2.5 kB view details)

Uploaded Python 3

File details

Details for the file prompttube_sdk-0.1.1.tar.gz.

File metadata

  • Download URL: prompttube_sdk-0.1.1.tar.gz
  • Upload date:
  • Size: 2.2 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.12.10

File hashes

Hashes for prompttube_sdk-0.1.1.tar.gz
Algorithm Hash digest
SHA256 7097dc88048d3a64f523002cd6ab2360b6a3d29cff314d89d5c72720844223d6
MD5 b044879012658569bf1bb1e76a0457b9
BLAKE2b-256 169b4e1790c6ab690b68ac3281a0812932e1cbbaaddf597f895590c97ed5e8c5

See more details on using hashes here.

File details

Details for the file prompttube_sdk-0.1.1-py3-none-any.whl.

File metadata

  • Download URL: prompttube_sdk-0.1.1-py3-none-any.whl
  • Upload date:
  • Size: 2.5 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.12.10

File hashes

Hashes for prompttube_sdk-0.1.1-py3-none-any.whl
Algorithm Hash digest
SHA256 c543bd0ecdf1c0f69b5239324726696a353791deab5efbd819b120df8ae212ec
MD5 a7bb3cb7e4a99194a4c76248cf0a0c04
BLAKE2b-256 906a347ebef8e7d3c7ef62a14f95ae260bf9954a5acda7706ed0ff0f8412dade

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