analysisstore.server package

Submodules

analysisstore.server.conf module

analysisstore.server.conf.load_configuration(name, prefix, fields)

Load configuration data form a cascading series of locations.

The precedence order is (highest priority last):

  1. CONDA_ENV/etc/{name}.yaml (if CONDA_ETC_ env is defined)
  2. /etc/{name}.yml
  3. ~/.config/{name}/connection.yml
  4. reading {PREFIX}_{FIELD} environmental variables
name
: str
The expected base-name of the configuration files
prefix
: str
The prefix when looking for environmental variables
fields
: iterable of strings
The required configuration fields
conf
: dict
Dictionary keyed on fields with the values extracted

analysisstore.server.engine module

class analysisstore.server.engine.AnalysisHeaderHandler(application, request, **kwargs)

Bases: analysisstore.server.engine.DefaultHandler

Handler for analysis_header insert, query, and update operations.
No deletes are supported.
Methods
get()
Query analysis_header documents. Query params are jsonified for type preservation so pure string query methods will not work
post()
Insert analysis_header documents.
initialize()
class analysisstore.server.engine.AnalysisTailHandler(application, request, **kwargs)

Bases: analysisstore.server.engine.DefaultHandler

Handler for analysis_tail insert and query operations.

Methods
get()
Query analysis_header documents. Query params are jsonified for type preservation
post()
Insert a analysis_header document.Same validation method as bluesky, secondary safety net.
initialize()
class analysisstore.server.engine.ConnStatHandler(application, request, **kwargs)

Bases: analysisstore.server.engine.DefaultHandler

get()
class analysisstore.server.engine.DataReferenceHandler(application, request, **kwargs)

Bases: analysisstore.server.engine.DefaultHandler

Handler for event insert and query operations. Uses traditional RESTful lingo. get for querying and post for inserts Methods ——- get()

Query event documents. Get params are json encoded in order to preserve type
post()
Insert a event document.Same validation method as bluesky, secondary safety net.
initialize()
class analysisstore.server.engine.DataReferenceHeaderHandler(application, request, **kwargs)

Bases: analysisstore.server.engine.DefaultHandler

Handler for data_reference_header insert and query operations.

get()
Query data_reference_header documents. Query params are jsonified for type preservation
post()
Insert a event_header document.Same validation method as bluesky, secondary safety net.
initialize()
class analysisstore.server.engine.DefaultHandler(application, request, **kwargs)

Bases: tornado.web.RequestHandler

data_received(chunk)

Abstract method, here to show it exists explicitly. Useful for streaming client

get()
get_insertable(func)
get_queryable(func)
initialize()
load_data()
load_query()
post()
report_error(code, status, mstr='')
set_default_headers()

analysisstore.server.utils module

analysisstore.server.utils.return2client(handler, payload)

Dump the result back to client’s open socket. No need to worry about package size or socket behavior as tornado handles this for us

handler: tornado.web.RequestHandler
Request handler for the collection of operation(post/get)
payload: dict, list
Information to be sent to the client
analysisstore.server.utils.unpack_params(handler)

Unpacks the queries from the body of the header Parameters ———- handler: tornado.web.RequestHandler

Handler for incoming request to collection
Unpacked query in dict format.

Module contents