How do I expose a PyAMF service?

133 Views Asked by At

I've created a service called 'timesTwo' and dropped the file in the correct directory. When I try and call it from my client-side code however, it tells me that the service doesn't exist. Once I've created my server side code, how do I expose the service? What step(s) am I missing?

Server-side code:

from pyamf.remoting.gateway.wsgi import WSGIGateway

def timesTwo(data):
    return data * 2

services = {
    'timesTwo': timesTwo,
    # Add other exposed functions here
}

gateway = WSGIGateway(services)

I'm having a really hard time finding online documentation. Thanks for the help!

Sidenote: Is there some resource (website, book, ANYthing) that would be more thorough than what's on pyamf.org that you would recommend?!

0

There are 0 best solutions below