{"id":22737046,"url":"https://github.com/zen-reportz/zen_knit","last_synced_at":"2025-04-14T04:31:29.921Z","repository":{"id":44543701,"uuid":"440213919","full_name":"Zen-Reportz/zen_knit","owner":"Zen-Reportz","description":"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","archived":false,"fork":false,"pushed_at":"2022-04-30T17:22:23.000Z","size":11279,"stargazers_count":37,"open_issues_count":6,"forks_count":2,"subscribers_count":3,"default_branch":"main","last_synced_at":"2025-04-14T03:03:47.044Z","etag":null,"topics":["business-analytics","html-report","markdown-report","pdf-reports","programmable-report","python","reporting-tool","reports"],"latest_commit_sha":null,"homepage":"","language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/Zen-Reportz.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2021-12-20T15:14:46.000Z","updated_at":"2024-08-21T16:22:33.000Z","dependencies_parsed_at":"2022-09-18T19:01:14.845Z","dependency_job_id":null,"html_url":"https://github.com/Zen-Reportz/zen_knit","commit_stats":null,"previous_names":[],"tags_count":7,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Zen-Reportz%2Fzen_knit","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Zen-Reportz%2Fzen_knit/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Zen-Reportz%2Fzen_knit/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Zen-Reportz%2Fzen_knit/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/Zen-Reportz","download_url":"https://codeload.github.com/Zen-Reportz/zen_knit/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":248821712,"owners_count":21166940,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["business-analytics","html-report","markdown-report","pdf-reports","programmable-report","python","reporting-tool","reports"],"created_at":"2024-12-10T22:09:21.799Z","updated_at":"2025-04-14T04:31:29.904Z","avatar_url":"https://github.com/Zen-Reportz.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"# About Zen-Knit:\nZen-Knit is a formal (PDF), informal (HTML) report generator for data analyst and data scientist who wants to use python. RMarkdown alternative.\nZen-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 \n\n\n[![Download Count](https://static.pepy.tech/personalized-badge/zen-knit?period=total\u0026units=international_system\u0026left_color=grey\u0026right_color=green\u0026left_text=Downloads)](https://pepy.tech/project/zen-knit)\n[![python](https://img.shields.io/pypi/pyversions/zen-knit.svg?color=green)](https://img.shields.io/pypi/pyversions/zen-knit.svg?color=green)\n[![license](https://img.shields.io/github/license/Zen-Reportz/zen_knit?color=green)](https://img.shields.io/github/license/Zen-Reportz/zen_knit?color=green)\n[![version](https://img.shields.io/pypi/v/zen-knit?color=green\u0026label=pypi%20package)](https://img.shields.io/pypi/v/zen-knit?color=green\u0026label=pypi%20package)\n\n\n# VS Code Plugin:\nDownload VS Plugin from [MarketPlace](https://marketplace.visualstudio.com/items?itemName=ZenReportz.vscode-zen-knit)\n\n\n# Features:\n* .py and .pyz file support\n* Python 3.7+ compatibility\n* Support for IPython magics and rich output.\n* **Execute python code** in the chunks and **capture** input and output to a report.\n* **Use hidden code chunks,** i.e. code is executed, but not printed in the output file.\n* Capture matplotlib graphics.\n* Evaluate inline code in documentation chunks marked using ```{ }```\n* Publish reports from Python scripts. Similar to R markdown.\n* Interactive Plots using plotly\n* integrate it in your process. It will fit your need rather than you need to adjust for tool.\n* custom CSS support (HTTP(s) and local file)\n* direct sql support \n* chaching executed code for faster report devlopement \n* printing index of chunk or chunk name in console\n  \n# Examples:\nAll example are available [HERE](https://github.com/Zen-Reportz/zen_knit/tree/main/doc/example)\n\n\n## PDF example\n### py example\n![Py PDF Code](./doc/example/screenshots/pdf_code_py.png)\n### pyz example\n![Pyz PDF Code](./doc/example/screenshots/pdf_code_pyz.png)\n### Output\n![PDF Output](./doc/example/screenshots/pdf_code_output.png)\n\n## PDF example with SQL\n### py example\n![Py PDF SQL Code](./doc/example/screenshots/pdf_sql_code_py.png) \n### pyz example\n![Pyz PDF SQL Code](./doc/example/screenshots/pdf_sql_code_pyz.png) \n### Output\n![PDF SQL Output](./doc/example/screenshots/pdf_sql_code_output.png) \n\n## HTML example\n### py example\n![Py HTML Code](./doc/example/screenshots/html_code_py.png) \n### pyz example\n![Pyz HTML Code](./doc/example/screenshots/html_code_pyz.png) \n### Output\n![HTML Ouput ](./doc/example/screenshots/html_code_output.png)\n![HTML output 2](./doc/example/screenshots/html_code_output_2.png)\n\n## HTML example with custom CSS\n### py example\n#### https example\n![HTML CDN CSS](./doc/example/screenshots/html_cdn_css_code_py.png) \n#### local css example\n![HTML Custom CSS](./doc/example/screenshots/html_custom_css_code_py.png)\n### pyz example\n#### https example\n\n![HTML CDN CSS](./doc/example/screenshots/html_cdn_css_code_pyz.png) \n#### local css example\n![HTML Custom CSS](./doc/example/screenshots/html_custom_css_code_pyz.png)\n\n## HTML example with SQL\n### py example\n![HTML SQL](./doc/example/screenshots/html_sql_code_py.png) \n\n### pyz example\n![HTML SQL](./doc/example/screenshots/html_sql_code_pyz.png) \n\n### Output\n![HTML SQL output](./doc/example/screenshots/html_sql_code_output.png) \n\n\n\n# Install\n\nFrom PyPi:\n\n  \u003ccode\u003e pip install --upgrade zen-knit \u003c/code\u003e\n\nor download the source and run::\n\n  \u003ccode\u003e python setup.py install \u003c/code\u003e\n\n\n## Other Dependency\n\n\u003ccode\u003e install pandoc from : https://github.com/jgm/pandoc/releases \u003c/code\u003e\n\n\u003ccode\u003e install texlive for debian: sudo apt install texlive-full \u003c/code\u003e\n\n\u003ccode\u003e install texlive for window: https://www.tug.org/texlive/acquire-netinstall.html \u003c/code\u003e\n\n\u003ccode\u003e install texlive for mac: https://tug.org/texlive/quickinstall.html \u003c/code\u003e\n\n\n## License information\n\n\nPermission is hereby granted, free of charge, to any person obtaining\na copy of this software and associated documentation files (the\n\"Software\"), to deal in the Software without restriction, including\nwithout limitation the rights to use, copy, modify, merge, publish,\ndistribute, sublicense, and/or sell copies of the Software, and to\npermit persons to whom the Software is furnished to do so, subject to\nthe following conditions:\n\nThe above copyright notice and this permission notice shall be\nincluded in all copies or substantial portions of the Software.\n\nTHE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND,\nEXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF\nMERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND\nNONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE\nLIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION\nOF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION\nWITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.\n\n\n## How to Use it\n\n  \u003ccode\u003e pip install zen-knit  \u003c/code\u003e\n\n  \u003ccode\u003e knit -f doc/example/html_example.pyz  -ofd doc/example/output/  \u003c/code\u003e\n  \n  \u003ccode\u003e knit -f doc/example/pdf_example.pyz  -ofd doc/example/output/  \u003c/code\u003e\n\n  \u003ccode\u003e  python doc/example/demo.py  \u003c/code\u003e\n  \n\n## Arguments \n    ---\n    title: Zen Markdown Demo\n    author: Dr. P. B. Patel\n    date: CURRENT_DATE\n    output: \n        cache: true\n        format: html\n        html: \n            css: skleton\n    ---\n\nAbove code will map on GlobalOption class in in following\n\n    class Input(BaseModel):\n        dir: Optional[str]\n        file_name: Optional[str]\n        matplot: bool = True\n    \n    class latexOuput(BaseModel):\n        header: Optional[str] \n        page_size: Optional[str] = 'a4paper'\n        geometry_parameter: Optional[str] = \"text={16.5cm,25.2cm},centering\"  #Newely added parameters\n\n    class htmlOutput(BaseModel):\n        css: str = \"bootstrap\"\n\n    class Output(BaseModel):\n        fig_dir: str = \"figures\"\n        format: Optional[str]\n        file_name: Optional[str]\n        dir: Optional[str]\n        latex: Optional[latexOuput]\n        html: Optional[htmlOutput]\n\n    class GlobalOption(BaseModel):\n        title: str\n        author: Optional[str]\n        date: Optional[str]\n        kernal: str = \"python3\"\n        log_level: str = \"debug\"\n        cache: Optional[bool] = False\n        output: Output\n        input: Input\n\n        @validator('log_level')\n        def fix_option_for_log(cls, v:str):\n            if v.lower() not in ('notset', \"debug\", 'info', 'warning', 'error', 'critical'):\n                raise ValueError('must contain a space')\n            return v.title()\n\n\n# Zen Publish:\nAbility to publish programmable, formal, informal reports to Private or Public instance of zen reportz.\nLearn more at [Here](https://zenreportz.com?utm=github)\n\nLearn more about how to publish to private or public instance of Zen Reportz [Here](https://zenreportz.com/how-to-publish-to-zen-reportz?utm=github)\n\n# analytics-reports.zenreportz.com features\n* Static Reports like HTML, PDF\n* Any one access reports \n* Free to use \n* Unlimite Publish\n* Republish report same place again\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fzen-reportz%2Fzen_knit","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fzen-reportz%2Fzen_knit","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fzen-reportz%2Fzen_knit/lists"}