Add feature groups directly to your existing project without creating a separate package.
- You want to keep plugins in your main project
- You don't need to share the plugin as a separate package
- Quick prototyping or project-specific features
Create a folder structure in your project:
my-project/
├── src/
│ └── my_app/
├── my_features/ # Your mloda plugins
│ ├── __init__.py
│ └── scoring/
│ ├── __init__.py
│ ├── customer.py
│ └── tests/
│ └── test_customer.py
├── pyproject.toml
└── tests/
# my_features/scoring/customer.py
from mloda.provider import FeatureGroup
class CustomerScoring(FeatureGroup):
"""Customer scoring calculations."""
@classmethod
def calculate_feature(cls, data, features):
return {"customer_score": 100}from mloda.user import mloda, Feature
from my_features.scoring import CustomerScoring
result = mloda.run_all([Feature("CustomerScoring")])from mloda.user import PluginLoader, mloda, Feature
PluginLoader.all()
result = mloda.run_all([Feature("CustomerScoring")])Tip: For incremental results when requesting multiple features, use stream_all instead of run_all.
- Create a feature group - Detailed feature group guide
- Create a plugin package - Package for distribution
- Share with your team - Distribute via private git repo