Metadata-Version: 2.4
Name: binmod-mdk
Version: 0.1.3
Summary: Binmod MDK for Python
Project-URL: repository, https://github.com/binmod-io/python-mdk
Author-email: Tim Pogue <me@pogue.dev>
License: MIT
License-File: LICENSE
Requires-Python: >=3.11
Description-Content-Type: text/markdown

# 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}"
```
