Skip to main content

datavane

A Python library for automatically generating documentation from datasets.

datavane inspects JSON and CSV datasets, infers their structure and generates a Markdown data dictionary containing information about fields, types, examples, presence and null values.

Features

  • Support for JSON and CSV files.
  • Recursive processing of nested dictionaries and lists.
  • Automatic field type inference.
  • Field path notation for nested structures.
  • Example values for detected fields.
  • Field presence and null-value statistics.
  • Recursive discovery of JSON and CSV files inside directories.
  • Markdown documentation generation.
  • No external runtime dependencies.

Installation

Install Datavane from PyPI:

pip install datavane

Once installed, you can import it directly in your Python project:

from datavane import doc_table

Usage

The main public API is doc_table():

from pathlib import Path

from data_dictionary import doc_table

doc_table(
    Path("data/matches.json"),
    "Matches",
    Path("docs/matches.md"),
)

The function accepts either a JSON/CSV file or a directory containing supported datasets.

For example, given a dataset containing:

{
    "id": 1,
    "name": "Juan",
    "address": {
        "city": "Málaga"
    }
}

the generated documentation can identify fields such as:

id
name
address
address.city

along with their inferred types, examples and statistics.

Generated documentation

The generated Markdown document contains a summary followed by the inferred schema:

# Matches

> Data dictionary generated automatically by `datavane`.

## Dataset summary

| Property | Value |
|----------|-------|
| Records  | 100   |
| Fields   | 8     |

## Schema

| Field | Type | Example | Presence | Nulls |
|---|---|---|---|---|
| id | int | 1 | 100.0% | 0.0% |
| name | str | John | 100.0% | 0.0% |
| address.city | str | Madrid | 98.0% | 0.0% |

Project structure

data-dictionary/
├── src/
│   └── data_dictionary/
│       ├── __init__.py
│       ├── models.py
│       ├── inference.py
│       ├── formatting.py
│       ├── io.py
│       └── generator.py
├── tests/
│   ├── fixtures/
│   ├── unit/
│   └── integration/
├── pyproject.toml
├── README.md
└── LICENSE

Development

Create a virtual environment and install the project in editable mode:

python -m venv .venv
python -m pip install -e .

Run the test suite with:

pytest

The project contains both unit and integration tests.

Status

This project is currently in early development. The public API and internal implementation may change as the library evolves.

License

This project is licensed under the MIT License.

Release files for datavane 0.1.0

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for datavane 0.1.0
File Size Uploaded
datavane-0.1.0.tar.gz 6.4 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for datavane 0.1.0
File Interpreter ABI Platform
datavane-0.1.0-py3-none-any.whl Python 3 none any Details

Total release size: 14.5 kB

Release files / datavane-0.1.0.tar.gz

Download URL datavane-0.1.0.tar.gz
Size 6.4 kB
Tags Source
SHA-256 checksum
How to use checksums
9ab53aa744320ce3f4f91f4902b9ac47a86a6f8d7d56b7db595793ef781ab86c
BLAKE2b-256 checksum
How to use checksums
28b3b439f12780f6bdfe98c7fe98f91b98376117a10ecfc566099778be9742a5
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via poetry/2.4.3 CPython/3.14.7 Windows/10

Release files / datavane-0.1.0-py3-none-any.whl

Download URL datavane-0.1.0-py3-none-any.whl
Size 8.1 kB
Tags Python 3
SHA-256 checksum
How to use checksums
8c070cced152d52d79a5ac4308b01d740b70159738a61f9b5affd825a331eab0
BLAKE2b-256 checksum
How to use checksums
b8d6b2740c8d4033ffa52aa4b13f877ffd9db2e16f607bbad47e216c3ef2f933
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via poetry/2.4.3 CPython/3.14.7 Windows/10

Release history Release notifications | RSS feed

This release

0.1.0 This release

2 release files

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page