Skip to main content

ZEN-temple

ZEN-temple is a FastAPI application that provides a REST API to access results from ZEN-garden. It is the backend of the visualization platform; the frontend is ZEN-explorer.

PyPI - Version Python Version from PEP 621 TOML

GitHub Actions: Type checker

GitHub License

🧭 Which setup do I need?

The visualization platform is always ZEN-temple (API) + ZEN-explorer (UI). A released zen-temple package already bundles a built copy of ZEN-explorer, so end users install a single package. When you work from a checkout of this repository the frontend is not included and has to be fetched once.

Your goal Follow Clone Extra tools
Visualize my own ZEN-garden solutions Quick start nothing (install from PyPI) –
Develop ZEN-temple (this repo) Backend development ZEN-temple –
Develop ZEN-explorer (the frontend) ZEN-explorer README → Development ZEN-explorer and ZEN-temple Node.js

Which shell / terminal?

Every command block below runs the same in PowerShell, Windows Command Prompt (cmd) and macOS/Linux bash/zsh. conda, pip, git and the zen-* commands behave identically in all of them. Where a step genuinely differs between shells (copying .env, running a bash script) each variant is shown and labelled.

🛠️ Requirements

  • Conda (Miniconda is enough)
  • Python 3.11 or higher
  • Node.js with npm – only if you also develop ZEN-explorer

🚀 Quick start

Use this to visualize your own solutions. You do not need to clone this repository.

conda create --name zen python==3.13
conda activate zen
pip install zen-garden zen-temple

Run ZEN-garden to produce an outputs folder (or use an existing one), then from the directory that contains outputs start the platform:

zen-visualization

Your browser opens at http://localhost:8000/explorer/. Point ZEN-temple at a different solutions folder with zen-visualization --outputs-folder <path>.

🐍 Backend development

Use this when you want to change ZEN-temple itself.

  1. Clone and enter the repository:

    git clone https://github.com/ZEN-universe/ZEN-temple.git
    cd ZEN-temple
    
  2. Create the environment and install in editable mode:

    conda create --name zen python==3.13
    conda activate zen
    pip install -e .[mypy]
    
  3. Fetch the ZEN-explorer frontend. A checkout ships only a placeholder page, and zen-visualization refuses to start without the real build.

    Skip this step if you are developing ZEN-explorer in parallel – run ZEN-temple with --api-only instead (see Developing against a live ZEN-explorer).

    Pull a prebuilt copy from the latest published zen-temple release:

    zen-temple-fetch-explorer
    
    • Add --version <x.y.z> to match a specific zen-temple release.
    • The files land in zen_temple/explorer/ and are git-ignored.
  4. Create your .env file from the example:

    PowerShell:

    Copy-Item .env.example .env
    

    Command Prompt (cmd):

    copy .env.example .env
    

    bash / zsh:

    cp .env.example .env
    

    SOLUTION_FOLDER in .env is only a fallback; the -o/--outputs-folder flag and the current working directory take precedence.

Run the server

conda activate zen
zen-visualization --reload

By default ZEN-temple searches for solutions in ./outputs and then in the current working directory. To select a solution folder explicitly, use:

zen-visualization --outputs-folder <path-to-solutions>

The equivalent module invocation is python -m zen_temple.main --reload. For all available command line arguments run:

python -m zen_temple.main --help

If the server refuses to start with a "port ... is not available" message, an earlier zen-visualization is probably still running. Stop it, or pass --port <other-port> (and set PUBLIC_TEMPLE_URL for the ZEN-explorer dev server accordingly).

Developing against a live ZEN-explorer

When you also run the ZEN-explorer dev server, start ZEN-temple in API-only mode. The bundled frontend is then neither required nor served, so you can skip zen-temple-fetch-explorer:

zen-visualization --api-only --no-open-browser --reload

Then follow ZEN-explorer's README to start its dev server with npm run dev. The UI is served from http://localhost:5173/ and talks to this API at http://localhost:8000/api/.

📤 Release workflow

Releases are driven by the Release GitHub Actions workflow. Do not edit pyproject.toml or CHANGELOG.md by hand.

  1. Merge your changes into main. The workflow then opens (or updates) a pull request titled Release vX.Y.Z.devN, labelled release, that bumps the version and prepends a CHANGELOG.md entry.
  2. Set the version and notes on that PR. Edit its title (Release vX.Y.Z for a full release, keep the .devN suffix for a pre-release) and its description (becomes the CHANGELOG body). A workflow run rewrites the files on the PR branch. Keep the release label.
  3. Merge the release PR. This only creates a draft GitHub release – no tag, no PyPI upload yet.
  4. Publish the draft at https://github.com/ZEN-universe/ZEN-temple/releases: open it, set the pre-release flag as needed, click Publish release. This creates the vX.Y.Z tag and triggers the Publish … to PyPI workflow (~7 min; it builds ZEN-explorer main into the package).
  5. Verify the version at https://pypi.org/project/zen-temple/#history.

