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.1.tar.gz (3.3 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.1-py3-none-any.whl (4.1 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: openprompts-0.1.1.tar.gz
  • Upload date:
  • Size: 3.3 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.1.tar.gz
Algorithm Hash digest
SHA256 5dd01193b88730791f7764d5f77250097a03f88f337e1af19e9b9fef658d3108
MD5 fd62cb293348ea1391bc56836f3777d1
BLAKE2b-256 b408b7ee7314c75b5bcb071a677db0125c759febb35d7bcbce576b7c0c984e9e

See more details on using hashes here.

File details

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

File metadata

  • Download URL: openprompts-0.1.1-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.1-py3-none-any.whl
Algorithm Hash digest
SHA256 737a901ca579c1e7a09a735a37bd03ebb99460f0ef2b8f5d9a91007af5a9ec44
MD5 b2d8c993d39328f8663c56ca7c4c42fc
BLAKE2b-256 9dccade3bca2ccffdffbeb64a97fa49dd9987456c9ee14041954834ec37559c1

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