Skip to content

Conversation

@pankit-eng
Copy link
Contributor

@pankit-eng pankit-eng commented Oct 21, 2025

This change adds pypi project for openenv-core and adds a build script for the same as gh actions. Sample code to import:

from openenv_core.env_server import Environment, HTTPEnvServer, create_app
from dataclasses import dataclass

@dataclass
class MyAction:
    text: str

@dataclass
class MyObservation:
    response: str
    reward: float = 0.0
    done: bool = False

class MyEnvironment(Environment):
    def reset(self) -> MyObservation:
        return MyObservation(response="Ready")

    def step(self, action: MyAction) -> MyObservation:
        return MyObservation(
            response=f"Echo: {action.text}",
            reward=1.0,
            done=False
        )

# Create FastAPI app
env = MyEnvironment()
app = create_app(env, MyAction, MyObservation)

# Run with: uvicorn module:app --host 0.0.0.0 --port 8000

@meta-cla meta-cla bot added the CLA Signed This label is managed by the Meta Open Source bot. label Oct 21, 2025
@pankit-eng pankit-eng requested a review from jspisak October 21, 2025 18:22
@pankit-eng pankit-eng requested review from Darktex and init27 October 21, 2025 18:51
@pankit-eng pankit-eng merged commit 5f840ae into main Oct 21, 2025
1 check passed
rycerzes pushed a commit to rycerzes/OpenEnv that referenced this pull request Nov 19, 2025
add openenv-core pypi project and build instructions
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

CLA Signed This label is managed by the Meta Open Source bot.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants