semvec/pypi-packages huggingface dataset:
binmod-mdk 0.1.3
Binmod MDK for Python
License: MIT
Requires Python: >=3.11

# Binmod MDK Python

Python Binmod module development kit (MDK).

## Quick Start

### Installation

Add the `binmod-mdk` package to your `pyproject.toml`:

```toml
dependencies = [
    "binmod-mdk",
]

[tool.uv.sources]
binmod-mdk = { git = "https://github.com/binmod-io/python-mdk" }
```

> [!NOTE]
> If you do not use `uv` as a package manager, see the documentation for your package manager on how to add packages from a git repository.

### Basic Usage

```python
from binmod_mdk import mod_fn, host_fns, host_fn

@host_fns("test")
class HostFns:
    @host_fn
    def host_log(message: str) -> None:
        raise NotImplementedError

    @host_fn
    def host_add(a: int, b: int) -> int:
        raise NotImplementedError


# NOTE: Function parameters and return types must be serializable.
@mod_fn
def greet(name: str, number: int) -> str:
    HostFns.host_log(f"Hello, {name}! Your number is: {number}")
    return f"Hello, {name}! Your number is: {number}"
```