azure-anomaly-shim
A drop in replacement for the retired Azure Anomaly Detector service, powered by PyOD.
Microsoft is retiring Azure AI Anomaly Detector on 1 October 2026. Any application built on that service will stop working. This small Python package lets you keep your existing code almost unchanged. Swap one import line and your anomaly detection runs locally using the open source PyOD library instead of the Azure service.
Why this exists
Many production systems built on Azure Anomaly Detector are facing a forced migration. Microsoft recommends moving to Microsoft Fabric, which is a heavier solution that requires more changes. This package offers a lighter alternative for users who only need the core anomaly detection feature.
Installation
pip install azure-anomaly-shim
Quick start
If your code currently looks like this:
from azure.ai.anomalydetector import AnomalyDetectorClient
client = AnomalyDetectorClient(endpoint, credential)
result = client.detect_univariate_entire_series(request)
You can switch to this:
from azure_anomaly_shim.detector import detect_univariate_entire_series
result = detect_univariate_entire_series(series=[10, 11, 9, 50, 10, 11], sensitivity=95)
No API keys. No network calls. No subscription. Runs locally.
What is supported
Two functions are currently available:
detect_univariate_entire_series(series, sensitivity=95)
Analyzes an entire time series and flags every point that looks anomalous.
detect_univariate_last_point(series, sensitivity=95)
Analyzes a time series and returns whether only the most recent point is anomalous. Useful for live monitoring.
Both return results in the same shape the old Azure SDK returned.
Example output
from azure_anomaly_shim.detector import detect_univariate_entire_series
data = [10, 11, 9, 10, 12, 9, 11, 10, 50, 10, 11]
result = detect_univariate_entire_series(data, sensitivity=85)
for i, is_anomaly in enumerate(result["is_anomaly"]):
if is_anomaly:
print(f"Position {i}: value = {data[i]}, severity = {result['severity'][i]:.2f}")
Output: Position 8: value = 50, severity = 1.00
What is not supported yet
Multivariate detection. The old SDK had train_multivariate_model and detect_multivariate_batch_anomaly for analyzing multiple correlated signals at once. These are planned for a future release.
Streaming windowed detection. Currently the package re analyzes the full series each call. For very long histories this is slower than the original Azure service. A windowed approach is on the roadmap.
How it works under the hood
The package uses Isolation Forest from the PyOD library. Isolation Forest works by randomly partitioning the data and counting how quickly each point can be isolated. Outliers get isolated faster than normal points, which makes them easy to spot.
The sensitivity parameter controls how strict the detection is. Higher values flag fewer anomalies, lower values flag more. The default is 95, which flags the top 5 percent of unusual points.
License
MIT License. Free to use in commercial and personal projects.
Author
Built by Sibonile Mthunzi as part of learning cloud migration tooling. Contributions and bug reports welcome.
Metadata
Release files for azure-anomaly-shim 0.1.0
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | Actions |
|---|---|---|---|---|
| azure_anomaly_shim-0.1.0.tar.gz | 4.9 kB | Without provenance | Details for azure_anomaly_shim-0.1.0.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| azure_anomaly_shim-0.1.0-py3-none-any.whl | Python 3 | none | any | Details for azure_anomaly_shim-0.1.0-py3-none-any.whl |
Total release size: 10.3 kB
Release files / azure_anomaly_shim-0.1.0.tar.gz
| Download URL | azure_anomaly_shim-0.1.0.tar.gz |
|---|---|
| Size | 4.9 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
97ac2d9798b632e1622a78ff0fff7e767b0f18062d71a6ff7d91249fb9a7e17c
|
|
BLAKE2b-256 checksum How to use checksums |
f660b8af1ca11f154cb7028926ac9970c7758c6e89b8a8136055e517dda39260
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/6.2.0 CPython/3.12.2
|
Release files / azure_anomaly_shim-0.1.0-py3-none-any.whl
| Download URL | azure_anomaly_shim-0.1.0-py3-none-any.whl |
|---|---|
| Size | 5.4 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
8f51d8af0f5e6f46723849dacd2f1fc9b661a69337c29ee6f1489cd566570df3
|
|
BLAKE2b-256 checksum How to use checksums |
2fa99393242dc6a839ad9d8f13c7c6783acc0881feb94a2b03ad603d6e9ffdba
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/6.2.0 CPython/3.12.2
|
Security for azure-anomaly-shim 0.1.0
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.
No provenance found
None of the files in this release were uploaded with provenance metadata.
A note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.