Skip to content

Add Optional Dependencies to Reduce Package Bloat #1

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 2 commits into
base: main
Choose a base branch
from

Conversation

xharshblizzxxxx
Copy link
Owner

Add Optional Dependencies to Reduce Package Bloat

Fixes traceloop#2803

This PR implements optional dependencies to allow users to install only the packages they need, rather than installing all dependencies at once.

Changes Made

  1. Modified pyproject.toml to:

    • Add the [tool.poetry.extras] section with optional dependencies
    • Group dependencies logically (LLM providers, frameworks, vector DBs, etc.)
    • Add convenience groups (llm-providers, frameworks, vector-dbs, general)
    • Create a full option to maintain backward compatibility
  2. Updated README.md to document the new installation options with examples

Testing Done

  • Verified that pip install traceloop-sdk installs only core dependencies
  • Verified that pip install traceloop-sdk[openai] installs only OpenAI-related dependencies
  • Verified that pip install traceloop-sdk[full] installs all dependencies (matching previous behavior)

Additional Notes

  • This change maintains backward compatibility via the [full] option
  • Users can now install exactly what they need, reducing package bloat
  • Installation documentation has been updated to reflect these changes

Checklist

  • I have followed the contribution guidelines
  • My code follows the style guidelines of the project
  • I have tested my changes
  • I have updated documentation accordingly

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.

🚀 Feature: Install less packages
1 participant