PYME.misc.hybrid_ns module¶
- class PYME.misc.hybrid_ns.HybridNS(protocol='_pyme-sql')¶
Bases:
objectThis spoofs (but does not fully re-implement) a Pyro.naming.Nameserver using a both zeroconf and a locally held sqlite database. It’s principle use case is as a catch-all for client programs which don’t care how the servers advertise.
- get_advertised_services()¶
- list(filterby='')¶
- register(name, URI)¶
This only exists for principally for pyro compatibility - use register_service for non pyro uses Takes a Pyro URI object
- register_service(name, address, port, desc={}, URI='')¶
- Parameters
- namestr
Max 63 chars long due to zeroconf requirements. PYME.IO.FileUtils.nameUtils.get_service_name can be used to get a suitable (truncated if necessary) name.
- resolve(name)¶
mainly for PYRO compatibility - returns a string version of the URI
- unregister(name)¶
- Parameters
- namestr
must be the same service name used to register
- PYME.misc.hybrid_ns.getNS(protocol='_pyme-pyro')¶