Metadata-Version: 2.4
Name: engrammatic
Version: 0.1.0
Summary: Python client for Engrammatic — ingest-time anomaly, novelty and fraud detection with binary hyperdimensional computing.
Project-URL: Homepage, https://engrammatic.ai
Project-URL: Console, https://app.engrammatic.ai
Author-email: Engrammatic <hello@engrammatic.ai>
License: MIT License
        
        Copyright (c) 2026 Engrammatic
        
        Permission is hereby granted, free of charge, to any person obtaining a copy
        of this software and associated documentation files (the "Software"), to deal
        in the Software without restriction, including without limitation the rights
        to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
        copies of the Software, and to permit persons to whom the Software is
        furnished to do so, subject to the following conditions:
        
        The above copyright notice and this permission notice shall be included in all
        copies or substantial portions of the Software.
        
        THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
        IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
        FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
        AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
        LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
        OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
        SOFTWARE.
License-File: LICENSE
Keywords: anomaly-detection,fraud-detection,hdc,hyperdimensional-computing,logs,novelty-detection,observability
Classifier: Development Status :: 3 - Alpha
Classifier: Intended Audience :: Developers
Classifier: License :: OSI Approved :: MIT License
Classifier: Programming Language :: Python :: 3
Classifier: Topic :: Security
Classifier: Topic :: System :: Monitoring
Requires-Python: >=3.9
Description-Content-Type: text/markdown

# Engrammatic Python client

Ingest-time anomaly, novelty and fraud detection with binary hyperdimensional
computing — encode each event once, compare with XOR + popcount. This package
is the official Python client for the [Engrammatic](https://engrammatic.ai)
service. It has **zero dependencies** (stdlib only).

## Install

```bash
pip install engrammatic
```

## Quickstart

Sign in with Google at [app.engrammatic.ai](https://app.engrammatic.ai) —
new accounts get **$5 of starting credit** — and copy your API key from the
dashboard.

```python
from engrammatic import Client

c = Client(api_key="ek_...")

# score one event (and learn it)
r = c.detect({"path": "/wp-admin.php", "status": 404, "ua": "python-requests"})
print(r)   # {"score": ..., "best_similarity": ..., "is_anomaly": ..., "balance_usd": ...}

# batch log ingestion
c.ingest([{"path": "/api/v1/orders", "status": 200, "ms": 41},
          {"path": "/api/v1/orders", "status": 503, "ms": 9040}])

# similarity search over what the memory has seen
hits = c.query({"path": "/api/v1/orders", "status": 503}, k=5)

# store without scoring
c.write({"path": "/healthz", "status": 200})

# current plans/rates (no key needed)
print(Client().pricing())
```

Out-of-credit responses raise `EngrammaticError` with `.out_of_credit == True`
(HTTP 402) — top up in the console.

## What it's for (and honestly, what it's not)

Engrammatic sits **alongside** your log platform (Hydrolix / Splunk / Datadog),
scoring events at ingest time for *combinatorial novelty* — field combinations
your stack hasn't seen — at $0.30–$1.00 per million events. If your problem is
a 5xx spike, use a threshold; a numeric outlier, a z-score; known signatures, a
WAF. Engrammatic earns its keep on the anomalies those baselines can't express.

## Notes

* This release is the **remote client only**; the embedded/local engine is not
  included (`Client(local=True)` raises).
* AI agents: the service publishes a manifest at
  `https://app.engrammatic.ai/.well-known/agent.json` and supports programmatic
  top-up — see the [console](https://app.engrammatic.ai).
* Docs & contact: [engrammatic.ai](https://engrammatic.ai) · hello@engrammatic.ai
