Skip to content

Installation

Getting mindoff-dataport onto your machine takes one command. Adding dataframe support takes one more. This page covers both, plus the handful of things worth knowing before you build your first report.

Prerequisites

  • Python >=3.10 (tested on 3.10, 3.11, 3.12, or 3.13)
  • pip

That's it. The core dependencies (openpyxl, xlsxwriter, reportlab, and pyarrow) install automatically and cover Excel reading/writing, PDF rendering, and Parquet storage.

Implementation

1. Install the Package

pip install mindoff-dataport

This pulls in everything needed to extract templates and export both XLSX and PDF.

2. Add Dataframe Support (Optional)

If you plan to feed tables into your reports (and most reports have a table somewhere), install the polars extra:

pip install "mindoff-dataport[polars]"

Why is Polars optional?

The core library has no opinion about where your tabular data comes from. Polars is only required when you actually pass a DataFrame or LazyFrame into compile(). Keeping it optional means lighter installs for projects that only render scalar reports.

3. Verify the Install

Open a Python shell and confirm the entry point imports:

from mindoff_dataport import mo_dataport
print(mo_dataport)

If that runs without an ImportError, you're ready.

The Four-Step Workflow

Every report follows the same sequence: extract the template, inspect what it needs, compile your data into it, and export to a file. The Quick Start walks through all four steps with a full code example. Once you've run your first report, continue with Templates & Placeholders to mark up your own Excel files.

Installing from Source

To work against the latest code or run the examples, clone the repository and install it in editable mode:

git clone https://github.com/mindoffwork/mindoff-dataport
cd mindoff-dataport
pip install -e ".[dev]"

The dev extra adds pytest, coverage tooling, and Polars so you can run the test suite and every example end to end.

Troubleshooting

  • ModuleNotFoundError: No module named 'polars' You passed a dataframe into compile() without the Polars extra. Install it with pip install "mindoff-dataport[polars]".
  • ImportError on mindoff_dataport Make sure you installed into the same interpreter you're running. A mismatched virtual environment is the usual cause.