Skip to main content

DSPy with litellm replaced by litelm and numpy made optional

Project description

dspy-lite

DSPy with litellm replaced by litelm and numpy made optional.

What this is

  • Same DSPy 3.2.1 -- signatures, modules (Predict, CoT, ReAct), optimizers (Bootstrap, MIPRO, SIMBA, GEPA, GRPO)
  • litellm (100k+ LOC, 70+ transitive deps) replaced by litelm (2.6k LOC, 2 deps)
  • numpy moved from core dep to optional [embeddings] extra
  • 83% smaller clean install (24 MB vs 144 MB, 36 packages vs 67)
  • Unaffected by the litellm supply chain compromise (CVE-2026-33634) — zero litellm code or dependencies

Install

pip install dspy-lite

With provider extras:

pip install dspy-lite[anthropic]     # Anthropic
pip install dspy-lite[bedrock]       # AWS Bedrock
pip install dspy-lite[embeddings]    # numpy for embeddings
pip install dspy-lite[all]           # everything

Usage

import dspy

lm = dspy.LM("openai/gpt-4o-mini")
dspy.configure(lm=lm)

predict = dspy.Predict("question -> answer")
result = predict(question="What is DSPy?")
print(result.answer)

Everything from DSPy works -- the import is still import dspy.

What changed from DSPy

DSPy dspy-lite
LM routing litellm (34 MB, 201k LOC) litelm (87 KB, 2.6k LOC)
numpy core dep (60 MB) optional [embeddings]
Clean install size 144 MB, 67 packages 24 MB, 36 packages
API unchanged unchanged

Documentation

Full DSPy documentation: dspy.ai

Development disclosure

This project is maintained with AI-assisted coding. Through 2026-05-14, I used Claude Code with Claude Opus 4.6/4.7. As of 2026-05-14, I use pi with GPT-5.5. The human maintainer remains responsible for what is merged and released.

License

MIT (inherited from DSPy)

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

dspy_lite-3.2.1.post1.tar.gz (269.9 kB view details)

Uploaded Source

Built Distribution

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

dspy_lite-3.2.1.post1-py3-none-any.whl (332.9 kB view details)

Uploaded Python 3

File details

Details for the file dspy_lite-3.2.1.post1.tar.gz.

File metadata

  • Download URL: dspy_lite-3.2.1.post1.tar.gz
  • Upload date:
  • Size: 269.9 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.12

File hashes

Hashes for dspy_lite-3.2.1.post1.tar.gz
Algorithm Hash digest
SHA256 d7a7f6b645e4db3eaeb824b7fe255c30bd9775622541d6e982c1f80dfa588909
MD5 fe7da069bd02e2d1bb9d991e39ddbdf9
BLAKE2b-256 2d65b02e0d0fc3cc9e94747fcc7801cbb132024204ea3febf85c4e30270bd91e

See more details on using hashes here.

Provenance

The following attestation bundles were made for dspy_lite-3.2.1.post1.tar.gz:

Publisher: publish.yml on kennethwolters/dspy-lite

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file dspy_lite-3.2.1.post1-py3-none-any.whl.

File metadata

  • Download URL: dspy_lite-3.2.1.post1-py3-none-any.whl
  • Upload date:
  • Size: 332.9 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.12

File hashes

Hashes for dspy_lite-3.2.1.post1-py3-none-any.whl
Algorithm Hash digest
SHA256 5fe0a30246e9de4f83a5f2c2b81b84d8f53bfed45fec76d1b9d36ed2e0636d11
MD5 b32aef7e5e66c9512ab896be05d311c5
BLAKE2b-256 494aa45df6bffe804ead989f7a50098c32f5c51a3b4b2957bed9d5dd7f497693

See more details on using hashes here.

Provenance

The following attestation bundles were made for dspy_lite-3.2.1.post1-py3-none-any.whl:

Publisher: publish.yml on kennethwolters/dspy-lite

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

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