🦆 Have your ducks in a row, and watch them go. A playful pipeline framework for chaining AI and logic tasks.
Project description
DuckFlow 🦆
Have your ducks in a row, and watch them go.
A playful pipeline framework for chaining AI and logic tasks, built around the metaphor of ducks and flocks.
🐥 Core Concepts
- Duck → A modular unit (task handler). Example: query DuckDuckGo, call OpenAI, format CSV.
- Flock → A pipeline definition, chaining ducks together into a workflow.
- Pond → Your environment/configuration where ducks swim (e.g. knowledge base files,
.env).
📦 Install from PyPI
Once published, DuckFlow can be installed directly:
pip install duckflow
Or inside a virtual environment:
python -m venv venv
source venv/bin/activate
pip install duckflow
🔑 Environment Variables
DuckFlow requires API keys for certain ducks (e.g., OpenAI). Create a .env file in your project root:
OPENAI_API_KEY=sk-your-key-here
# Optional other services:
# BRAVE_API_KEY=your-key-here
# SERPAPI_KEY=your-key-here
🦆 Example: Quack Test
A toy demo duck that simply quacks back your input.
duckflow quack_test "Hello DuckFlow" --ducks-dir ./examples/ducks --flock-file ./examples/flock.json
Output:
Running flock: quack_test
Duck quack (type=quack_node) produced output: Quack! You said: Hello DuckFlow
Final flock result: Quack! You said: Hello DuckFlow
🌊 Example: Duck Pond Research
A flock where one duck does research and another summarizes with OpenAI, augmented by a local knowledge base.
duckflow duckpond_summary "Why do ducks love ponds?" --ducks-dir ./examples/ducks --flock-file ./examples/flock.json
Possible output:
Running flock: duckpond_summary
Duck duckpond_researcher (type=duckduckgo_research) produced output: Related info: Ducks are aquatic birds...; Ponds support ecosystems...
Duck duckpond_summarizer (type=openai_chat) produced output:
- Ducks love ponds because they provide food, safety, and social space.
- Ponds support ecosystems that ducks thrive on.
- Ducklings learn foraging in ponds.
Final flock result: - Ducks love ponds because they provide food, safety, and social space. ...
📂 Project Structure
duckflow/ # Core library
core/ # Runner, duck, flock, registry, settings
handlers/ # Duck handler implementations
examples/ # Example ducks, flocks, and KBs
📜 License
MIT
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file duckflow-0.1.2.tar.gz.
File metadata
- Download URL: duckflow-0.1.2.tar.gz
- Upload date:
- Size: 8.7 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.11.13
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
298b289f0f3a8bd915fdf6037b8ceabcb15d3ec52dbe119f36222c73c8dfeb87
|
|
| MD5 |
c79a467100791e6c1b42ad3d8c4b8f3a
|
|
| BLAKE2b-256 |
71fe31c1e03fef788d9a8473b2bb75fcd62d340bcd40b9c294db673558e2cb2c
|
File details
Details for the file duckflow-0.1.2-py3-none-any.whl.
File metadata
- Download URL: duckflow-0.1.2-py3-none-any.whl
- Upload date:
- Size: 10.2 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.11.13
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
2a32aec247a51377f48922cf0646cac7438cf7ed3fa73a2f33cb183d61f648af
|
|
| MD5 |
722de3707e9dd99e07893e953d91b352
|
|
| BLAKE2b-256 |
afd807ce3554c4f92f14e45ecab3e3687ac70858d2133b1abfc0330a591e9aab
|