Skip to content

Getting started

You want an agent to write a report, a query or a data-cleaning script, but the data is customers, patients or payroll. Pasting rows into a chat is a leak. Describing the columns by hand is tedious and error-prone. DataNyx sits in between:

What the agent gets What it never gets
Structured data
datanyx schema
Field names, types, formats, nesting, primary and foreign keys Values, examples, enum labels, counts or statistics
Free text
datanyx anonymize
The text with <PERSON_1>, <EMAIL_1> and friends in place of identifiers The identifiers themselves (best effort: review the result)

Install

The PyPI package is the recommended way to install DataNyx. There is also a container image, a pre-commit hook and a GitHub Action.

uv tool install "datanyx[all]"       # every reader, driver and the MCP server
datanyx doctor                       # shows which optional packages and models are installed
datanyx --version

Pick only what you need if you'd rather keep it small: uv tool install datanyx for CSV, JSON, XML and SQLite, or uv tool install "datanyx[parquet,excel]". The sources table lists the extra for each format. Text anonymization also needs a spaCy model. To use DataNyx as a library in a project, run uv add datanyx instead.

Requires Python 3.10 or newer.

From a clone

To work on DataNyx, or to run the newest code, install from a clone:

git clone https://github.com/lud3nb3rg/DataNyx.git && cd DataNyx
uv sync --all-extras
uv run datanyx doctor

See it work

Given a customers.csv like this:

id,email,signed_up,plan,lifetime_value,notes
1,ana@example.com,2024-01-02,pro,129.5,called twice
2,li@example.org,2024-02-11,free,0,
3,omar@example.net,2024-03-30,pro,310.25,vip
$ datanyx schema customers.csv --format text
root: array<{
  id: integer
  email: string<email>
  signed_up: string<date>
  plan: string
  lifetime_value: number
  notes: string | null
}>

That is everything the agent sees. The same schema can be written as TypeScript, Pydantic models or SQL with --format.

To let the agent try its code and see real output, generate fake rows from that schema:

$ datanyx synth customers.csv --rows 3 --format csv
id,email,signed_up,plan,lifetime_value,notes
1,jonas.larsen6@example.com,2022-11-26,meadow juniper,967.8,Ember juniper ember zephyr delta timber indigo.
2,lucas.singh19@example.com,2023-06-24,yarrow,73.74,Ripple delta lantern nectar kestrel timber.
3,elena.rossi71@example.com,2025-05-07,quartz indigo,62.28,Yarrow meadow willow.

And for text, given a call-notes.txt containing:

Jessica Whitfield (jessica@northwind.example) called on March 3rd about invoice
INV-20419. Ms. Whitfield lives in Portland. Her manager Tomasz Kowalczyk agreed.
$ datanyx anonymize call-notes.txt
<PERSON_1> (<EMAIL_1>) called on <DATE_1> about invoice
<ID_1>. Ms. <PERSON_1> lives in <LOCATION_1>. Her manager <PERSON_2> agreed.

The same person keeps the same placeholder, so the agent can still follow who did what.

Next steps

  • Let the agent work on its own. Using it with an agent sets up Claude Code so it can't read the data directly (datanyx protect), and serves schemas, fake rows and checks over MCP (datanyx mcp).
  • Run what it writes. datanyx run -- python report.py runs its script on the real data and shows it only a scrubbed error (debugging); datanyx check catches wrong names before that (checking code).
  • Look before you share a folder. datanyx scan reports where personal data and secrets are (scanning).
  • Settle the policy once. datanyx init writes a datanyx.toml for the project (team settings).
  • Know the limits. The privacy model says what is guaranteed and what is best effort.