https://github.com/fusioncharts/fusionexport-python-client
Language SDK for FusionExport which enables exporting of charts & dashboards through Python.
https://github.com/fusioncharts/fusionexport-python-client
fusionexport
Last synced: 3 months ago
JSON representation
Language SDK for FusionExport which enables exporting of charts & dashboards through Python.
- Host: GitHub
- URL: https://github.com/fusioncharts/fusionexport-python-client
- Owner: fusioncharts
- License: mit
- Created: 2017-12-01T10:42:07.000Z (over 7 years ago)
- Default Branch: master
- Last Pushed: 2021-07-20T09:28:18.000Z (almost 4 years ago)
- Last Synced: 2025-03-17T11:50:38.499Z (3 months ago)
- Topics: fusionexport
- Language: JavaScript
- Size: 2.25 MB
- Stars: 3
- Watchers: 11
- Forks: 0
- Open Issues: 1
-
Metadata Files:
- Readme: README.rst
- License: LICENSE
Awesome Lists containing this project
README
FusionExport Python Client
==========================Language SDK for FusionExport which enables exporting of charts and dashboards through Python.
Installation
------------To install this Python package, use pip:
.. code-block:: shell
pip install fusionexport
Usage
-----To use the SDK in your project:
.. code-block:: python
from fusionexport import ExportManager, ExportConfig
Getting Started
---------------Start with a simple chart export. For exporting a single chart just pass the chart configuration as you would have passed it to the FusionCharts constructor.
.. code-block:: python
from fusionexport import ExportManager, ExportConfig # Import sdk
# Instantiate the ExportConfig class and add the required configurations
export_config = ExportConfig()
export_config["chartConfig"] = [{
"type": "column2d",
"renderAt": "chart-container",
"width": "600",
"height": "400",
"dataFormat": "json",
"dataSource": {
"chart": {
"caption": "Number of visitors last week",
"subCaption": "Bakersfield Central vs Los Angeles Topanga"
},
"data": [{
"label": "Mon",
"value": "15123"
},{
"label": "Tue",
"value": "14233"
},{
"label": "Wed",
"value": "25507"
}
]
}
}]# Instantiate the ExportManager class
em = ExportManager()# Call the export() method with the export config and the output location
exported_files = em.export(export_config, "./exported-charts", True)# print list of exported files
print(exported_files)Now run this file, then the exported chart files will be saved in ``./exported-charts`` folder.
API Reference
-------------
You can find the full reference `here `_