{"id":27242,"library":"poml","title":"POML - Prompt Orchestration Markup Language","description":"POML (Prompt Orchestration Markup Language) is a Python library for defining, composing, and managing prompts in a structured markup language. It allows you to define reusable prompt components, variables, and orchestration logic. As of version 0.0.8, the library is in early alpha with basic functionality for parsing and rendering POML templates. Release cadence is irregular.","status":"active","version":"0.0.8","language":"python","source_language":"en","source_url":"https://github.com/promptslab/poml","tags":["prompt management","llm","templating","markup"],"install":[{"cmd":"pip install poml","lang":"bash","label":"PyPI"}],"dependencies":[],"imports":[{"note":"The POML class is the main entry point; importing the module directly does not expose the class.","wrong":"import poml","symbol":"POML","correct":"from poml import POML"},{"note":"RenderEngine is in a submodule; previous versions had it in the main init.","wrong":"from poml import RenderEngine","symbol":"RenderEngine","correct":"from poml.render import RenderEngine"}],"quickstart":{"code":"from poml import POML\n\npoml = POML()\ntemplate = '''\n[context]\nuser_name = \"{{user_name}}\"\n\n[instructions]\nGreet the user warmly.\n'''\nrendered = poml.render(template, {\"user_name\": \"Alice\"})\nprint(rendered)","lang":"python","description":"Instantiate a POML object, define a template, and render with variables."},"warnings":[{"fix":"Update code from `result['content']` to `result` directly.","message":"POML 0.0.8 changed the API: render() now returns a string instead of a dict. Previous 0.0.7 returned {'content': ...}.","severity":"breaking","affected_versions":"0.0.7 and earlier"},{"fix":"Replace `poml.parse(template)` with `poml.load(template)`.","message":"The `poml.parse()` function is deprecated and will be removed in 0.1.0. Use `poml.load()` instead.","severity":"deprecated","affected_versions":"0.0.8"},{"fix":"Configure your editor to replace tabs with spaces when editing .poml files.","message":"Templates must be indented consistently. Mixing tabs and spaces causes parsing errors. Use spaces only.","severity":"gotcha","affected_versions":"all"}],"env_vars":null,"last_verified":"2026-05-01T00:00:00.000Z","next_check":"2026-07-30T00:00:00.000Z","problems":[{"fix":"Run `pip install poml` and ensure you are using the correct Python environment (e.g., virtualenv).","cause":"poml is not installed or installed in the wrong environment.","error":"ModuleNotFoundError: No module named 'poml'"},{"fix":"Use `from poml import POML` instead of `import poml`.","cause":"Importing the module directly instead of the class.","error":"AttributeError: module 'poml' has no attribute 'POML'"},{"fix":"Pass variables as a dict directly: `poml.render(template, {\"key\": \"value\"})` instead of `context=...`.","cause":"The `render()` method signature changed in 0.0.8; it no longer accepts `context` as a keyword argument.","error":"TypeError: render() got an unexpected keyword argument 'context'"}],"ecosystem":"pypi","meta_description":null,"install_score":null,"install_tag":null,"quickstart_score":null,"quickstart_tag":null}