fireworks.flask_site package

Submodules

fireworks.flask_site.app module

fireworks.flask_site.app.authenticate()

Sends a 401 response that enables basic auth

fireworks.flask_site.app.check_auth(username, password)

This function is called to check if a username / password combination is valid.

fireworks.flask_site.app.dashboard()
fireworks.flask_site.app.datetime(value)
fireworks.flask_site.app.fw_details(fw_id)
fireworks.flask_site.app.fw_state(state, sorting_key='_id', sorting_order='DESCENDING')
fireworks.flask_site.app.get_fw_details(fw_id)
fireworks.flask_site.app.home()
fireworks.flask_site.app.parse_querystr(querystr, coll)
fireworks.flask_site.app.pluralize(number, singular='', plural='s')
fireworks.flask_site.app.report(interval, num_intervals)
fireworks.flask_site.app.requires_auth(f)
fireworks.flask_site.app.simple(coll, interval, num_intervals)
fireworks.flask_site.app.wf_details(wf_id)
fireworks.flask_site.app.wf_metadata_find(key, value, state)
fireworks.flask_site.app.wf_state(state, sorting_key='_id', sorting_order='DESCENDING')
fireworks.flask_site.app.workflow_json(wf_id)

fireworks.flask_site.gunicorn module

class fireworks.flask_site.gunicorn.StandaloneApplication(app, options=None)

Bases: gunicorn.app.base.BaseApplication

__init__(app, options=None)

Initialize self. See help(type(self)) for accurate signature.

load()
load_config()

This method is used to load the configuration from one or several input(s). Custom Command line, configuration file. You have to override this method in your class.

fireworks.flask_site.gunicorn.number_of_workers()

fireworks.flask_site.helpers module

fireworks.flask_site.helpers.fw_filt_given_wf_filt(filt, lp)
fireworks.flask_site.helpers.get_totals(states, lp)
fireworks.flask_site.helpers.uses_index(filt, coll)
fireworks.flask_site.helpers.wf_filt_given_fw_filt(filt, lp)

fireworks.flask_site.util module

class fireworks.flask_site.util.MongoJsonEncoder(*, skipkeys=False, ensure_ascii=True, check_circular=True, allow_nan=True, sort_keys=False, indent=None, separators=None, default=None)

Bases: json.encoder.JSONEncoder

default(obj)

Implement this method in a subclass such that it returns a serializable object for o, or calls the base implementation (to raise a TypeError).

For example, to support arbitrary iterators, you could implement default like this:

def default(self, o):
    try:
        iterable = iter(o)
    except TypeError:
        pass
    else:
        return list(iterable)
    # Let the base class default method raise the TypeError
    return JSONEncoder.default(self, o)
fireworks.flask_site.util.jsonify(*args, **kwargs)

flask.json.jsonify with cls=MongoJsonEncoder passed to flask.json.dumps

Body copied from flask==1.0.2 (latest);

Module contents