Package logilab :: Package common :: Module pyro_ext
[frames] | no frames]

Module pyro_ext

source code

Python Remote Object utilities

Main functions available:

* `register_object` to expose arbitrary object through pyro using delegation
  approach and register it in the nameserver.
* `ns_unregister` unregister an object identifier from the nameserver.
* `ns_get_proxy` get a pyro proxy from a nameserver object identifier.

Functions
 
ns_group_and_id(idstr, defaultnsgroup=_MARKER) source code
 
host_and_port(hoststr) source code
 
locate_ns(nshost)
locate and return the pyro name server to the daemon
source code
 
register_object(object, nsid, defaultnsgroup=_MARKER, daemonhost=None, nshost=None, use_pyrons=True)
expose the object as a pyro object and register it in the name-server
source code
 
get_object_uri(qnsid) source code
 
ns_unregister(nsid, defaultnsgroup=_MARKER, nshost=None)
unregister the object with the given nsid from the pyro name server
source code
 
ns_reregister(nsid, defaultnsgroup=_MARKER, nshost=None)
reregister a pyro object into the name server.
source code
 
ns_get_proxy(nsid, defaultnsgroup=_MARKER, nshost=None)
if nshost is None, the nameserver is found by a broadcast.
source code
 
get_proxy(pyro_uri)
get a proxy for the passed pyro uri without using a nameserver...
source code
 
set_pyro_log_threshold(level) source code
Function Details

register_object(object, nsid, defaultnsgroup=_MARKER, daemonhost=None, nshost=None, use_pyrons=True)

source code 
expose the object as a pyro object and register it in the name-server

if use_pyrons is False, then the object is exposed, but no
attempt to register it to a pyro nameserver is made.

return the pyro daemon object

ns_reregister(nsid, defaultnsgroup=_MARKER, nshost=None)

source code 
reregister a pyro object into the name server. You only have to specify
the name-server id of the object (though you MUST have gone through
`register_object` for the given object previously).

This is especially useful for long running server while the name server may
have been restarted, and its records lost.

get_proxy(pyro_uri)

source code 
get a proxy for the passed pyro uri without using a nameserver