Skip to content
This repository was archived by the owner on Nov 23, 2023. It is now read-only.
This repository was archived by the owner on Nov 23, 2023. It is now read-only.

iipyper: @osc.map auto-mapping to Python Class functions via introspection #43

Description

@jarmitage

Automatically create OSC handlers for all functions in a given class, e.g.:

class MyClass:
    def func(arg):
      pass
my_instance = MyClass()

@osc.map('my_instance_name')
my_instance

Would create a handler at the address /myclass/func.

Issues:

  • Can we get the class name, function names, and arguments via introspection?
  • kwargs vs args: the rule could be "a function with any default args or a **kwargs in the signature uses osc.kwargs, otherwise use osc.args"

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions