Skip to main content

struckdown

Markdown-based syntax for structured conversations with language models.

Installation

pip install struckdown

Quick Example

# Configure
export LLM_API_KEY="sk-..."
export LLM_API_BASE="https://api.openai.com/v1"

# Extract structured data
sd chat "Tell me a joke: [[joke]]"
sd batch -i '*.txt' "Purpose: [[purpose]] Price: [[number:price]]"

Images

Wrap an image with attach() and it goes where its variable is rendered:

from struckdown import complete, attach

complete("Read this sheet: {{ sheet }} [[extract:answers]]", {"sheet": attach("scan.jpg")})

Images are resized, turned upright and stripped of metadata before sending. From the command line, use sd chat --attach name=path or sd batch --as-image. Install with pip install 'struckdown[vision]'; see Images.

Documentation

Full documentation, examples, and tutorials:

https://github.com/benwhalley/struckdown

License

MIT

Metadata

Release files for struckdown 0.17.0

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for struckdown 0.17.0
File Size Uploaded
struckdown-0.17.0.tar.gz 1.5 MB Details

Built distribution (wheel)

Table of built distributions (wheels) for struckdown 0.17.0
File Interpreter ABI Platform
struckdown-0.17.0-py3-none-any.whl Python 3 none any Details

Total release size: 2.9 MB

Release files / struckdown-0.17.0.tar.gz

Download URL struckdown-0.17.0.tar.gz
Size 1.5 MB
Tags Source
SHA-256 checksum
How to use checksums
164b066bf78aeb54aaf0b3bf06aa3819abd4074b50d17508260945ff0c708182
BLAKE2b-256 checksum
How to use checksums
3d22020941b203d1b827494a7e39bda2b22697b6082d986f59ec1e9e4961fefa
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/7.0.0 CPython/3.13.5

Release files / struckdown-0.17.0-py3-none-any.whl

Download URL struckdown-0.17.0-py3-none-any.whl
Size 1.4 MB
Tags Python 3
SHA-256 checksum
How to use checksums
425d4fff399085c2f6a2673f1495901ea02022cae84ce1a4c5b5c0602b65018b
BLAKE2b-256 checksum
How to use checksums
4650f1133e19e5dd4ba0020f7976f88517d0c6e9f0942a81f3b71be9685efb6f
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/7.0.0 CPython/3.13.5

Release history Release notifications | RSS feed

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page