report-creator


Namereport-creator JSON
Version 1.0.17 PyPI version JSON
download
home_pagehttps://github.com/darenr/report_creator
SummaryProduce self-contained HTML reports from Python, no HTML required.
upload_time2024-05-08 21:34:35
maintainerNone
docs_urlNone
authorDaren Race
requires_pythonNone
licenseMIT
keywords python html reports report creator generator markdown yaml plot chart table
VCS
bugtrack_url
requirements pip pandas pyarrow numpy matplotlib mistune pyyaml plotly-express Jinja2 humanize beautifulsoup4 python-dateutil lxml
Travis-CI No Travis.
coveralls test coverage No coveralls.
            # Report Creator

[![License](https://img.shields.io/badge/license-MIT-blue.svg?style=for-the-badge)](https://www.apache.org/licenses/LICENSE-2.0)
[![PyPI Version](https://img.shields.io/pypi/v/report_creator.svg?style=for-the-badge&color=blue)](https://pypi.org/project/report_creator)
[![Python Versions](https://img.shields.io/pypi/pyversions/report_creator.svg?logo=python&logoColor=white&style=for-the-badge)](https://pypi.org/project/report_creator)
[![Python Stats](https://img.shields.io/pypi/dw/report_creator?style=for-the-badge)](https://pypi.org/project/report_creator)
[![Repo Size](https://img.shields.io/github/repo-size/darenr/report_creator?style=for-the-badge)](https://pypi.org/project/report_creator)

Library to assemble reports in HTML from various components using python

## Features

* [x] Good pandas/dataframe/table support
* [x] Look modern
* [x] Allows markdown as input for text blocks
* [x] Allows html as input
* [x] A few simple components for things like metrics ("Accuracy: 87%") from a triple of key, value
* [x] Support for plotting figures, interactive `plotly` and `matplotlib`
* [x] images (styled by the library)
* [x] `json`/`yaml`/`python` code blocks with color syntax highlighting
* [x] Support tabs
* [x] Add support for any Jupyter widget, any object that renders in a notebook should render to a report
* [x] Add built-in easy plotting that looks stylistically consistent with the report
* [x] Add option to change the report icon based on a github account avatar
* [x] Add a metric type for timeseries data which should some aggregate function of the data, and plot over time.
* [ ] Add Calendar
* [ ] Add build time spell check
* [ ] Add Radar chart
* [ ] Add choropleth map plot type
* [ ] Add bookmark anchors to blocks
* [ ] Add a Table of Contents option based on labels of top-level-blocks
* [ ] Add styled section for Executive Summary
* [ ] Youtube embeds rc.Video(url: str, label: str)
* [ ] File attachments (downloadable from page)
* [ ] Write some documentation!

## Example

```python3

import report_creator as rc

with rc.ReportCreator("My Report") as report:

    view = rc.Block(
        rc.Text("""It was the best of times, it was the worst of times, it was the age of wisdom, it was the age of foolishness, it was the epoch of belief, it was the epoch of incredulity, it was the season of light, it was the season of darkness, it was the spring of hope, it was the winter of despair.""", 
        label="Charles Dickens, A Tale of Two Cities"),
        rc.Group(
            rc.Metric(
                heading="Answer to Life, The Universe, and Everything",
                value="42",
            ),
            rc.Metric(
                heading="Author",
                value="Douglas Adams",
            ),   
        ),
        rc.Bar(px.data.medals_long(),
               x="nation",
               y="count",
               dimension="medal",
               label="Bar Chart - Olympic Medals",
        ),
        rc.Scatter(
            px.data.iris(),
            x="sepal_width",
            y="sepal_length",
            dimension="species",
            marginal="histogram",
            label="Scatter Plot - Iris",
        ),
    )

    report.save(view, "report.html") 
```

## Development

``` .python
conda create --name rc python=3.12
conda activate rc
pip install -r requirements.txt -U

# recommended installs for code hygiene
pip install ruff

# build "kitchen_sink" example
make

# install local package
pip install -e .

# see dependency tree
pipdeptree --exclude pip,pipdeptree,setuptools,wheel,twine

```

## Dev Notes

* **4/18/24 - no breaking changes**, all changes should go through standard deprecation policies
* The Blocks/Groups use css [flex](https://css-tricks.com/snippets/css/a-guide-to-flexbox/).
  * Blocks flow vertically (columns)
* Groups flow horizontal (row).
* To render math you'll need to `pip install md4mathjax`

            

Raw data

            {
    "_id": null,
    "home_page": "https://github.com/darenr/report_creator",
    "name": "report-creator",
    "maintainer": null,
    "docs_url": null,
    "requires_python": null,
    "maintainer_email": null,
    "keywords": "python, html, reports, report, creator, generator, markdown, yaml, plot, chart, table",
    "author": "Daren Race",
    "author_email": "daren.race@gmail.com",
    "download_url": "https://files.pythonhosted.org/packages/07/62/06643180ed39d2cbb864684e8fa55adcdcb6a035e4d4b721b4ecd8b132f3/report_creator-1.0.17.tar.gz",
    "platform": null,
    "description": "# Report Creator\n\n[![License](https://img.shields.io/badge/license-MIT-blue.svg?style=for-the-badge)](https://www.apache.org/licenses/LICENSE-2.0)\n[![PyPI Version](https://img.shields.io/pypi/v/report_creator.svg?style=for-the-badge&color=blue)](https://pypi.org/project/report_creator)\n[![Python Versions](https://img.shields.io/pypi/pyversions/report_creator.svg?logo=python&logoColor=white&style=for-the-badge)](https://pypi.org/project/report_creator)\n[![Python Stats](https://img.shields.io/pypi/dw/report_creator?style=for-the-badge)](https://pypi.org/project/report_creator)\n[![Repo Size](https://img.shields.io/github/repo-size/darenr/report_creator?style=for-the-badge)](https://pypi.org/project/report_creator)\n\nLibrary to assemble reports in HTML from various components using python\n\n## Features\n\n* [x] Good pandas/dataframe/table support\n* [x] Look modern\n* [x] Allows markdown as input for text blocks\n* [x] Allows html as input\n* [x] A few simple components for things like metrics (\"Accuracy: 87%\") from a triple of key, value\n* [x] Support for plotting figures, interactive `plotly` and `matplotlib`\n* [x] images (styled by the library)\n* [x] `json`/`yaml`/`python` code blocks with color syntax highlighting\n* [x] Support tabs\n* [x] Add support for any Jupyter widget, any object that renders in a notebook should render to a report\n* [x] Add built-in easy plotting that looks stylistically consistent with the report\n* [x] Add option to change the report icon based on a github account avatar\n* [x] Add a metric type for timeseries data which should some aggregate function of the data, and plot over time.\n* [ ] Add Calendar\n* [ ] Add build time spell check\n* [ ] Add Radar chart\n* [ ] Add choropleth map plot type\n* [ ] Add bookmark anchors to blocks\n* [ ] Add a Table of Contents option based on labels of top-level-blocks\n* [ ] Add styled section for Executive Summary\n* [ ] Youtube embeds rc.Video(url: str, label: str)\n* [ ] File attachments (downloadable from page)\n* [ ] Write some documentation!\n\n## Example\n\n```python3\n\nimport report_creator as rc\n\nwith rc.ReportCreator(\"My Report\") as report:\n\n    view = rc.Block(\n        rc.Text(\"\"\"It was the best of times, it was the worst of times, it was the age of wisdom, it was the age of foolishness, it was the epoch of belief, it was the epoch of incredulity, it was the season of light, it was the season of darkness, it was the spring of hope, it was the winter of despair.\"\"\", \n        label=\"Charles Dickens, A Tale of Two Cities\"),\n        rc.Group(\n            rc.Metric(\n                heading=\"Answer to Life, The Universe, and Everything\",\n                value=\"42\",\n            ),\n            rc.Metric(\n                heading=\"Author\",\n                value=\"Douglas Adams\",\n            ),   \n        ),\n        rc.Bar(px.data.medals_long(),\n               x=\"nation\",\n               y=\"count\",\n               dimension=\"medal\",\n               label=\"Bar Chart - Olympic Medals\",\n        ),\n        rc.Scatter(\n            px.data.iris(),\n            x=\"sepal_width\",\n            y=\"sepal_length\",\n            dimension=\"species\",\n            marginal=\"histogram\",\n            label=\"Scatter Plot - Iris\",\n        ),\n    )\n\n    report.save(view, \"report.html\") \n```\n\n## Development\n\n``` .python\nconda create --name rc python=3.12\nconda activate rc\npip install -r requirements.txt -U\n\n# recommended installs for code hygiene\npip install ruff\n\n# build \"kitchen_sink\" example\nmake\n\n# install local package\npip install -e .\n\n# see dependency tree\npipdeptree --exclude pip,pipdeptree,setuptools,wheel,twine\n\n```\n\n## Dev Notes\n\n* **4/18/24 - no breaking changes**, all changes should go through standard deprecation policies\n* The Blocks/Groups use css [flex](https://css-tricks.com/snippets/css/a-guide-to-flexbox/).\n  * Blocks flow vertically (columns)\n* Groups flow horizontal (row).\n* To render math you'll need to `pip install md4mathjax`\n",
    "bugtrack_url": null,
    "license": "MIT",
    "summary": "Produce self-contained HTML reports from Python, no HTML required.",
    "version": "1.0.17",
    "project_urls": {
        "Homepage": "https://github.com/darenr/report_creator"
    },
    "split_keywords": [
        "python",
        " html",
        " reports",
        " report",
        " creator",
        " generator",
        " markdown",
        " yaml",
        " plot",
        " chart",
        " table"
    ],
    "urls": [
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "febc092a5d4b764421e691de382eb0a7e346ea8d8f9ceeb2bdf0ec8b6610ef15",
                "md5": "63b0b58e7aec8ab05c0cb07ea0eb95ac",
                "sha256": "7ac3081f5830203422268483f0d5628e7d467f6a14a4b111f9f78847ded1315d"
            },
            "downloads": -1,
            "filename": "report_creator-1.0.17-py3-none-any.whl",
            "has_sig": false,
            "md5_digest": "63b0b58e7aec8ab05c0cb07ea0eb95ac",
            "packagetype": "bdist_wheel",
            "python_version": "py3",
            "requires_python": null,
            "size": 18858,
            "upload_time": "2024-05-08T21:34:33",
            "upload_time_iso_8601": "2024-05-08T21:34:33.995367Z",
            "url": "https://files.pythonhosted.org/packages/fe/bc/092a5d4b764421e691de382eb0a7e346ea8d8f9ceeb2bdf0ec8b6610ef15/report_creator-1.0.17-py3-none-any.whl",
            "yanked": false,
            "yanked_reason": null
        },
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "076206643180ed39d2cbb864684e8fa55adcdcb6a035e4d4b721b4ecd8b132f3",
                "md5": "1cfb613cb77db4912aeb518f10a13334",
                "sha256": "a2c75202ef4f0f8a8b55456e116a951c8d099139395eb77e011d6dce2146f20b"
            },
            "downloads": -1,
            "filename": "report_creator-1.0.17.tar.gz",
            "has_sig": false,
            "md5_digest": "1cfb613cb77db4912aeb518f10a13334",
            "packagetype": "sdist",
            "python_version": "source",
            "requires_python": null,
            "size": 20957,
            "upload_time": "2024-05-08T21:34:35",
            "upload_time_iso_8601": "2024-05-08T21:34:35.340829Z",
            "url": "https://files.pythonhosted.org/packages/07/62/06643180ed39d2cbb864684e8fa55adcdcb6a035e4d4b721b4ecd8b132f3/report_creator-1.0.17.tar.gz",
            "yanked": false,
            "yanked_reason": null
        }
    ],
    "upload_time": "2024-05-08 21:34:35",
    "github": true,
    "gitlab": false,
    "bitbucket": false,
    "codeberg": false,
    "github_user": "darenr",
    "github_project": "report_creator",
    "travis_ci": false,
    "coveralls": false,
    "github_actions": false,
    "requirements": [
        {
            "name": "pip",
            "specs": []
        },
        {
            "name": "pandas",
            "specs": []
        },
        {
            "name": "pyarrow",
            "specs": []
        },
        {
            "name": "numpy",
            "specs": []
        },
        {
            "name": "matplotlib",
            "specs": []
        },
        {
            "name": "mistune",
            "specs": []
        },
        {
            "name": "pyyaml",
            "specs": []
        },
        {
            "name": "plotly-express",
            "specs": []
        },
        {
            "name": "Jinja2",
            "specs": []
        },
        {
            "name": "humanize",
            "specs": []
        },
        {
            "name": "beautifulsoup4",
            "specs": []
        },
        {
            "name": "python-dateutil",
            "specs": []
        },
        {
            "name": "lxml",
            "specs": []
        }
    ],
    "lcname": "report-creator"
}
        
Elapsed time: 0.26351s