No project description provided
Project description
Data Documenter
A package to generate documentation from pandera schema using mkdocs material.
Installation
pip install data-documenter
Quick start
- Create schema using
pandera
from pandera import DataFrameSchema, Column
schema = DataFrameSchema(
title="Title of dataset",
description="Description of dataset",
columns={
"COLUMN_NAME": Column(
dtype="str",
nullable=False,
unique=True,
description="Description of column",
title="Column Name"
),
},
)
- Create documentation using schema
from data_documenter.pandera_plugin import create_documentation
docs = create_documentation(
schema,
docs_path = 'docs_folder',
title = 'page title',
filename = 'index.md'
)
- Run server
docs.run()
- Stop server
docs.stop()
It is better to use mkdocs command instead of run, stop for better control of processes. See alternative usage.
cd path/to/folder
mkdocs serve
- Build and deploy documentation
Seemkdocsdocumentation.
Alternative usage
- Create pandera schema
from pandera import DataFrameSchema, Column
schema = DataFrameSchema(
title="Title of dataset",
description="Description of dataset",
columns={
"COLUMN_NAME": Column(
dtype="str",
nullable=False,
unique=True,
description="Description of column",
title="Column Name"
),
},
)
- Create new folder for documentation server.
from data_documenter.metadocs import MetaDocs
docs = MetaDocs(docs_path = 'my_docs')
docs.new()
This will simply run mkdocs new my_docs and replace mkdocs.yml file.
- Save documentation for schema in a markdown file.
from data_documenter.pandera_plugin import pandera_to_markdown
text_markdown = pandera_to_markdown(schema, title = 'Homepage')
docs.save_markdown(text_markdown, filename = 'index.md')
- See generated documentation.
cd my_docs
mkdocs serve
- Build and deploy
Seemkdocsdocumentation.
Project details
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file data_documenter-0.3.4.tar.gz.
File metadata
- Download URL: data_documenter-0.3.4.tar.gz
- Upload date:
- Size: 5.3 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: poetry/1.7.1 CPython/3.10.12 Linux/5.15.133.1-microsoft-standard-WSL2
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
7f22ea639b4df68ec735d29eaaf6fea2dc43326a48bc70ae33497f8eba7e4a66
|
|
| MD5 |
f4928f0a2b1723eb5efa49fcb245098c
|
|
| BLAKE2b-256 |
0fc723993cbfa0765b7c352b97c5a7fa3627988a6259acbd8ea066bcfba875f5
|
File details
Details for the file data_documenter-0.3.4-py3-none-any.whl.
File metadata
- Download URL: data_documenter-0.3.4-py3-none-any.whl
- Upload date:
- Size: 7.4 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: poetry/1.7.1 CPython/3.10.12 Linux/5.15.133.1-microsoft-standard-WSL2
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
96bb966f8f4d10507a07e794f1fb874dec90eb98212b47ed23468e787e207148
|
|
| MD5 |
642a6a0d23c721f47918b4d5b217d3fd
|
|
| BLAKE2b-256 |
bf5c6f2e2dde2ef0c936445331ae5967c1b697c5d04975dd072782b1492090de
|