How to export data from Senaite.Lims and how to install senaite.exporter?


#1

Dear Colleagues,

I understand that Senaite.Lims uses ZODB for data storage and manipulation. Are there any tool available for browsing and manipulating the data? Or at minimum, exporting data to other format?

From https://github.com/senaite, I saw senaite.exporter, so I added to it buildout.cfg:

eggs =
Plone
Pillow
senaite.lims
senaite.exporter

Then did " sudo -u plone_buildout bin/buildout ";
The error message I got is:

“Couldn’t find index page for ‘senaite.exporter’ (maybe misspelled?)
Getting distribution for ‘senaite.exporter’.
Couldn’t find index page for ‘senaite.exporter’ (maybe misspelled?)
While:
Installing instance.
Getting distribution for ‘senaite.exporter’.
Error: Couldn’t find a distribution for ‘senaite.exporter’.”

I guess I will get similar errors if I add any other senaite add-ons. Please advise. Thanks a lot! – Lei


#2

I found zodbbrowser
https://pypi.org/project/zodbbrowser/

and still try to understand how to install it …


#3

Hi @fatfatcoyote , there is no release of senaite.exporter available in PyPi and this is the reason you got errors when running bin/buildout. senaite.exporter is an add-on that allows you to export data from listings into CSV or XLS, but does not have nothing to do with db migration or ZODB data manipulation.

ZMI (Zope Management Interface) is the default tool that comes with the system, from which you can access to catalogs, objects, permissions, etc. ZMI is very powerful, but requires a deep knowledge of the system, otherwise you can easily end up with a broken instance. Documentation here: https://docs.zope.org/zope2/zope2book/UsingZope.html

If you are interested on accessing to the database records, browse through them, get their properties and values, etc. I strongly suggest you to use senaite.jsonapi, a RESTful JSON API that allows you to interact/query the system: https://github.com/senaite/senaite.jsonapi/

This add-on is shaped the same way as plone.jsonapi.routes, so most of the documentation available for the latter will work for senaite.jsonapi too: https://plonejsonapiroutes.readthedocs.io/en/latest/

For example, if you want to get all clients from the system, you can do this search
http://localhost:8080/senaite/@@API/senaite/v1/search?portal_type=Client

Or if you want to search an AnalysisRequest by id:
http://localhost:8080/senaite/@@API/senaite/v1/search?portal_type=AnalysisRequest&id=AP-0075-R01

In order to get familiar with this tool, we strongly recommend to install a JSON interpreter extension for your browser (there are plenty of them, e.g. say “JSON Lite” for Firefox or “JSONView” for Chrome, etc.)