Orion Python Client (Meesho)

0.1.14 · active · verified Thu Apr 16

The `orion-py-client` is a Python client library developed by Meesho, designed to interact with the Orion Feature Store. Its primary function is to facilitate the pushing and producing of model features, as well as retrieving features' metadata. It aims to integrate machine learning workflows with the Orion Feature Store platform.

Common errors

Warnings

Install

Imports

Quickstart

Initializes the OrionClient and demonstrates placeholder operations for pushing features and retrieving feature metadata. Replace environment variables with your actual Orion Feature Store URL and API Key. The exact API methods and data structures for feature interaction are inferred based on the library's summary, as detailed documentation is not publicly available.

import os
from orion_py_client import OrionClient

# Placeholder for Orion Feature Store URL and API Key
ORION_API_URL = os.environ.get('ORION_API_URL', 'http://localhost:8080')
ORION_API_KEY = os.environ.get('ORION_API_KEY', 'your_api_key_here')

try:
    client = OrionClient(api_url=ORION_API_URL, api_key=ORION_API_KEY)
    print(f"Successfully initialized OrionClient for {ORION_API_URL}")

    # Example: Push a feature (assuming a 'Feature' model exists)
    # This part is illustrative as exact data model and push method are not publicly documented.
    feature_data = {
        "feature_name": "user_login_count",
        "entity_id": "user_123",
        "value": 15,
        "timestamp": "2026-04-16T10:00:00Z"
    }
    # Assuming a method like 'push_feature' or 'produce_feature'
    # response = client.push_feature(feature_data)
    # print(f"Pushed feature: {response}")

    # Example: Get feature metadata
    # metadata = client.get_feature_metadata(feature_name="user_login_count")
    # print(f"Feature metadata: {metadata}")

except Exception as e:
    print(f"An error occurred: {e}")
    print("Please ensure ORION_API_URL and ORION_API_KEY are correctly set.")

view raw JSON →