Skip to main content

Zen-Knit is a formal (PDF), informal (HTML) report generator for data analyst and data scientist who wants to use python. Rmarkdown Alternative for Python, It also allow you to publish reports to Zen Reportz Enterprise or community edition

Project description

About Zen-Knit:

Zen-Knit is a formal (PDF), informal (HTML) report generator for data analyst and data scientist who wants to use python. RMarkdown alternative. Zen-Knit is good for creating reports, tutorials with embedded python. RMarkdown alternative. Python Markdown Support. It also allows you to publish reports to analytics-reports.zenreportz.com (comming soon) or private zenreportz servers

Download Count python license version

VS Code Plugin:

Download VS Plugin from MarketPlace

Features:

  • .py and .pyz file support
  • Python 3.7+ compatibility
  • Support for IPython magics and rich output.
  • Execute python code in the chunks and capture input and output to a report.
  • Use hidden code chunks, i.e. code is executed, but not printed in the output file.
  • Capture matplotlib graphics.
  • Evaluate inline code in documentation chunks marked using { }
  • Publish reports from Python scripts. Similar to R markdown.
  • Interactive Plots using plotly
  • integrate it in your process. It will fit your need rather than you need to adjust for tool.
  • custom CSS support (HTTP(s) and local file)
  • direct sql support
  • chaching executed code for faster report devlopement
  • printing index of chunk or chunk name in console

Examples:

All example are available HERE

PDF example

PDF Code PDF Output

PDF example with SQL

PDF SQL Code PDF SQL Output

HTML example

HTML Code HTML Ouput HTML output 2

HTML example with custom CSS

HTML CDN CSS HTML Custom CSS

HTML example with SQL

HTML SQL HTML SQL output

Install

From PyPi:

pip install --upgrade zen-knit

or download the source and run::

python setup.py install

Other Dependency

install pandoc from : https://github.com/jgm/pandoc/releases

install texlive for debian: sudo apt install texlive-full

install texlive for window: https://www.tug.org/texlive/acquire-netinstall.html

install texlive for mac: https://tug.org/texlive/quickinstall.html

License information

Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.

How to Use it

pip install zen-knit

knit -f doc/example/html_example.pyz -ofd doc/example/output/

knit -f doc/example/pdf_example.pyz -ofd doc/example/output/

python doc/example/demo.py

Arguments

---
title: Zen Markdown Demo
author: Dr. P. B. Patel
date: CURRENT_DATE
output: 
    cache: true
    format: html
    html: 
        css: skleton
---

Above code will map on GlobalOption class in in following

class Input(BaseModel):
    dir: Optional[str]
    file_name: Optional[str]
    matplot: bool = True

class latexOuput(BaseModel):
    header: Optional[str] 
    page_size: Optional[str] = 'a4paper'
    geometry_parameter: Optional[str] = "text={16.5cm,25.2cm},centering"  #Newely added parameters

class htmlOutput(BaseModel):
    css: str = "bootstrap"

class Output(BaseModel):
    fig_dir: str = "figures"
    format: Optional[str]
    file_name: Optional[str]
    dir: Optional[str]
    latex: Optional[latexOuput]
    html: Optional[htmlOutput]

class GlobalOption(BaseModel):
    title: str
    author: Optional[str]
    date: Optional[str]
    kernal: str = "python3"
    log_level: str = "debug"
    cache: Optional[bool] = False
    output: Output
    input: Input

    @validator('log_level')
    def fix_option_for_log(cls, v:str):
        if v.lower() not in ('notset', "debug", 'info', 'warning', 'error', 'critical'):
            raise ValueError('must contain a space')
        return v.title()

Zen Publish:

Ability to publish programmable, formal, informal reports to Private or Public instance of zen reportz. Learn more at Here

Learn more about how to publish to private or public instance of Zen Reportz Here

analytics-reports.zenreportz.com features

  • Static Reports like HTML, PDF
  • Any one access reports
  • Free to use
  • Unlimite Publish
  • Republish report same place again

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

zen_knit-0.2.5.tar.gz (110.0 kB view details)

Uploaded Source

Built Distribution

zen_knit-0.2.5-py3-none-any.whl (116.1 kB view details)

Uploaded Python 3

File details

Details for the file zen_knit-0.2.5.tar.gz.

File metadata

  • Download URL: zen_knit-0.2.5.tar.gz
  • Upload date:
  • Size: 110.0 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: poetry/1.1.12 CPython/3.8.10 Linux/5.13.0-39-generic

File hashes

Hashes for zen_knit-0.2.5.tar.gz
Algorithm Hash digest
SHA256 502f7fdc52fd48f00d008ab81d61bd2d3c818d5c4d971c5805ff6edfe5592209
MD5 2f1c6b8d592ed415f67afee725e4bb13
BLAKE2b-256 43a82a828e78cb741982d9a15756fe6e37da3013f2e8b5a63bb9806d0a2faf48

See more details on using hashes here.

File details

Details for the file zen_knit-0.2.5-py3-none-any.whl.

File metadata

  • Download URL: zen_knit-0.2.5-py3-none-any.whl
  • Upload date:
  • Size: 116.1 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: poetry/1.1.12 CPython/3.8.10 Linux/5.13.0-39-generic

File hashes

Hashes for zen_knit-0.2.5-py3-none-any.whl
Algorithm Hash digest
SHA256 83f79eb3a0aeb84b14006901e62460a7e78fed8048dcb500315807ea4490de01
MD5 993e8df11bd79d63f75094ced69283ec
BLAKE2b-256 0a59212d2de05fec812a82a420840db90ee39c643b8638fcec963f6c452403a1

See more details on using hashes here.

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page