Until the tag from step 4 exists, every push to main re-opens a release PR. A release PR merged without the release label, or with a title that is not Release vX.Y.Z[.devN], is not turned into a draft release.

🗂️ Folder structure

The folder and file structure is the following:

Explorer

explorer contains the built ZEN-explorer frontend that ZEN-temple serves as static files.

Models

models contains the Pydantic-models that are used for the documentation. Some of these models also include generators that create an instance of the model given the path of a solution. See https://fastapi.tiangolo.com/tutorial/body/#create-your-data-model

Repositories

repositories contains the repositories for the data access. These provide an abstraction layer for the routers such that the data access is separated from the data source. Arguably, the generators defined in the models should be part of the repository in order to separate the instantiation of the models from the way that the solutions are stored. For more information visit https://www.umlboard.com/design-patterns/repository.html

Routers

routers contains the FastAPI routers which define the different paths of the API server. For more information visit https://fastapi.tiangolo.com/tutorial/bigger-applications/

Config

config.py contains the config of the application.

Main

main.py contains the setup of the FastAPI application. For more information visit https://fastapi.tiangolo.com/tutorial/bigger-applications/

Metadata

Release files for zen-temple 0.10.2

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for zen-temple 0.10.2
File Size Uploaded
zen_temple-0.10.2.tar.gz 46.5 MB Details

Built distribution (wheel)

Table of built distributions (wheels) for zen-temple 0.10.2
File Interpreter ABI Platform
zen_temple-0.10.2-py3-none-any.whl Python 3 none any Details

Total release size: 93.1 MB

Release files / zen_temple-0.10.2.tar.gz

Download URL zen_temple-0.10.2.tar.gz
Size 46.5 MB
Tags Source
SHA-256 checksum
How to use checksums
d7387168e1eef299c07ca853d8bfd43fb7635fa55c6f0d957396e331ac58cb5e
BLAKE2b-256 checksum
How to use checksums
b0c60b0812dabb3aaca12928798a7bbff13fdf7a6f5b3d732434e683a8f0ed3f
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.14

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Sep 8, 2026.

Transparency log

Release files / zen_temple-0.10.2-py3-none-any.whl

Download URL zen_temple-0.10.2-py3-none-any.whl
Size 46.6 MB
Tags Python 3
SHA-256 checksum
How to use checksums
6f457b397fe398a3487aa21739f59f0153c8b8c1a2c4d3b65689b4ce1894dbeb
BLAKE2b-256 checksum
How to use checksums
9f86bae72c5562c1d4794dccfab9e0a85dd477813ffcdb742d400f91dc49c5d5
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.14

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Sep 8, 2026.

Transparency log

Release history Release notifications | RSS feed

This release

0.10.2 This release

2 release files

0.9.7

2 release files

0.9.6

2 release files

0.9.5

2 release files

0.9.4

2 release files

0.9.3

2 release files

0.9.2

2 release files

0.9.1

2 release files

0.9.0

2 release files

0.8.0

2 release files

0.7.5

2 release files

0.7.4

2 release files

0.7.3

2 release files

0.7.2

2 release files

0.7.1

2 release files

0.7.0

2 release files

0.6.2

2 release files

0.6.1

2 release files

0.6.0

2 release files

0.5.5

2 release files

0.5.4

2 release files

0.5.3

2 release files

0.5.2

2 release files

0.5.1

2 release files

0.5.0

2 release files

0.4.4

2 release files

0.4.3

2 release files

0.4.2

2 release files

0.4.1

2 release files

0.4.0

2 release files

0.3.2

2 release files

0.3.1

2 release files

0.3.0

2 release files

0.2.11

2 release files

0.2.10

2 release files

0.2.9

2 release files

0.2.8

2 release files

0.2.7

2 release files

0.2.6

2 release files

0.2.5

2 release files

0.2.4

2 release files

0.2.3

2 release files

0.2.2

2 release files

0.2.1

2 release files

0.2.0

2 release files

0.1.14

2 release files

0.1.13

2 release files

0.1.11

2 release files

0.1.10

2 release files

0.1.9

2 release files

0.1.8

2 release files

0.1.7

2 release files

0.1.6

2 release files

0.1.5

2 release files

0.1.4

2 release files

0.1.3

2 release files

0.1.2

2 release files

0.1.1

2 release files

0.1.0

2 release files

0.0.9

2 release files

0.0.8

2 release files

0.0.7

2 release files

0.0.6

2 release files

0.0.5

2 release files

0.0.4

2 release files

0.0.3

2 release files

0.0.2

2 release files

0.0.1

2 release files

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page