# Report Creator
[](https://www.apache.org/licenses/LICENSE-2.0)
[](https://pypi.org/project/report_creator)
[](https://pypi.org/project/report_creator)
[](https://pypi.org/project/report_creator)
[](https://discord.gg/c4VZp5ze)
[GitHub](https://github.com/darenr/report_creator) |
[PyPI](https://pypi.org/project/report_creator/) |
[Documentation](https://report-creator.readthedocs.io) |
[Issues](https://github.com/darenr/report_creator/issues) |
[Getting Started](https://report-creator.readthedocs.io/en/latest/getting_started.html)
Library to assemble reports in HTML from various components using python. This is not meant to be a replacement for do-it-yourself HTML,
it's a tool to put together professional looking reports from python easily and quickly. The philosophy for layout is that components flow in
either the horizontal (`rc.Group()`) or Vertical (`rc.Block()`) direction.
## ⚡ Features
- [x] Good pandas/dataframe/table support
- [x] Look modern
- [x] Allows markdown as input for text blocks
- [x] Allows html as input
- [x] Components for things like metrics ("Accuracy: 87%") from a key & value
- [x] Support for plotting figures, interactive `plotly` and `matplotlib`
- [x] images (styled by the library) with an option to fetch at report build time (no fetch on render)
- [x] `json`/`yaml`/`python`/`java`/`prolog`/`plaintext` code blocks with color syntax highlighting
## ⚡ Example
```python
import report_creator as rc
with rc.ReportCreator(
title="My Report",
description="My Report Description",
footer="My Report Footer",
) 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
```sh
mamba create -n rc -c conda-forge python=3.13
mamba activate rc
make setup
# recommended for code hygiene
make format
# install as a local package:
python3 -m pip install -e .
# see dependency tree:
pipdeptree --exclude pip,pipdeptree,setuptools,wheel,twine
# build examples:
make examples
# build a *specific* example:
make examples EXAMPLES=examples/myreport.py
# run tests
make tests
# build doc
make doc
# release new version
make release
# show list of make targets
make targets
```
## Get in touch
This project is under active development
- Report bugs via [GitHub Issues](https://github.com/darenr/report_creator/issues).
- Chat with the maintainers on [Discord](https://discord.com/channels/1318814951795593236/1318814951795593239).
## 🎉 Contributors
<a href="https://github.com/darenr/report_creator/graphs/contributors">
<img src="https://contrib.rocks/image?repo=darenr/report_creator" />
</a>
Raw data
{
"_id": null,
"home_page": "https://github.com/darenr/report_creator",
"name": "report-creator",
"maintainer": "Daren Race",
"docs_url": null,
"requires_python": ">=3.9",
"maintainer_email": "daren.race@gmail.com",
"keywords": "python, html, reports, report, creator, generator, markdown, yaml, plot, chart, table, blog",
"author": "Daren Race",
"author_email": "daren.race@gmail.com",
"download_url": "https://files.pythonhosted.org/packages/d4/57/de308999f5458f0e8fe7f6422cf62510d598f01ea07a6c2554613263b8f6/report_creator-1.0.38.tar.gz",
"platform": null,
"description": "# Report Creator\n\n[](https://www.apache.org/licenses/LICENSE-2.0)\n[](https://pypi.org/project/report_creator)\n[](https://pypi.org/project/report_creator)\n[](https://pypi.org/project/report_creator)\n[](https://discord.gg/c4VZp5ze)\n\n[GitHub](https://github.com/darenr/report_creator) |\n[PyPI](https://pypi.org/project/report_creator/) |\n[Documentation](https://report-creator.readthedocs.io) |\n[Issues](https://github.com/darenr/report_creator/issues) |\n[Getting Started](https://report-creator.readthedocs.io/en/latest/getting_started.html)\n\nLibrary to assemble reports in HTML from various components using python. This is not meant to be a replacement for do-it-yourself HTML,\nit's a tool to put together professional looking reports from python easily and quickly. The philosophy for layout is that components flow in\neither the horizontal (`rc.Group()`) or Vertical (`rc.Block()`) direction.\n\n## \u26a1 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] Components for things like metrics (\"Accuracy: 87%\") from a key & value\n- [x] Support for plotting figures, interactive `plotly` and `matplotlib`\n- [x] images (styled by the library) with an option to fetch at report build time (no fetch on render)\n- [x] `json`/`yaml`/`python`/`java`/`prolog`/`plaintext` code blocks with color syntax highlighting\n\n## \u26a1 Example\n\n```python\nimport report_creator as rc\n\nwith rc.ReportCreator(\n title=\"My Report\",\n description=\"My Report Description\",\n footer=\"My Report Footer\",\n) as report:\n view = rc.Block(\n rc.Text(\n \"\"\"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 ),\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(\n 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## \ud83e\udd17 Development\n\n```sh\nmamba create -n rc -c conda-forge python=3.13\nmamba activate rc\nmake setup\n\n# recommended for code hygiene\nmake format\n\n# install as a local package:\npython3 -m pip install -e .\n\n# see dependency tree:\npipdeptree --exclude pip,pipdeptree,setuptools,wheel,twine\n\n# build examples:\nmake examples\n\n# build a *specific* example:\nmake examples EXAMPLES=examples/myreport.py\n\n# run tests\nmake tests\n\n# build doc\nmake doc\n\n# release new version\nmake release\n\n# show list of make targets\nmake targets\n\n```\n\n## Get in touch\n\nThis project is under active development\n\n- Report bugs via [GitHub Issues](https://github.com/darenr/report_creator/issues).\n- Chat with the maintainers on [Discord](https://discord.com/channels/1318814951795593236/1318814951795593239).\n\n## \ud83c\udf89 Contributors\n\n<a href=\"https://github.com/darenr/report_creator/graphs/contributors\">\n <img src=\"https://contrib.rocks/image?repo=darenr/report_creator\" />\n</a>\n",
"bugtrack_url": null,
"license": "MIT",
"summary": "Create self-contained HTML reports from Python.",
"version": "1.0.38",
"project_urls": {
"Homepage": "https://github.com/darenr/report_creator"
},
"split_keywords": [
"python",
" html",
" reports",
" report",
" creator",
" generator",
" markdown",
" yaml",
" plot",
" chart",
" table",
" blog"
],
"urls": [
{
"comment_text": null,
"digests": {
"blake2b_256": "81916054e2b205d6089777212d0fb8346d0a23997d20e00623981a7ce949e970",
"md5": "7060d7f66610601c43f912eb26c1c78d",
"sha256": "ae78cfd415d61efca2d4ae4264fbfee7d265e327db024c564b150c6b76ea7c04"
},
"downloads": -1,
"filename": "report_creator-1.0.38-py3-none-any.whl",
"has_sig": false,
"md5_digest": "7060d7f66610601c43f912eb26c1c78d",
"packagetype": "bdist_wheel",
"python_version": "py3",
"requires_python": ">=3.9",
"size": 31468,
"upload_time": "2025-02-28T22:05:38",
"upload_time_iso_8601": "2025-02-28T22:05:38.057693Z",
"url": "https://files.pythonhosted.org/packages/81/91/6054e2b205d6089777212d0fb8346d0a23997d20e00623981a7ce949e970/report_creator-1.0.38-py3-none-any.whl",
"yanked": false,
"yanked_reason": null
},
{
"comment_text": null,
"digests": {
"blake2b_256": "d457de308999f5458f0e8fe7f6422cf62510d598f01ea07a6c2554613263b8f6",
"md5": "1230298efefd5b0fb8b53612ba0f4657",
"sha256": "eb4a920fd3ef7aa7e312a5fe0aa3ce2fd2d7d5bf5c67eb0a252ed14db24cd4b5"
},
"downloads": -1,
"filename": "report_creator-1.0.38.tar.gz",
"has_sig": false,
"md5_digest": "1230298efefd5b0fb8b53612ba0f4657",
"packagetype": "sdist",
"python_version": "source",
"requires_python": ">=3.9",
"size": 38075,
"upload_time": "2025-02-28T22:05:39",
"upload_time_iso_8601": "2025-02-28T22:05:39.137941Z",
"url": "https://files.pythonhosted.org/packages/d4/57/de308999f5458f0e8fe7f6422cf62510d598f01ea07a6c2554613263b8f6/report_creator-1.0.38.tar.gz",
"yanked": false,
"yanked_reason": null
}
],
"upload_time": "2025-02-28 22:05:39",
"github": true,
"gitlab": false,
"bitbucket": false,
"codeberg": false,
"github_user": "darenr",
"github_project": "report_creator",
"travis_ci": false,
"coveralls": true,
"github_actions": false,
"requirements": [
{
"name": "pandas",
"specs": []
},
{
"name": "pyarrow",
"specs": []
},
{
"name": "numpy",
"specs": []
},
{
"name": "matplotlib",
"specs": []
},
{
"name": "mistune",
"specs": [
[
">=",
"3.0.2"
]
]
},
{
"name": "pyyaml",
"specs": []
},
{
"name": "plotly",
"specs": []
},
{
"name": "plotly-express",
"specs": []
},
{
"name": "Jinja2",
"specs": []
},
{
"name": "humanize",
"specs": []
},
{
"name": "beautifulsoup4",
"specs": []
},
{
"name": "python-dateutil",
"specs": []
},
{
"name": "requests",
"specs": []
},
{
"name": "pillow",
"specs": []
},
{
"name": "md4mathjax",
"specs": []
},
{
"name": "emoji",
"specs": []
},
{
"name": "setuptools",
"specs": []
},
{
"name": "tabulate",
"specs": []
}
],
"lcname": "report-creator"
}