Skip to main content

A Python SDK for OpenPrompts

Project description

OpenPrompts Python SDK

The official Python server SDK for OpenPrompts.

Installation

pip install openprompts

Quick Start

import openprompts

# Initialize the client
op = openprompts.init("https://your-openprompts-server.com", api_key="YOUR_API_KEY", ssl_verify=True)

# Fetch a prompt by template ID and tag (alias)
try:
    prompt = op.get_prompt(template_id="your-template-id", prompt_tag="latest")
    print("Prompt content:", prompt.get("content"))
except openprompts.OpenPromptsError as e:
    print(f"Error fetching prompt: {e}")

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

openprompts-0.1.2.tar.gz (3.4 kB view details)

Uploaded Source

Built Distribution

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

openprompts-0.1.2-py3-none-any.whl (4.1 kB view details)

Uploaded Python 3

File details

Details for the file openprompts-0.1.2.tar.gz.

File metadata

  • Download URL: openprompts-0.1.2.tar.gz
  • Upload date:
  • Size: 3.4 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.13.9

File hashes

Hashes for openprompts-0.1.2.tar.gz
Algorithm Hash digest
SHA256 f60be6a5cb2e5ff45df1168ababf07d57e627c04ff4ff0d016833eda3ccc9b03
MD5 a9486d97616b294588830dcde62f5ef9
BLAKE2b-256 3edbee2443ee00a87d06b3e688aad2177081d0c07bfcf5f82eebf0a5de1a84ec

See more details on using hashes here.

File details

Details for the file openprompts-0.1.2-py3-none-any.whl.

File metadata

  • Download URL: openprompts-0.1.2-py3-none-any.whl
  • Upload date:
  • Size: 4.1 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.13.9

File hashes

Hashes for openprompts-0.1.2-py3-none-any.whl
Algorithm Hash digest
SHA256 d67f8e308d358af8968b43a3379fb48f5fa9cc7df5619417e0b7222a7b52c3ae
MD5 725cee78c3a22b6dfb9bd411d200482a
BLAKE2b-256 db0d76d7302ca1127c5e60d21933058fff683e6d607cf5f9ba2ff54b01dcb50e

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