Helpers

Base Query and Model class for sqlalchemy that include project-specific convenience functions and defaults.

Flask Helpers

exception atlas_core.helpers.flask.APIError(status_code, message=None, payload=None, headers=None)[source]

A Base API error class to be raised, that returns a json-api compliant error message.

atlas_core.helpers.flask.handle_api_error(error)[source]

Error handler for flask that handles APIError instances.

atlas_core.helpers.flask.headers(headers={})[source]

Decorator that adds custom HTTP headers to the response.

atlas_core.helpers.flask.register_config_endpoint(app, entity_types, datasets, endpoints, url_pattern='/config')[source]

Register an endpoint to /config that shows the dataset / endpoint / entity configuration of the current app.

Other Helpers