Skip to main content

Installable time-series anomaly library with forecasting, reconstruction, and representation base approaches.

Project description

anomx

anomx is the core Python library for the Anomx platform: time-series datasets, forecasting models, anomaly scorers, and anomaly detectors built for interpretable, production-oriented workflows.

Anomx is a data intelligence platform focused on anomaly detection and predictive insights in complex, data-driven systems. The platform handles orchestration, workers, storage, connectors, audit trails, and human-in-the-loop feedback. This repository contains the reusable modeling layer that those systems compose.

Goals

  • Provide clean primitives for time-series datasets, scorers, detectors, and models.
  • Support both batch and online anomaly detection workflows.
  • Keep outputs interpretable: scores, thresholds, timestamps, labels, and metadata.
  • Stay modular enough to power the Anomx platform without coupling the library to the platform's storage or orchestration layer.
  • Integrate with the broader time-series ecosystem, especially Darts, through optional adapters.

Installation

The package is structured for PyPI distribution:

pip install anomx

For local development:

git clone https://github.com/anomx/anomx.git
cd anomx
python -m pip install -e ".[dev]"

Optional extras:

pip install "anomx[darts]"     # Darts forecasting model adapters
pip install "anomx[docs]"      # Documentation tooling
pip install "anomx[platform]"  # Platform-facing IO dependencies
pip install "anomx[release]"   # Build and PyPI publishing tooling

Package Layout

src/anomx/
  datasets/      TimeSeriesDataset, metadata, dataset loaders, transforms
  scorers/       Anomaly score contracts and scoring implementations
  detectors/     Batch and online anomaly detector contracts and implementations
  models/        Forecasting model contracts and baseline forecasters
  integrations/  Optional adapters, including Darts

Quick Start

from anomx.datasets import make_sine_anomaly_dataset
from anomx.detectors import MovingAverageDetector
from anomx.models import NaiveSeasonalModel

dataset = make_sine_anomaly_dataset()

detector = MovingAverageDetector(window=24, threshold=3.0)
result = detector.fit_predict(dataset)
print(result.to_dataframe().tail())

model = NaiveSeasonalModel(season_length=24).fit(dataset)
forecast = model.predict(12)
print(forecast.to_dataframe())

Darts Integration

The default install stays lightweight. To use Darts models, install the optional extra and wrap any compatible Darts forecasting model:

from darts.models import ExponentialSmoothing

from anomx.datasets import make_sine_anomaly_dataset
from anomx.integrations import DartsForecastingModel

dataset = make_sine_anomaly_dataset()
model = DartsForecastingModel(ExponentialSmoothing())
forecast = model.fit(dataset).predict(24)

The intent is to let Anomx expose Darts-backed forecasting and anomaly workflows without making Darts a required dependency for every user.

Development

python -m pip install -e ".[dev]"
pytest
ruff check .
mypy src/anomx
python -m pip install -e ".[release]"
python -m build

Platform Context

Anomx prioritizes:

  • Signal over noise: surface only relevant insights.
  • Clarity over complexity: outputs should be interpretable.
  • Actionability: every insight should support a decision.

The platform is designed around modular pipelines, real-time and batch workers, heterogeneous data sources, and versioned entities such as datasets, datasources, channels, jobs, runs, findings, and model artifacts. This library is the focused modeling and time-series package used by that larger system.

Status

This repository is in pre-alpha scaffold stage. The public API should be treated as provisional until the first stable release.

Project details


Download files

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

Source Distribution

anomx-0.2.2.tar.gz (115.9 kB view details)

Uploaded Source

Built Distribution

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

anomx-0.2.2-py3-none-any.whl (111.9 kB view details)

Uploaded Python 3

File details

Details for the file anomx-0.2.2.tar.gz.

File metadata

  • Download URL: anomx-0.2.2.tar.gz
  • Upload date:
  • Size: 115.9 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.12.7

File hashes

Hashes for anomx-0.2.2.tar.gz
Algorithm Hash digest
SHA256 a9283e7e51ddc83155a68fc5fb0e9ae7c8e197418198fe1ff7bfc5d9f21179ef
MD5 b7bed3ddf0f8778e236f0facdeeb6b7d
BLAKE2b-256 a804e203eb4515272b710788f29fa511685c711a83a206b11f52d80748d8bc5d

See more details on using hashes here.

File details

Details for the file anomx-0.2.2-py3-none-any.whl.

File metadata

  • Download URL: anomx-0.2.2-py3-none-any.whl
  • Upload date:
  • Size: 111.9 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.12.7

File hashes

Hashes for anomx-0.2.2-py3-none-any.whl
Algorithm Hash digest
SHA256 4e254a9191a4a20c517f20f87d2e12238c06b411b73b2a2e2726ce51b327bdf4
MD5 962cce89d180cff45aa1c32256782376
BLAKE2b-256 9c94c10cb93e302abeb96df5bf113dc73d9475c4f1fad94a341d55fdcd1329d5

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page