Metadata-Version: 2.1
Name: rigatoni
Version: 0.2.4
Summary: Python Server Library for NOODLES Protocol
Keywords: noodles,cbor,Websockets,server,NOODLES
Author: Alex Racapé
Requires-Python: >=3.8
Description-Content-Type: text/markdown
Classifier: Intended Audience :: Science/Research
Classifier: Programming Language :: Python :: 3
Classifier: Topic :: Scientific/Engineering :: Visualization
Requires-Dist: websockets
Requires-Dist: cbor2
Requires-Dist: pydantic
Requires-Dist: numpy ; extra == "geometry"
Requires-Dist: meshio ; extra == "geometry"
Requires-Dist: pytest ; extra == "testing"
Requires-Dist: penne ; extra == "testing"
Requires-Dist: pandas ; extra == "testing"
Requires-Dist: matplotlib ; extra == "testing"
Requires-Dist: meshio ; extra == "testing"
Requires-Dist: pymeshlab ; extra == "testing"
Project-URL: Documentation, https://insightcenternoodles.github.io/Rigatoni/
Project-URL: Source, https://github.com/InsightCenterNoodles/Rigatoni
Provides-Extra: geometry
Provides-Extra: testing


# Rigatoni

![Build Status](https://github.com/InsightCenterNoodles/Rigatoni/workflows/CI/badge.svg)
![PyPI](https://img.shields.io/pypi/v/Rigatoni)
[![Coverage badge](https://img.shields.io/endpoint?url=https://raw.githubusercontent.com/InsightCenterNoodles/Rigatoni/python-coverage-comment-action-data/endpoint.json&color=brightgreen)](https://htmlpreview.github.io/?https://github.com/InsightCenterNoodles/Rigatoni/blob/python-coverage-comment-action-data/htmlcov/index.html)

Python Server Library for NOODLES Protocol

## Description
This server library implements the NOODLES messaging protocol and provides objects for maintaining a scene in state. 
The server uses a websocket connection to send CBOR encoded messages. To customize its implementation, the library 
provides convenient interface methods to assist the user in writing their own methods for the server. The user can
also add custom delegates to add additional functionality to any of the standard components.

## Documentation

For more information, check out [the documentation](https://insightcenternoodles.github.io/Rigatoni/).

## Installation

Installation is as simple as:

```bash
pip install rigatoni
```

For optional dependencies and support for meshes and geometry object creation, you can install

```bash
pip install rigatoni[geometry]
```

## Simple Example

```python
import rigatoni as rig

class CustomTable(rig.Table):

    extra_info = None

    def handle_clear(self):
        print("Clearing table")

def basic_method(server, context):
    print("Hello World!")

starting_state = [
    rig.StartingComponent(rig.Method, {"name": "basic_method", "arg_doc": []}, basic_method),
]

delegates = {
    rig.Table: CustomTable
}

with rig.Server(50000, starting_state) as server:
    # do stuff
    pass
```

## Hungry for more NOODLES?
For more information and other related repositories check out [this collection](https://github.com/InsightCenterNoodles)

