Skip to main content
Pre-release

This release is a pre-release and may not be stable for production use.

Acquirium

A Data-Metadata Framework for Water Treatment Plants

Acquirium is a framework for storing, managing, querying, and integrating data and metadata for water treatment systems. It combines knowledge graphs and time series data to support analysis, monitoring, and experimentation.

Installation

From PyPI:

pip install acquirium

Optional extras for specific drivers:

pip install "acquirium[mqtt]"       # MQTT ingestion driver
pip install "acquirium[xlsx]"       # Excel ingestion driver
pip install "acquirium[watertap]"   # WaterTAP simulation driver

Or with uv:

uv pip install acquirium

For development from a clone:

git clone https://github.com/DataDrivenCPS/acquirium.git
cd acquirium
python -m venv .venv && source .venv/bin/activate
pip install -e .
# or: uv sync

Quickstart

Easiest way to experiment with acquirium is through an example. We strongly recommend following the steps in watertap readme. Watertap is a simulation tool that has integration to acquirium. If you follow the steps there, you'll be able to run acquirium as if it's connected to a live plant that generates data or generate historical data that has realistic (abides physical formulations) ranges and try building applications over it.

Acquirium ships a single CLI entry point. Start the server and any configured drivers with:

acquirium server --config acquirium.toml

A sample acquirium.toml is included at the repository root. Key sections:

  • [server] — bind host/port, choice of timeseries backend (DuckDB or TimescaleDB), data directory.
  • [driver] — connection defaults applied to all drivers (server URL, port, tick interval).
  • [[drivers]] — drivers to start alongside the server.

By default the server stores data on local disk — an embedded Oxigraph RDF store and a single DuckDB file under data_dir. No external services are required for a fresh install. For multi-worker or production deployments, switch the config to timeseries_backend = "timescale" and point pg_dsn at a Postgres + TimescaleDB instance.

Override the bind host/port from the CLI if needed:

acquirium server --config acquirium.toml --host 127.0.0.1 --port 8000
acquirium server --config acquirium.toml --reload          # uvicorn auto-reload

Driver-only mode

To run only [[drivers]] against a remote Acquirium server (no FastAPI on this host), set:

[server]
enabled = false

and configure [driver].server_url / server_port to point at the remote instance. Then:

acquirium server --config acquirium.toml

When enabled = false, the server subcommand starts only the drivers.

Docker stack (optional)

A compose.yaml is provided for an all-in-one local stack (Acquirium + TimescaleDB + Grafana):

make up                              # start
make up ACQUIRIUM_RECREATE=true      # wipe data + start
make down                            # stop

By default each Docker run resets the system. To preserve data across runs, set ACQUIRIUM_RECREATE=false in compose.yaml.

WaterTAP integration

The WaterTAP deployment is the recommended starting point — it walks you through cloning the repo, installing (uv or pip), and running Acquirium against physically realistic simulated plant data, with example notebooks. Start there.

In short, the watertap extra installs the Python packages needed for the built-in WaterTAP driver, plus a one-time install of native solver extensions:

pip install "acquirium[watertap]"
idaes get-extensions                        # native IDAES/IPOPT solver binaries
# with uv: uv sync --extra watertap && uv run idaes get-extensions
acquirium server --config acquirium.toml    # with a [[drivers]] entry for WaterTAP

For a full demo (WaterTAP + streaming simulator + API examples):

make watertap-up
uv run scripts/api_example.py
# or open the notebooks in notebooks/watertap/
make watertap-down

Logging

Acquirium supports user logs attached to entities in the system. See scripts/logging_example.py:

acquirium server --config acquirium.toml &
python scripts/logging_example.py

Text Matcher

Acquirium uses a text matcher to map natural-language input to ontology URIs (classes, predicates, units, quantity kinds). The match algorithm uses semantic embedding similarity powered by FastEmbed (default model: BAAI/bge-small-en-v1.5). Each ontology concept is represented by one or more surface strings, embedded and stored in an in-memory vector index. At query time the input phrase is embedded and compared against the index using cosine similarity.

There are two separate matchers, each with its own index:

  1. Graph matcher — indexes classes and predicates from user-inserted RDF graphs. Surface strings are derived from rdfs:label values and CamelCase/underscore-split local names.
  2. QUDT matcher — indexes units and quantity kinds from the QUDT ontology, which ships bundled inside the acquirium package and is registered at the versionless canonical IRIs https://qudt.org/vocab/unit and https://qudt.org/vocab/quantitykind. Override either by adding a { source = "...", as = "<canonical IRI>" } entry to [ontologies] sources in acquirium.toml. Surface strings include rdfs:label, skos:prefLabel, skos:altLabel, symbols, UCUM codes, and split local names.

Both indexes are cached to disk and updated incrementally when graphs change. Results can be filtered by kind (class, predicate, unit, quantity_kind) and are ranked by cosine similarity, deduplicated to the highest-scoring surface per URI. See scripts/text_matcher_example.py for usage.

Tests

pytest tests/unit            # unit tests only
make test                    # full suite (Docker required)

Status

Acquirium is under active development. Planned work is tracked in improvements.md. Bug reports and feature requests are welcome — please open an issue.

Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

acquirium-0.4.0a1.tar.gz (956.6 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

acquirium-0.4.0a1-py3-none-any.whl (996.6 kB view details)

Uploaded Python 3

File details

Details for the file acquirium-0.4.0a1.tar.gz.

File metadata

  • Download URL: acquirium-0.4.0a1.tar.gz
  • Upload date:
  • Size: 956.6 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: uv/0.12.4 {"installer":{"name":"uv","version":"0.12.4","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Ubuntu","version":"24.04","id":"noble","libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":true}

File hashes

Hashes for acquirium-0.4.0a1.tar.gz
Algorithm Hash digest
SHA256 7f8b5af8cee420847f20d80ba2316ab2f14621807af7ce4deb320f3cf255c4f8
MD5 0f4fd13b93b7eb7ef8c62f77c3b84a9f
BLAKE2b-256 60f746762b24cd089a35adbfad814a1a26f44afc7ee530eec2a044ee52df9a7b

See more details on using hashes here.

File details

Details for the file acquirium-0.4.0a1-py3-none-any.whl.

File metadata

  • Download URL: acquirium-0.4.0a1-py3-none-any.whl
  • Upload date:
  • Size: 996.6 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: uv/0.12.4 {"installer":{"name":"uv","version":"0.12.4","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Ubuntu","version":"24.04","id":"noble","libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":true}

File hashes

Hashes for acquirium-0.4.0a1-py3-none-any.whl
Algorithm Hash digest
SHA256 18e125ce7f6f7c8ec641623cf9be7840ea18f2be279f9c8912b6d508ad7dfc9a
MD5 806583db2b7c780e3ec60d6a90125a20
BLAKE2b-256 0681d0c515db63e5f6ed2b4434d6ef174ebb38abf57a49ce5c3136ab0d557a79

See more details on using hashes here.

Release history Release notifications | RSS feed

This release

0.4.0a1 This release

2 files

0.3.1

2 files

0.1.1

2 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