Hi, Craig.
The documentation on creating handlers is still outdated. There's and old document written for Pydap 2.x here:
http://pydap.org/2.x/docs/plugins.html
Basically, a handler is a subclass of ``pydap.handlers.lib.BaseHandler`` with a method ``parse_constraints``. This method should inspect the query string of the request, and return a dataset object (an instance of ``pydap.model.DatasetType``) matching the request. The NetCDF handler is a good starting point as an example.
If your data is not too big your handler will only need to create a dataset and populate it with your data (all of it). You can see an example here of how a dataset with a Sequence should be created:
http://code.google.com/p/pydap/source/browse/tests/constrain.txt
Once you've created your dataset you can have Pydap automatically parse the query string and constrain the dataset:
from pydap.handlers.helper import constrain
dataset = constrain(complete_dataset, environ['QUERY_STRING'])
return dataset
Of course ideally you would want to parse the query string yourself and retrieve only the necessary data from the database. I've just started porting the SQL handler from pydap 2.x to 3.0, you could use it as a template for mongodb. The SQL handler parses the query string and builds a SQL query that fetches only the required data from the database.
Please let me know if you need more help with this.
Cheers,
--Rob
--
Dr. Roberto De Almeida
http://dealmeida.net/http://lattes.cnpq.br/1858859813771449
:wq