DashA Documentation

The dasha package is a Dash app boilerplate that allows creating complex and reusable pages.

Reference/API

dasha.core Module

Classes

Extension(*args, **kwargs)

This class provides a unified interface to configure and initialize extensions using the flask factory pattern (flask extensions).

Stack

This class is a thin wrapper around a set of extensions.

Site

This class manages the context of a DashA site, composed of a server and a set of extensions.

Class Inheritance Diagram

Inheritance diagram of dasha.core.Extension, dasha.core.Stack, dasha.core.Site

dasha.cli Module

Functions

load_env_helper()

A helper utility to expand env vars defined in systemd environment files in shell.

run_demo()

A helper utility to run the examples in examples

run_site()

A helper utility to run DashA site.

dasha.web Package

This module defines DashA web server globals.

Functions

create_site()

DashA entry point.

create_app()

Flask entry point.

Variables

site

A proxy to the Site instance, which is made available after create_site is called.

dasha.web.extensions.cache Module

Classes

UserCache(namespace)

A class to manage user cache items in namespaces.

Variables

cache

A proxy to the Cache instance.

user_cache(opname, \*args, \*\*kwargs)

A global UserCache instance.

Class Inheritance Diagram

Inheritance diagram of dasha.web.extensions.cache.UserCache

dasha.web.extensions.celery Module

Functions

register_tasks(obj)

Register celery tasks in the registry.

get_celery_tasks()

schedule_task(task, \*\*kwargs)

Variables

celery_app

A proxy to the Celery instance.

dasha.web.extensions.dasha Module

Functions

resolve_url(path)

Expands an internal URL to include prefix the app is mounted at.

get_url_stem(path)

The inverse of resolve_url.

Classes

DashA(config)

This class sets up a Dash app to serve a Template instance.

Variables

dasha

A proxy to the DashA instance.

dash_app

A proxy to the Dash instance.

Class Inheritance Diagram

Inheritance diagram of dasha.web.extensions.dasha.DashA

dasha.web.extensions.db Module

Functions

get_db_engine(bind[, server])

Return the database engine for bind.

create_db_session(bind[, server])

Return a database session for bind.

dataframe_from_db(query[, bind, session])

Return dataframe from database query.

Variables

db

A proxy to the SQLAlchemy instance.

dasha.web.extensions.ipc Module

Classes

IPC

A class that manages various interprocess communication resources.

Variables

ipc

A proxy to the IPC instance.

Class Inheritance Diagram

Inheritance diagram of dasha.web.extensions.ipc.IPC

dasha.web.extensions.ipc_backends.rejson Module

Classes

JsonPath([path])

This extends Path with various helpers.

RejsonIPC(label)

This class manages a JSON object in redis.

Class Inheritance Diagram

Inheritance diagram of dasha.web.extensions.ipc_backends.rejson.JsonPath, dasha.web.extensions.ipc_backends.rejson.RejsonIPC

dasha.web.templates Package

Classes

IdTreeMeta(name, bases, attrs)

IdTree([parent])

A mixin class that provides unique ids for class instances.

Template([parent])

An abstract class that defines an encapsulated entity around a functional group of dash components and the callbacks.

ComponentWrapper(component[, parent])

A class that wraps a Dash component instance.

ComponentRoot(id)

A class that serves as a virtual root component.

ComponentTemplate(*args, **kwargs)

A class that wraps a Dash component type.

ComponentGroup(**kwargs)

This is a base class for managing a set of components as one unit.

Class Inheritance Diagram

Inheritance diagram of dasha.web.templates.IdTreeMeta, dasha.web.templates.IdTree, dasha.web.templates.Template, dasha.web.templates.ComponentWrapper, dasha.web.templates.ComponentRoot, dasha.web.templates.ComponentTemplate, dasha.web.templates.ComponentGroup

dasha.web.templates.utils Module

Functions

fa(className, \*\*kwargs)

Return a font-awesome icon.

to_dependency(type_, dep)

Convert a dependency object to another type_.