Appearance
Quickstart
This is the shortest path from "I have nothing installed" to "I have a working prompt fetch in Python." Five steps, five minutes.
Step 1 — Install the SDK
bash
pip install --extra-index-url https://elsai-core-package.optisolbusiness.com/root/elsai-prompts-sass/ elsai-prompts==2.0.0bash
pip install --extra-index-url https://elsai-core-package.optisolbusiness.com/root/elsai-prompts/ elsai-prompts==2.0.0Step 2 — Create a project and a prompt
In the console (SaaS or your on-prem URL):
- Click New Project, name it
quickstart. - Open the project, click New Prompt, name it
welcome_email. - Choose kind F-string.
- Paste this template:
Hi {{name}},
Welcome to elsai. Glad to have you on board.- Click Save — this creates your first version.
Step 3 — Release the version to development
Versions are private until released. On the version you just saved:
- Click Release.
- Select development.
- Confirm.
Then click Set as Active so the SDK knows which version to serve. You can change the active version at any time without redeploying code.
Step 4 — Create an API key
In the console sidebar, open API Keys → Create key → name it quickstart-key. Copy the plaintext key now — it's only shown once.
Note your project ID from the URL of your project page:
/projects/c8bcaabe-b577-49a4-85da-e37d67652d0c
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^Step 5 — Fetch and render the prompt
Create a file quickstart.py:
python
from elsai_prompts.prompt_manager import PromptManager
pm = PromptManager(
api_key="YOUR_API_KEY",
project_id="YOUR_PROJECT_ID",
environment="development",
)
prompt = pm.get_active_prompt_version("welcome_email")
print(prompt.render({"name": "Ada"}))python
from elsai_prompts.prompt_manager import PromptManager
pm = PromptManager(
api_key="YOUR_API_KEY",
project_id="YOUR_PROJECT_ID",
environment="development",
base_url="https://prompts.your-company.com",
)
prompt = pm.get_active_prompt_version("welcome_email")
print(prompt.render({"name": "Ada"}))Run it:
bash
python quickstart.pyExpected output:
Hi Ada,
Welcome to elsai. Glad to have you on board.