Skip to content

Design Python binding interface#40

Open
meganerd wants to merge 1 commit intomainfrom
feat/siftrank-29-python-binding-design
Open

Design Python binding interface#40
meganerd wants to merge 1 commit intomainfrom
feat/siftrank-29-python-binding-design

Conversation

@meganerd
Copy link
Owner

Summary

  • Evaluates three approaches: CLI subprocess wrapper, cgo shared library, gRPC server
  • Recommends CLI subprocess wrapper (pysiftrank package) for simplicity and maintainability
  • Includes full Python API design: SiftRank class, data classes, implementation sketch
  • Documents comparison matrix across effort, distribution, maintenance, and performance

Key design decisions:

  • Subprocess wrapper avoids cgo complexity and platform-specific builds
  • ~50ms process overhead is negligible vs seconds-to-minutes LLM API calls
  • Full feature parity from day one (batch mode, comparison, all CLI flags)
  • Pure Python package distributable via PyPI

Test plan

  • Design document covers all three approaches with pros/cons
  • Recommended approach includes concrete API design and implementation sketch
  • Python API covers all siftrank features (rank, batch, compare, cost tracking)

Refs: siftrank-29

🤖 Generated with Claude Code

Evaluate three approaches for Python bindings: CLI subprocess wrapper,
cgo shared library, and gRPC server. Recommend CLI wrapper for simplicity,
maintainability, and zero-distribution-complexity. Include full Python API
design with data classes, implementation sketch, and comparison matrix.

Refs: siftrank-29

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant