Code Monkey home page Code Monkey logo

standalonerpc's Introduction

standaloneRPC

Provides a simple RPC server for controlling a maya.standalone instance remotely.

To use as a server, execute this file from the MayaPy interpeter:

mayapy.exe   path/to/standaloneRPC.py

to connect to a server and issue commands:

import standaloneRPC as srpc
cmd = srpc.CMD('cmds.ls', type='transform')
srpc.send_command(cmd)
>>> {success:True, result:[u'persp', u'top', u'side', u'front'}

See the CMD class and send_command methods for details.

IMPORTANT

This module is NOT an attempt to provide a full-blown rpc server! It's a quick way for maya users to control a maya standalone instance without the commandPort!

As such, this provides NO security so anyone who knew that an instance was running will have complete control over the target machine! This is DANGEROUS outside of controlled conditions! Do not expose a standalone running this to the internet.

This also makes no effort to providing proxy services or marshalling - only basic data types can be sent and received.

To drive these points home, we do not use the standard JSON-RPC protocol. That is to make sure this doesn't get confused with a real, robust, and secure RPC serrver.

If you want something more robust, sophisticated and general you should check out

JSON-RPC https://pypi.python.org/pypi/json-rpc 

or

TINYRPC https://pypi.python.org/pypi/tinyrpc/0.5.

or

RPYC    http://rpyc.readthedocs.org/en/latest/

standalonerpc's People

Contributors

theodox avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.