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
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
openprompts-0.1.2.tar.gz
(3.4 kB
view details)
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
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
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
f60be6a5cb2e5ff45df1168ababf07d57e627c04ff4ff0d016833eda3ccc9b03
|
|
| MD5 |
a9486d97616b294588830dcde62f5ef9
|
|
| BLAKE2b-256 |
3edbee2443ee00a87d06b3e688aad2177081d0c07bfcf5f82eebf0a5de1a84ec
|
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
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
d67f8e308d358af8968b43a3379fb48f5fa9cc7df5619417e0b7222a7b52c3ae
|
|
| MD5 |
725cee78c3a22b6dfb9bd411d200482a
|
|
| BLAKE2b-256 |
db0d76d7302ca1127c5e60d21933058fff683e6d607cf5f9ba2ff54b01dcb50e
|