Coder Social home page Coder Social logo

superset-pdf-report's Introduction

superset-pdf-report

superset-pdf-report is a Python tool for downloading charts from the Apache Superset API or URLs to generate a PDF report via LaTeX and send it via e-mail.

There are two possiblilities for using this tool:

  • run it by Celery via supersetconfig.py
  • run it via class PDF_report

Installation

Use the package manager pip to install superset-pdf-report.

pip install superset-pdf-report

Configuration of superset-pdf-report

Open config.py in supersetpdfreport and enter the needed information or use the suggested environment variables.

Create your job

Create a <your_job>.json in supersetpdfreport/jobs

Please refer to the example_job.json

Configuration and start via Celery

Insert in superset_config.py

Celery config:

CELERY_IMPORTS += ("supersetpdfreport.task",)
CELERYBEAT_SCHEDULE.update(
    {
        "reports.pdf-scheduler": {
            "task": "reports.pdf-scheduler",
            "schedule": crontab(minute="*"),
        }
    }
)

You have to restart your Apache Superset application for this changes.

Start via PDF_report()

Create a start.py

from supersetpdfreport.pdf_report import PDF_report

job_name = "<your job>.json"

pdf_report_task = PDF_report()
pdf_report_task.execute(job_name)

Start the Python script

python3 start.py

Usage

  1. Download the charts you need for the report
  2. Download the images you need for the report
  3. Create your LaTeX file in /latex and use the images in latex/images
  4. Activate the "generate_pdf" in job
  5. Send it via e-mail or send to nextcloud

superset-pdf-report's People

Contributors

thehassi avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.