The highcharts_gantt.highcharts module is designed to be a catch-all module for ease of importing. It does not actually define any functionality itself, but instead imports classes from across the Highcharts Gantt for Python library to expose them under a single import statement. This enables you to choose between whatever import-style you prefer to apply:


Best Practice!

This method of importing Highcharts Gantt for Python objects yields the fastest performance for the import statement. However, it is more verbose and requires you to navigate the extensive Highcharts Gantt for Python API.

# Import classes using precise module indications. For example:
from highcharts_gantt.chart import Chart
from highcharts_gantt.global_options.shared_options import SharedGanttOptions
from highcharts_gantt.options import HighchartsGanttOptions
from highcharts_gantt.options.plot_options.gantt import GanttOptions
from highcharts_gantt.options.series.gantt import GanttSeries


You should be aware that importing the highcharts_gantt.highcharts module takes a relatively long time. This is because it needs to import hundreds of other classes from across the entire library. Assuming you are just doing it once, this may be acceptable to you. However you should be aware that is much less performant than importing precise classes when and as-needed.