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:
Instantiate
ansys.dynamicreporting.core.serverless.adr.ADR,Call
ADR.setup()to configure database and storage,Create and query items and templates, and
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 Dynamic Reporting (ADR) class. |
|
Collection wrapper around a queryset of |
|
Execution context for a reporting run. |
|
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).
Base class for all persisted report items. |
|
Item representing a plain string payload. |
|
Item representing an HTML fragment. |
|
Item representing a 2D table backed by a NumPy array. |
|
Item representing a hierarchical tree payload. |
|
Item representing a generic file payload. |
|
Item representing an image payload, optionally enhanced. |
|
Item representing an animation/video payload. |
|
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:
Define a
Templatehierarchy using one or more layout classes,Bind item filters and parameters to the template, and
Ask
ADRto render the template to HTML, PDF, or PPTX.
These classes focus on presentation and navigation rather than on data transformation.
Base class for all report templates. |
|
Simple layout with no extra behavior. |
|
Panel-style layout with optional callout styling and link rendering. |
|
Box layout where each child is positioned explicitly in a grid. |
|
Tab-based layout that arranges children as tabs. |
|
|
Carousel layout with optional animation and dot controls. |
|
Slider layout that maps tags to slider controls. |
|
Layout representing a page footer region. |
|
Layout representing a page header region. |
|
Layout used as an iterator over items or templates. |
|
Layout that exposes item tags as properties. |
Layout responsible for Table-of-Contents entries. |
|
|
Layout that links to external or other ADR reports. |
Layout representing a full PPTX report definition. |
|
|
Layout defining settings for an individual PPTX slide. |
|
Layout that exposes interactive data filtering controls. |
|
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
Iteminstances into a derived view,Encapsulate complex business logic in a single node, and
Keep layouts declarative while still supporting advanced processing.