[MOBY-dev] Latest update for the bioMoby Python API

ywong at infobiogen.fr ywong at infobiogen.fr
Tue Jan 18 14:15:27 UTC 2005


Hi,
  I've put the new bioMoby Python API (v0.8) on the CVS, Normally,
services that use this version should have no problem to deal with
GBrowse_moby (it return an XML string instead of a body object...) There
will be services built on top of this API before the end of the week so
you'll be able to see if there is any problems.

  For the cosmetic changes, now you can serialize/deserialize objects that
doesn't have any toMoby or fromMoby method (thanks to dynamic class
building a special Python feature :p) for example, if an object is not
in the mobyDataTypes module or in the ontology, it will create a class
corresponding to the XML, however, only public attributes are able to be
serialized/deserialized (for methods, maybe it would be useful to link
it with other webservices...)

  I've updated the documentation about it and added an example of how to
build database aware bioMoby webservices
Python/tutorials/webservices/bioMoby-Oracle.py
(only select sql statement but i think it can be also used for update sql
statement).

  Services now can be treated as threads (this enable the query of
different services at the same time) it works like this:

  client=Client()
  serviceList=client.findService(ServiceQuery(inputObject=...)

  for aService in serviceList:
      aService.start(aMobyContentObject)
      aService.join()

  for aService in serviceList:
      if hasattr(self, 'results'):
          #results are retrieved in the results attributes
          aService.results
  etc..




More information about the MOBY-dev mailing list