Serverless ADR API Reference#

This section documents the public API exposed by ansys.dynamicreporting.core.serverless. Only classes explicitly exported through __all__ are shown.

The serverless API is designed for programmatic report generation without running a long-lived ADR server. It provides:

  • A single entry point (ADR) that manages setup, database/media locations, and rendering.

  • A small, well-defined set of item types (tables, trees, HTML, images, scenes, files, animations, and strings) that represent report content.

  • Layout and generator templates that assemble items into interactive HTML reports or PPTX slide decks.

Note

The list is intentionally explicit to avoid exposing internal classes and to keep the API reference stable across releases.

Core Entry Point#

The core entry point wraps all serverless functionality behind a single object. You typically:

  1. Instantiate ansys.dynamicreporting.core.serverless.adr.ADR,

  2. Call ADR.setup() to configure database and storage,

  3. Create and query items and templates, and

  4. Render HTML or PPTX outputs.

The ObjectSet helper provides a lightweight ORM-style interface for querying collections of models, while Session and Dataset help group and organize items logically.

ansys.dynamicreporting.core.serverless.adr.ADR

Ansys Dynamic Reporting (ADR) class.

ansys.dynamicreporting.core.serverless.base.ObjectSet

Collection wrapper around a queryset of BaseModel objects.

ansys.dynamicreporting.core.serverless.item.Session

Execution context for a reporting run.

ansys.dynamicreporting.core.serverless.item.Dataset

Metadata describing a source dataset used for reporting.

Item Model API#

Item classes represent the atomic content units stored in the serverless ADR database. They are created and managed through the ADR instance and persisted in the configured SQLite database.

Typical usage is:

  • Create items from raw data (NumPy arrays, pandas DataFrames, file paths, image buffers, etc.).

  • Attach metadata, tags, and visualization options.

  • Reference items from templates to build complete reports.

All item types share a common base (ansys.dynamicreporting.core.serverless.item.Item), but specialize in how they store and render data (for example, tables vs. trees vs. images).

ansys.dynamicreporting.core.serverless.item.Item

Base class for all persisted report items.

ansys.dynamicreporting.core.serverless.item.String

Item representing a plain string payload.

ansys.dynamicreporting.core.serverless.item.HTML

Item representing an HTML fragment.

ansys.dynamicreporting.core.serverless.item.Table

Item representing a 2D table backed by a NumPy array.

ansys.dynamicreporting.core.serverless.item.Tree

Item representing a hierarchical tree payload.

ansys.dynamicreporting.core.serverless.item.File

Item representing a generic file payload.

ansys.dynamicreporting.core.serverless.item.Image

Item representing an image payload, optionally enhanced.

ansys.dynamicreporting.core.serverless.item.Animation

Item representing an animation/video payload.

ansys.dynamicreporting.core.serverless.item.Scene

Item representing a 3D scene or geometry payload.

Layout Template API#

Layout templates control how items are arranged and rendered in a report. They define the “frame” of the report (tabs, panels, carousels, sliders, headers/footers, PPTX slide layouts, and so on) without hard-coding any particular dataset.

In a typical workflow you:

  1. Define a Template hierarchy using one or more layout classes,

  2. Bind item filters and parameters to the template, and

  3. Ask ADR to render the template to HTML, PDF, or PPTX.

These classes focus on presentation and navigation rather than on data transformation.

ansys.dynamicreporting.core.serverless.template.Template

Base class for all report templates.

ansys.dynamicreporting.core.serverless.template.BasicLayout

Simple layout with no extra behavior.

ansys.dynamicreporting.core.serverless.template.PanelLayout

Panel-style layout with optional callout styling and link rendering.

ansys.dynamicreporting.core.serverless.template.BoxLayout

Box layout where each child is positioned explicitly in a grid.

ansys.dynamicreporting.core.serverless.template.TabLayout

Tab-based layout that arranges children as tabs.

ansys.dynamicreporting.core.serverless.template.CarouselLayout

Carousel layout with optional animation and dot controls.

ansys.dynamicreporting.core.serverless.template.SliderLayout

Slider layout that maps tags to slider controls.

ansys.dynamicreporting.core.serverless.template.FooterLayout

Layout representing a page footer region.

ansys.dynamicreporting.core.serverless.template.HeaderLayout

Layout representing a page header region.

ansys.dynamicreporting.core.serverless.template.IteratorLayout

Layout used as an iterator over items or templates.

ansys.dynamicreporting.core.serverless.template.TagPropertyLayout

Layout that exposes item tags as properties.

ansys.dynamicreporting.core.serverless.template.TOCLayout

Layout responsible for Table-of-Contents entries.

ansys.dynamicreporting.core.serverless.template.ReportLinkLayout

Layout that links to external or other ADR reports.

ansys.dynamicreporting.core.serverless.template.PPTXLayout

Layout representing a full PPTX report definition.

ansys.dynamicreporting.core.serverless.template.PPTXSlideLayout

Layout defining settings for an individual PPTX slide.

ansys.dynamicreporting.core.serverless.template.DataFilterLayout

Layout that exposes interactive data filtering controls.

ansys.dynamicreporting.core.serverless.template.UserDefinedLayout

Layout whose behavior is delegated to user-defined logic.

Generator Template API#

Generator templates encapsulate reusable data-processing patterns. Instead of laying out items directly, they derive new items or sub-templates from existing data: table merges, reductions, sorting and filtering, tree operations, SQL queries, or cross-item comparisons.

You typically plug these classes into a larger Template tree to:

  • Transform one or more Item instances into a derived view,

  • Encapsulate complex business logic in a single node, and

  • Keep layouts declarative while still supporting advanced processing.

ansys.dynamicreporting.core.serverless.template.TableMergeGenerator

Generator that merges multiple tables into one.

ansys.dynamicreporting.core.serverless.template.TableReduceGenerator

Generator that reduces table data (for example aggregation).

ansys.dynamicreporting.core.serverless.template.TableMergeRCFilterGenerator

Generator that filters table rows/columns.

ansys.dynamicreporting.core.serverless.template.TableMergeValueFilterGenerator

Generator that filters table rows based on cell values.

ansys.dynamicreporting.core.serverless.template.TableMapGenerator

Generator that maps or transforms table values.

ansys.dynamicreporting.core.serverless.template.TableSortFilterGenerator

Generator that sorts table rows based on configured criteria.

ansys.dynamicreporting.core.serverless.template.TreeMergeGenerator

Generator that merges multiple tree structures.

ansys.dynamicreporting.core.serverless.template.SQLQueryGenerator

Generator that produces items from SQL queries.

ansys.dynamicreporting.core.serverless.template.ItemsComparisonGenerator

Generator that compares items and outputs comparisons.

ansys.dynamicreporting.core.serverless.template.StatisticalGenerator

Generator that performs statistical analyses on input items.

ansys.dynamicreporting.core.serverless.template.IteratorGenerator

Generator that iterates over subsets of items or templates.