gavo.web.producttar module

Helper functions for producing tar files from tables containing a product column.

Everything in this module expects the product interface, i.e., tables must at least contain accref, owner, embargo, and accsize fields.

class gavo.web.producttar.ProductTarMaker[source]

Bases: object

A factory for tar files.

You probably don’t want to instantiate it directly but instead get a copy through the getProductMaker function below.

The main entry point to this class is deliverProductTar.

deliverProductTar(coreResult, request, queryMeta)[source]

causes a tar containing all accrefs mentioned in coreResult to be streamed out via request.

class gavo.web.producttar.UniqueNameGenerator[source]

Bases: object

A factory to build unique names from possibly ambiguous ones.

If the lower case of a name is not known to an instance, it just returns that name. Otherwise, it disambiguates by adding characters in front of the extension.