pdf-reports


Namepdf-reports JSON
Version 0.3.7 PyPI version JSON
download
home_pagehttps://github.com/Edinburgh-Genome-Foundry/pdf_reports
SummaryCreate nice-looking PDF reports from HTML content.
upload_time2024-04-18 13:48:53
maintainerNone
docs_urlNone
authorZulko
requires_pythonNone
licenseMIT
keywords pdf report web jinja weasyprint
VCS
bugtrack_url
requirements No requirements were recorded.
Travis-CI No Travis.
coveralls test coverage No coveralls.
            PDF Reports
===========

*PDF Reports* (complete documentation `here <https://edinburgh-genome-foundry.github.io/pdf_reports/>`_) is a Python library to create nice-looking PDF reports from HTML or `Pug <https://pugjs.org>`_ templates. It features modern-looking components (via the `Semantic UI <https://semantic-ui.com/>`_ framework) and provides routines to embed tables or plots in the documents.


Example of use
--------------

Your Pug template file ``template.pug`` may look like this (see a `full example <https://github.com/Edinburgh-Genome-Foundry/pdf_reports/blob/master/examples/example_template.pug>`_):

.. code:: pug

    #sidebar I am the text in the sidebar.

    h1 {{ title }}

    .ui.piled.segment
      p Oh hi there ! I am some text in a cool box.

Your Python code will be as follows:

.. code:: python

    from pdf_reports import pug_to_html, write_report
    html = pug_to_html("template.pug", title="My report")
    write_report(html, "example.pdf")


And your final result may look like this (`PDF file <https://github.com/Edinburgh-Genome-Foundry/pdf_reports/raw/master/examples/example.pdf>`_):

.. image:: https://github.com/Edinburgh-Genome-Foundry/pdf_reports/raw/master/screenshot.png

Infos
-----

**PIP installation:**

.. code:: bash

  pip install pdf_reports

**Web documentation:**

`<https://edinburgh-genome-foundry.github.io/pdf_reports/>`_

**Github Page:**

`<https://github.com/Edinburgh-Genome-Foundry/pdf_reports>`_

**Live demo:**

`<http://cuba.genomefoundry.org/sculpt_a_sequence>`_

**License:** MIT, Copyright Edinburgh Genome Foundry

            

Raw data

            {
    "_id": null,
    "home_page": "https://github.com/Edinburgh-Genome-Foundry/pdf_reports",
    "name": "pdf-reports",
    "maintainer": null,
    "docs_url": null,
    "requires_python": null,
    "maintainer_email": null,
    "keywords": "PDF report web jinja weasyprint",
    "author": "Zulko",
    "author_email": null,
    "download_url": "https://files.pythonhosted.org/packages/96/41/9d28780734530ec01d92c59d2dd62c809d82da1cc096461828f2e035343c/pdf_reports-0.3.7.tar.gz",
    "platform": null,
    "description": "PDF Reports\n===========\n\n*PDF Reports* (complete documentation `here <https://edinburgh-genome-foundry.github.io/pdf_reports/>`_) is a Python library to create nice-looking PDF reports from HTML or `Pug <https://pugjs.org>`_ templates. It features modern-looking components (via the `Semantic UI <https://semantic-ui.com/>`_ framework) and provides routines to embed tables or plots in the documents.\n\n\nExample of use\n--------------\n\nYour Pug template file ``template.pug`` may look like this (see a `full example <https://github.com/Edinburgh-Genome-Foundry/pdf_reports/blob/master/examples/example_template.pug>`_):\n\n.. code:: pug\n\n    #sidebar I am the text in the sidebar.\n\n    h1 {{ title }}\n\n    .ui.piled.segment\n      p Oh hi there ! I am some text in a cool box.\n\nYour Python code will be as follows:\n\n.. code:: python\n\n    from pdf_reports import pug_to_html, write_report\n    html = pug_to_html(\"template.pug\", title=\"My report\")\n    write_report(html, \"example.pdf\")\n\n\nAnd your final result may look like this (`PDF file <https://github.com/Edinburgh-Genome-Foundry/pdf_reports/raw/master/examples/example.pdf>`_):\n\n.. image:: https://github.com/Edinburgh-Genome-Foundry/pdf_reports/raw/master/screenshot.png\n\nInfos\n-----\n\n**PIP installation:**\n\n.. code:: bash\n\n  pip install pdf_reports\n\n**Web documentation:**\n\n`<https://edinburgh-genome-foundry.github.io/pdf_reports/>`_\n\n**Github Page:**\n\n`<https://github.com/Edinburgh-Genome-Foundry/pdf_reports>`_\n\n**Live demo:**\n\n`<http://cuba.genomefoundry.org/sculpt_a_sequence>`_\n\n**License:** MIT, Copyright Edinburgh Genome Foundry\n",
    "bugtrack_url": null,
    "license": "MIT",
    "summary": "Create nice-looking PDF reports from HTML content.",
    "version": "0.3.7",
    "project_urls": {
        "Homepage": "https://github.com/Edinburgh-Genome-Foundry/pdf_reports"
    },
    "split_keywords": [
        "pdf",
        "report",
        "web",
        "jinja",
        "weasyprint"
    ],
    "urls": [
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "fc056ecf0664e775229a4f0f05fc53d5fdd50382dd119dc534c65292a7e9382f",
                "md5": "e6dba5852acc995416167d760737fe97",
                "sha256": "e2ee5480e85f59d0184921e6abec27bdfff3404f1463e5f4f66fc50484415620"
            },
            "downloads": -1,
            "filename": "pdf_reports-0.3.7-py3-none-any.whl",
            "has_sig": false,
            "md5_digest": "e6dba5852acc995416167d760737fe97",
            "packagetype": "bdist_wheel",
            "python_version": "py3",
            "requires_python": null,
            "size": 118384,
            "upload_time": "2024-04-18T13:48:51",
            "upload_time_iso_8601": "2024-04-18T13:48:51.903619Z",
            "url": "https://files.pythonhosted.org/packages/fc/05/6ecf0664e775229a4f0f05fc53d5fdd50382dd119dc534c65292a7e9382f/pdf_reports-0.3.7-py3-none-any.whl",
            "yanked": false,
            "yanked_reason": null
        },
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "96419d28780734530ec01d92c59d2dd62c809d82da1cc096461828f2e035343c",
                "md5": "6697ea8edb534690a8eff54babefd050",
                "sha256": "ae2fd77e2ef5004166700d3cc36d5dbe0ba2eb4e88965413b655c9d5f76c8e6c"
            },
            "downloads": -1,
            "filename": "pdf_reports-0.3.7.tar.gz",
            "has_sig": false,
            "md5_digest": "6697ea8edb534690a8eff54babefd050",
            "packagetype": "sdist",
            "python_version": "source",
            "requires_python": null,
            "size": 124485,
            "upload_time": "2024-04-18T13:48:53",
            "upload_time_iso_8601": "2024-04-18T13:48:53.996750Z",
            "url": "https://files.pythonhosted.org/packages/96/41/9d28780734530ec01d92c59d2dd62c809d82da1cc096461828f2e035343c/pdf_reports-0.3.7.tar.gz",
            "yanked": false,
            "yanked_reason": null
        }
    ],
    "upload_time": "2024-04-18 13:48:53",
    "github": true,
    "gitlab": false,
    "bitbucket": false,
    "codeberg": false,
    "github_user": "Edinburgh-Genome-Foundry",
    "github_project": "pdf_reports",
    "travis_ci": false,
    "coveralls": false,
    "github_actions": true,
    "lcname": "pdf-reports"
}
        
Elapsed time: 2.54505s