Metadata-Version: 2.4
Name: lumida
Version: 0.4.0
Summary: Points read-only at your databases, learns what normal looks like, and tells you what's wrong, with evidence. Runs entirely on your own machines.
Author: Rohan Chauhan
License-Expression: Apache-2.0
Project-URL: Homepage, https://github.com/Rohan708/Lumida
Project-URL: Documentation, https://github.com/Rohan708/Lumida/blob/main/docs/setup/install.md
Project-URL: Source, https://github.com/Rohan708/Lumida
Project-URL: Issues, https://github.com/Rohan708/Lumida/issues
Keywords: data quality,anomaly detection,database monitoring,postgres,mysql,sql server,oracle,snowflake,self-hosted,data observability
Classifier: Development Status :: 4 - Beta
Classifier: Environment :: Console
Classifier: Environment :: Web Environment
Classifier: Intended Audience :: Developers
Classifier: Intended Audience :: System Administrators
Classifier: Programming Language :: Python :: 3
Classifier: Programming Language :: Python :: 3.12
Classifier: Topic :: Database
Classifier: Topic :: Database :: Database Engines/Servers
Requires-Python: >=3.12
Description-Content-Type: text/markdown
License-File: LICENSE
Requires-Dist: sqlalchemy<3,>=2.0.30
Requires-Dist: alembic<2,>=1.16
Requires-Dist: psycopg[binary]<4,>=3.2
Requires-Dist: pydantic<3,>=2.7
Requires-Dist: pydantic-settings<3,>=2.3
Requires-Dist: python-dotenv<2,>=1.0
Requires-Dist: sqlglot>=25
Requires-Dist: pyyaml>=6
Requires-Dist: tzdata
Requires-Dist: fastapi<1,>=0.115
Requires-Dist: uvicorn<1,>=0.30
Provides-Extra: lab
Requires-Dist: faker>=30; extra == "lab"
Provides-Extra: mysql
Requires-Dist: pymysql>=1.1; extra == "mysql"
Provides-Extra: sqlserver
Requires-Dist: pyodbc>=5.1; extra == "sqlserver"
Provides-Extra: oracle
Requires-Dist: oracledb>=2.0; extra == "oracle"
Provides-Extra: snowflake
Requires-Dist: snowflake-sqlalchemy>=1.6; extra == "snowflake"
Provides-Extra: all
Requires-Dist: pymysql>=1.1; extra == "all"
Requires-Dist: oracledb>=2.0; extra == "all"
Requires-Dist: snowflake-sqlalchemy>=1.6; extra == "all"
Provides-Extra: dev
Requires-Dist: faker>=30; extra == "dev"
Requires-Dist: httpx>=0.27; extra == "dev"
Requires-Dist: pymysql>=1.1; extra == "dev"
Requires-Dist: pytest>=8.2; extra == "dev"
Requires-Dist: types-PyYAML; extra == "dev"
Requires-Dist: testcontainers[mysql,postgres]>=4.15; extra == "dev"
Requires-Dist: ruff>=0.6; extra == "dev"
Requires-Dist: mypy>=1.11; extra == "dev"
Requires-Dist: pre-commit>=3.7; extra == "dev"
Dynamic: license-file

# Lumida: light on your data

Point Lumida at your databases, read-only. It finds the relationships nobody documented, learns what normal looks like for every table and column, and tells you every morning what's wrong, what it breaks and why, with the evidence.

**It runs entirely on your own machines.** There's no account, no sign-up and no telemetry. Your data, and even your table names, never reach Lumida's makers.

## Install
```bash
pip install lumida                 # Postgres support included
pip install "lumida[all]"          # + MySQL, Oracle, Snowflake drivers
```
Requires Python 3.12+.

## Start
```bash
lumida setup     # where Lumida keeps what it learns (any Postgres), and your admin account
lumida serve     # runs Lumida: the nightly checks, and the web app
```
Open **http://127.0.0.1:8000**, log in, and go to *Databases → Add a database*. It shows a script for the read-only login and tests the connection; then press *Run now*.

Connection URLs stay in `.env` on your machine, under a name you choose:
```
SHOP_DB_URL=postgresql+psycopg://readonly_user:<password>@db-host:5432/shop
```

**Prefer Docker?** One `docker compose up -d` brings Lumida and its own Postgres. See the [install guide](https://github.com/Rohan708/Lumida/blob/main/docs/setup/install.md).

## What it finds
- **Structure:** missing keys, dropped columns, changed types, unindexed links.
- **Relationships:** links nobody declared, orphan rows, duplicates.
- **Values:** sudden empties, out-of-range numbers, "USA" next to "US", near-duplicate emails.
- **Business rules:** "shipped after ordered", "total = sum of lines". AI proposes, you approve.
- **Loads:** volume drops, tables that stopped updating, missed deadlines; it knows weekdays and closed days.
- **Unusual rows**, **copies that disagree** (app database vs warehouse) and **personal data in unexpected places**.

Every problem comes with real numbers and the IDs of the rows involved. Confirm or dismiss it, and Lumida remembers.

## How it stays safe
- **Read-only:** a read-only login, read-only transactions, timeouts on every query. It never writes to your databases.
- **Counted in place:** the counting happens inside your database. Only counts, statistics and row IDs come back.
- **AI is optional and yours:** bring any OpenAI-compatible service, a local model (Ollama, LM Studio, vLLM) or Gemini, with your own key. AI only proposes; people approve. `LUMIDA_OFFLINE=true` blocks every outside connection.

## In CI
Keep approved rules in git and fail the build when data breaks them:
```bash
lumida rules export shop -o lumida-rules.yaml
lumida check --rules lumida-rules.yaml --connection-ref STAGING_DB_URL
```

Supports PostgreSQL, MySQL/MariaDB, SQL Server, Oracle and Snowflake.

Open source under the Apache 2.0 licence: https://github.com/Rohan708/Lumida
