Official Python SDK for Montage
Project description
montage-sdk (Python)
Official Python SDK for Montage runtime prompt retrieval.
Install
pip install montage-sdk
Quickstart
from montage import Montage
montage = Montage(api_key="mt_live_xxx")
# or: montage = Montage() # reads MONTAGE_API_KEY
prompt = montage.get("customer-support")
print(prompt.messages)
print(prompt.temperature)
print(prompt.max_tokens)
print(prompt.version)
print(prompt.variables)
compiled = prompt.compile(user_name="Sarah", company="Acme")
print(compiled.messages)
Configuration
montage = Montage(
api_key="mt_live_xxx",
base_url="https://montage.sh/api/v1",
cache_ttl=60,
timeout=10.0,
)
Errors
SDK errors raise MontageError:
code(e.g.unauthorized,not_found,rate_limit_exceeded)status(HTTP status when available)message
Cache controls
montage.invalidate("customer-support")
montage.clear_cache()
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
montage_sdk-0.1.0.tar.gz
(6.2 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 montage_sdk-0.1.0.tar.gz.
File metadata
- Download URL: montage_sdk-0.1.0.tar.gz
- Upload date:
- Size: 6.2 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.13.5
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
68df319cf7e318df4ad35c8512bf17d9b24ee51a031a300741c73e8397d419ec
|
|
| MD5 |
7c7361fb4899e6eb037c2b2ca02ffc22
|
|
| BLAKE2b-256 |
7ecac9e355617994a9345aeef77330f2838a500ab9ea24ef648d5dbe933600a5
|
File details
Details for the file montage_sdk-0.1.0-py3-none-any.whl.
File metadata
- Download URL: montage_sdk-0.1.0-py3-none-any.whl
- Upload date:
- Size: 5.7 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.13.5
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
3a84701ec6a5b40b116f7640955c961169dab701de15200c26f44a03d670d5c7
|
|
| MD5 |
ee2ce456874117d27eca636d2da2194d
|
|
| BLAKE2b-256 |
78a8a183ca288bc1b13c0bff903d416060687440d120be50df4fa94a1b687804
|