[Biopython-dev] [BioPython] Fwd: NCBI Abuse Activity with BioPython

Peter biopython at maubp.freeserve.co.uk
Thu Jun 26 11:40:54 UTC 2008


On Thu, Jun 26, 2008 at 12:26 PM, Andrew Dalke wrote:
> On Jun 26, 2008, at 1:21 PM, Peter wrote:
>>
>> Looking over the code, should this wait also be done for the
>> ThinClient's epost() method as well?
>
> Where?  It gets the URL from an instance variable, which is set in the
> constructor.

The ThinClient class is defined In Bio/EUtils/ThinClient.py, and I
have added a 3 second wait to its _get() method.  I think we should
also add the three second wait to the epost() method.  Both methods
will construct their URL using self.baseurl, so they are both going to
hit the same server.

Note that for the implementation, I would probably define a new
_wait() method to check the time since the last call, and call this
_wait() method from both _get() and epost().

>> This complexity is also daunting for anyone else considering taking
>> over the Bio.EUtils code base.
>
> My incomplete rewrite uses elementtree which does reduce some of the
> complexity.  But the NCBI interface is a mess.

I can see why Michiel has kept things simple in Bio.Entrez - this
should cater to most user's needs.

Peter



More information about the Biopython-dev mailing list