Skip to main content

🦆 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).

🚀 Installation

git clone https://github.com/yourname/duckflow.git
cd duckflow
python -m venv venv
source venv/bin/activate
pip install -e .

Create a .env file with your keys:

OPENAI_API_KEY=sk-yourkeyhere

🦆 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


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

duckflow-0.1.0.tar.gz (7.3 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

duckflow-0.1.0-py3-none-any.whl (9.1 kB view details)

Uploaded Python 3

File details

Details for the file duckflow-0.1.0.tar.gz.

File metadata

  • Download URL: duckflow-0.1.0.tar.gz
  • Upload date:
  • Size: 7.3 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.11.13

File hashes

Hashes for duckflow-0.1.0.tar.gz
Algorithm Hash digest
SHA256 ba47865c065d5dc73a3ec6e5dddfde18c96009f70bd3f26e5c9954904d486275
MD5 73233a6dbbbdfce9428dcd6fcaf12703
BLAKE2b-256 ed61a3f5f64b07079c8694e7e44e08db1f6384572f085e0d6b2ccfb0a75edc12

See more details on using hashes here.

File details

Details for the file duckflow-0.1.0-py3-none-any.whl.

File metadata

  • Download URL: duckflow-0.1.0-py3-none-any.whl
  • Upload date:
  • Size: 9.1 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.11.13

File hashes

Hashes for duckflow-0.1.0-py3-none-any.whl
Algorithm Hash digest
SHA256 4f751dbe48fd71652cac037b2cf2fbe24e11dc5e9fd136154827617588c73853
MD5 3c972dac77231149ba1c99c0aace3320
BLAKE2b-256 4fd4ee21954ebd2967f2b2f4681ea974241bd24431473862e4fbd2c6038d1baa

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page