For generating a pdf-report with apache-superset charts
Project description
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
- Download the charts you need for the report
- Download the images you need for the report
- Create your LaTeX file in /latex and use the images in latex/images
- Activate the "generate_pdf" in job
- Send it via e-mail or send to nextcloud
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file superset-pdf-report-0.6.8.3.tar.gz.
File metadata
- Download URL: superset-pdf-report-0.6.8.3.tar.gz
- Upload date:
- Size: 8.0 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/3.7.1 importlib_metadata/4.8.2 pkginfo/1.8.2 requests/2.22.0 requests-toolbelt/0.9.1 tqdm/4.62.3 CPython/3.8.10
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
10007f5d43809fc4eb0a802d1ea912fb28e98898e5b65ffc19d07dd4a40b6ce6
|
|
| MD5 |
cf50cec12eb8edcfdd2c5706bb3470c7
|
|
| BLAKE2b-256 |
b5b8380bbb9c8969d2fceb37a2ef3b4fe913a70a3fd9fdc325c6f2a5e273555e
|
File details
Details for the file superset_pdf_report-0.6.8.3-py3-none-any.whl.
File metadata
- Download URL: superset_pdf_report-0.6.8.3-py3-none-any.whl
- Upload date:
- Size: 11.3 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/3.7.1 importlib_metadata/4.8.2 pkginfo/1.8.2 requests/2.22.0 requests-toolbelt/0.9.1 tqdm/4.62.3 CPython/3.8.10
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
e206435ae86d064ead0127938c619f4630387e04a5e675a0c70c2f5ed8d54387
|
|
| MD5 |
073ec46cf3b00fec6cc40d55f81c545d
|
|
| BLAKE2b-256 |
4770a33fada848a855d8a8ca73819fdddd2e26bd5d6ca0fd4602f2bb0282b564
|