Skip to main content

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


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)

Uploaded Source

Built Distribution

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

montage_sdk-0.1.0-py3-none-any.whl (5.7 kB view details)

Uploaded Python 3

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

Hashes for montage_sdk-0.1.0.tar.gz
Algorithm Hash digest
SHA256 68df319cf7e318df4ad35c8512bf17d9b24ee51a031a300741c73e8397d419ec
MD5 7c7361fb4899e6eb037c2b2ca02ffc22
BLAKE2b-256 7ecac9e355617994a9345aeef77330f2838a500ab9ea24ef648d5dbe933600a5

See more details on using hashes here.

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

Hashes for montage_sdk-0.1.0-py3-none-any.whl
Algorithm Hash digest
SHA256 3a84701ec6a5b40b116f7640955c961169dab701de15200c26f44a03d670d5c7
MD5 ee2ce456874117d27eca636d2da2194d
BLAKE2b-256 78a8a183ca288bc1b13c0bff903d416060687440d120be50df4fa94a1b687804

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