semvec/pypi-packages huggingface dataset:
wasmtime-executor 0.1.0
A WASMTIME-based Python code executor for smolagents with sandboxed execution
Requires Python: >=3.11

# WASMTIME Executor for CodeAgent

A secure Python code executor for [smolagents](https://github.com/huggingface/smolagents) that uses WASMTIME WebAssembly runtime with the real `python.wasm` binary to provide strong isolation guarantees.

## Usage

You can use it as a drop-in replacement for the built-in `PythonExecutor` in `smolagents`. The example is in `examples/smolagents_wasmtime.py`.

```python
from wasmtime_executor import WasmtimePythonExecutor

from smolagents import CodeAgent, InferenceClientModel
from smolagents.local_python_executor import PythonExecutor


class WasmtimeCodeAgent(CodeAgent):
    """
    Custom CodeAgent that uses WasmtimePythonExecutor for code execution.

    This agent extends the standard CodeAgent to support WASMTIME-based
    WebAssembly execution for enhanced security and isolation.
    """

    def create_python_executor(self) -> PythonExecutor:
        """Override to use WasmtimePythonExecutor instead of built-in executors."""
        return WasmtimePythonExecutor(
            additional_authorized_imports=self.additional_authorized_imports,
            max_print_outputs_length=self.max_print_outputs_length,
            **self.executor_kwargs,
        )


def main():
    model = InferenceClientModel()

    additional_authorized_imports = ["math", "json"]
    max_print_outputs_length = 1000

    agent = WasmtimeCodeAgent(
        tools=[],
        model=model,
        additional_authorized_imports=additional_authorized_imports,
        max_print_outputs_length=max_print_outputs_length,
    )

    output = agent.run("Calculate the square root of 125 and explain the result.")
    print("WASMTIME executor result:", output)
```

## Acknowledgments

- [smolagents](https://github.com/huggingface/smolagents) for the agent framework
- [WASMTIME](https://wasmtime.dev/) for the WebAssembly runtime
- [VMware WebAssembly Language Runtimes](https://github.com/vmware-labs/webassembly-language-runtimes) for the Python WASM binary
winningvariant 0.1.0
Snowflake Native split testing client for Winning Variant
Keywords: ab test, experimentation, snowflake experimentation, split testing, winning variant

# Winning Variant Python SDK

**This SDK is currently in Public Preview**

This package provides a Python SDK for interacting with the Winning Variant Snowflake Native App.

## Install
```bash
pip install winningvariant
```

## Basic Usage

```python
from winningvariant import WinningVariantClient

# `session` is a Snowflake Snowpark session object
wv = WinningVariantClient(session)

# Get an assignment for a subject inside of an experiment
assignment = wv.get_assignment(subject_id="user_123", experiment_id="my-experiment")
print('Existing assignment:', assignment)

# Get or create an assignment
assignment = wv.create_assignment(subject_id="user_123", experiment_id="my-experiment")
print('New assignment:', assignment)
```

## Resources

* [Documentation](https://docs.winningvariant.com/sdk/python)
* [Snowflake Marketplace Listing](https://app.snowflake.com/marketplace/listing/GZTYZ5CUYB)
* [Homepage](https://www.winningvariant.com)

## Copyright

Copyright (c) 2025 Winning Variant LLC. All Rights Reserved.

## License

GNU GENERAL PUBLIC LICENSE v3