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.16.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.16.0
File Size Uploaded
struckdown-0.16.0.tar.gz 1.4 MB Details

Built distribution (wheel)

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

Total release size: 2.8 MB

Release files / struckdown-0.16.0.tar.gz

Download URL struckdown-0.16.0.tar.gz
Size 1.4 MB
Tags Source
SHA-256 checksum
How to use checksums
ecbbc366fcf0b1ff04e7558c665a66406f3a8c6e4ee8055bd6fd3f644c08742d
BLAKE2b-256 checksum
How to use checksums
6dc178a00f41e873731a587b4eb25bfcdca3a40d148893409b666c3a4b360a07
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.16.0-py3-none-any.whl

Download URL struckdown-0.16.0-py3-none-any.whl
Size 1.4 MB
Tags Python 3
SHA-256 checksum
How to use checksums
d3311b4e766c8c252f67da05e355d7cb15bbb1cccadefecdad298132bc999316
BLAKE2b-256 checksum
How to use checksums
7cdcc372cc84d5dc98ac3a1d9256c6e9c680b6bb102e4727e8d63dff6c5cf8a6
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