Skip to main content

Python Server Library for NOODLES Protocol

Project description

Rigatoni

Build Status PyPI Coverage badge

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.

Installation

Installation is as simple as:

pip install rigatoni

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

pip install rigatoni[geometry]

Simple Example

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

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

rigatoni-0.2.3.tar.gz (30.6 kB view hashes)

Uploaded Source

Built Distribution

rigatoni-0.2.3-py3-none-any.whl (32.4 kB view hashes)

Uploaded Python 3

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page