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
Seemkdocs
documentation.
Alternative usage
- 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.
text_markdown = pandera_to_markdown(schema)
docs.save_markdown(text_markdown, filename = 'index.md')
- See documentation.
cd my_docs
mkdocs serve
- Build and deploy
Seemkdocs
documentation.
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
data_documenter-0.3.2.tar.gz
(5.3 kB
view hashes)
Built Distribution
Close
Hashes for data_documenter-0.3.2-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 99b1b92bfe93d5c05389b4e0f815bfc87f8325e0911108d4ac7b49999e5fd6a7 |
|
MD5 | 71b16627548d52da7d3d68756d8662f2 |
|
BLAKE2b-256 | ee4ca66190eb367a6e6e6d1c080d0e63692b896e014b2ee3d97c1b356524a221 |