Package gavo :: Module api
[frames] | no frames]

Source Code for Module gavo.api

 1  """ 
 2  This should evolve into a useful API to GAVO code for more-or-less external 
 3  clients. 
 4   
 5  For now, it just makes sure that standard RDs can be imported. 
 6  """ 
 7   
 8  #c Copyright 2008-2019, the GAVO project 
 9  #c 
10  #c This program is free software, covered by the GNU GPL.  See the 
11  #c COPYING file in the source distribution. 
12   
13   
14  # Not checked by pyflakes: API file with gratuitous imports 
15   
16  # this (and its companion in user/cli.py) works around a race condition in 
17  # Debian stretch's python-cryptography module.  Remove about 2021. 
18  from cryptography.hazmat.bindings.openssl.binding import Binding  
19   
20  from gavo import base 
21  from gavo import rscdesc 
22  from gavo import votable 
23  from gavo import web 
24   
25  getRD = base.caches.getRD 
26  RD = rscdesc.RD 
27   
28  from gavo.base import (getConfig, setConfig, getBinaryName, 
29          getDBConnection, DBError,       IntegrityError, 
30          UnmanagedQuerier, AdhocQuerier,  
31          getTableConn, getAdminConn, getUntrustedConn, 
32          getWritableTableConn, getWritableAdminConn, 
33          NoMetaKey, Error, StructureError, ValidationError, LiteralParseError,  
34          ReportableError, NotFoundError, RDNotFound, SourceParseError, DataError, 
35          MetaValidationError, BadUnit, BadCode, 
36          parseFromString, 
37          makeStruct, 
38          parseUnit, 
39          getMetaText, 
40          ui, 
41          resolveCrossId, getTableDefForTable) 
42   
43  from gavo.formats import formatData, getFormatted 
44  from gavo.formats.votablewrite import (writeAsVOTable, getAsVOTable, 
45          VOTableContext) 
46   
47  from gavo.helpers.processing import (CannotComputeHeader, 
48          FileProcessor, ImmediateHeaderProcessor, HeaderProcessor, 
49          AnetHeaderProcessor, PreviewMaker, SpectralPreviewMaker, 
50          procmain) 
51   
52  from gavo.rsc import (TableForDef, DBTable, makeData, parseValidating, 
53          parseNonValidating, getParseOptions, Data, makeDependentsFor, 
54          createDump, restoreDump) 
55   
56  from gavo.rscdef import TableDef, getFlatName, getReferencedElement 
57   
58  from gavo.stc import (dateTimeToJYear, dateTimeToJdn, dateTimeToMJD, 
59          jYearToDateTime, jdnToDateTime, mjdToDateTime, parseISODT) 
60   
61  from gavo.svcs import (UnknownURI, ForbiddenURI, Authenticate,  
62          WebRedirect, SeeOther, Core, OutputTableDef) 
63   
64  from gavo.user.logui import LoggingUI 
65  from gavo.user.plainui import StingyPlainUI, PlainUI 
66   
67  from gavo.utils import loadPythonModule, formatISODT 
68   
69  from gavo.votable import VOTableError, ADQLTAPJob 
70   
71  from gavo.helpers.testtricks import getXMLTree 
72   
73  from gavo.rscdef.rmkfuncs import * 
74