Ext.Direct is an RPC framework included in ExtJS. It is being used by Mumble-Django for communications between the web site and the server.




class djextdirect.client.Client(apiurl, apiname='', cookie=None)

Ext.Direct client side implementation.

This class handles parsing an API specification, building proxy objects from it, and making calls to the router specified in the API.


>>> cli = Client( "http://localhost:8000/mumble/api/api.js", "" )

The apiname parameter defaults to and is used to select the proper API variable from the API source.

The client will then create proxy objects for each action defined in the URL, which are accessible as properties of the Client instance. Suppose your API defines the Accounts and Mumble actions, then the client will provide those as such:

>>> cli.Accounts
<client.AccountsPrx object at 0x93d9e2c>
>>> cli.Mumble
<client.MumblePrx object at 0x93d9a2c>

These objects provide native Python methods for each method defined in the actions:

>>> cli.Accounts.login
<bound method AccountsPrx.login of <client.AccountsPrx object at 0x93d9e2c>>

So, in order to make a call over Ext.Direct, you would simply call the proxy method:

>>> cli.Accounts.login( "svedrin", "passwort" )
{'success': True}
call(action, method, *args)

Make a call to Ext.Direct.


Return a proxy object that has methods defined in the API.

property tid

Thread-safely get a new TID.