Metadata-Version: 2.5
Name: margrete-rpc
Version: 1.2.1
Summary: Python client package for the Margrete RPC plugin
Requires-Python: >=3.10
Requires-Dist: protobuf<8,>=7.36.2
Requires-Dist: pywin32>=312; sys_platform == 'win32'
Requires-Dist: typing-extensions<5,>=4.4
Provides-Extra: dev
Requires-Dist: grpcio-tools>=1.85.1; extra == 'dev'
Requires-Dist: pyright<2,>=1.1.414; extra == 'dev'
Requires-Dist: pytest<10,>=9.2.0; extra == 'dev'
Requires-Dist: ruff<1,>=0.17.3; extra == 'dev'
Requires-Dist: tomli>=2; (python_version < '3.11') and extra == 'dev'
Description-Content-Type: text/markdown

# Margrete RPC

Margrete RPC lets Python scripts read and edit charts in
[UMIGURI/Margrete](https://umgr.inonote.jp/en/margrete). A Rust plugin runs inside
Margrete and communicates with the Python client over a local Windows named pipe.

## Documentation

See the [documentation](https://mg.foahh.com) for installation, tutorials, and the
Python API reference.

安装说明、教程和 Python API 参考请见[项目文档](https://mg.foahh.com)。

## Repository

- [`python/margrete_rpc/`](python/margrete_rpc/): client, chart models, and pattern
  utilities. Public docstrings supply the generated API reference.
- [`plugin/src/`](plugin/src/): RPC server and Margrete ABI bindings.
- [`proto/`](proto/): shared RPC schema and API compatibility version. Edit the
  schema here; Python and Rust protobuf bindings are generated during builds.
- [`examples/`](examples/): scripts for generating patterns and streaming video
  into a chart.
- [`website/`](website/): documentation site, including tutorials and generated
  API reference pages.

## Development

Use `uv` for Python development. From the repository root:

```powershell
uv run --extra dev pytest
.\format.ps1 -Check
```

Build the plugin on Windows with stable Rust, the MSVC target, and `protoc` on
`PATH`. The SDK headers in `plugin/margrete/` are a reference, not a build dependency.

```powershell
.\build.ps1 -Test
```

This runs Rust tests, then writes the release DLL and INI to `plugin/target/release/`.
Add `-Publish` to replace `publish/` with those files and the installation README.
