Skip to main content

brokit, think it like a playing lego

Project description

brokit

Inspired by big bro DSPy, brokit is a minimal Python toolkit of composable, LEGO-like primitives for working with language models. Build what you need, skip the bloat.

What's This About?

A lightweight library for working with LMs across any use case. Just the essential building blocks, nothing more.

Core Concepts

Coming from DSPy? You already know what's up:

  • Prompt = dspy.Signature — Define your input/output structure
  • Predictor = dspy.Predict — Execute prompts with your LM
  • LM = dspy.LM — Language model interface
  • Shot — Few-shot examples made simple

Design Philosophy

Plug and Play

Everything's a base class. Compose, extend, swap out whatever you want. The LM module? Bring your own.

Pure Python

Zero required dependencies. Want to use requests, httpx, or boto3? Go for it. Check the notebooks for integration examples.

Features

  • Text and image support (more formats coming)
  • Few-shot learning with Shot
  • Build custom LM implementations
  • Structured prompts with type hints

Getting Started

Peep the notebooks:

  • Custom Prompt signatures
  • Your own LM implementations
  • Few-shot examples
  • External library integrations

What's Next?

Check out ROADMAP.md for what's coming and VERSIONS.md for release notes.

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

brokit-0.1.0.tar.gz (9.3 kB view details)

Uploaded Source

Built Distribution

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

brokit-0.1.0-py3-none-any.whl (10.6 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: brokit-0.1.0.tar.gz
  • Upload date:
  • Size: 9.3 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: uv/0.9.28 {"installer":{"name":"uv","version":"0.9.28","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Ubuntu","version":"24.04","id":"noble","libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":true}

File hashes

Hashes for brokit-0.1.0.tar.gz
Algorithm Hash digest
SHA256 1837f8c78d5ca53277f8d58cea12cff13314ea17e1c42b5deb778c5bc920d2c1
MD5 1ddbb7c6a1a39aba4002f1465300d717
BLAKE2b-256 bb57367b61950d882a640eae8338b8007ea35b655fc51702eb42c1d0fde29036

See more details on using hashes here.

File details

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

File metadata

  • Download URL: brokit-0.1.0-py3-none-any.whl
  • Upload date:
  • Size: 10.6 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: uv/0.9.28 {"installer":{"name":"uv","version":"0.9.28","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Ubuntu","version":"24.04","id":"noble","libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":true}

File hashes

Hashes for brokit-0.1.0-py3-none-any.whl
Algorithm Hash digest
SHA256 3ef1140e6da1ed5537a46201d2047ebc5e60ae647a4628ceac88d3689fc97151
MD5 50d12b6ff60dcab6fd8fa41d4df2cb27
BLAKE2b-256 7e1a21b84603675a0a1aeec97f4491857aef29ada6185747261a3c83ebf0a79f

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