# API Reference The gracehpc package provides the following top-level functions for direct use in Python scripts or interactive Jupyter Notebook environments: > *For using GRACE-HPC from the command-line, see [Command-line Interface](cli.md).* --- ## `gracehpc_run(args)`
Function: gracehpc_run(StartDate, EndDate, JobIDs, Region, Scope3, CSV)
Location: gracehpc.script.gracehpc_run
Usage: In Python scripts (.py) or Jupyter Notebooks (.ipynb)
Returns: full_df, daily_df, total_df [pandas DataFames]. Outputs are also displayed in the terminal via rich console.
Runs the GRACE-HPC core engine calculating energy and emissions data using a set of arguments provided by the user. --- ## `jupyter_UI()`
Function: jupyter_UI()
Location: gracehpc.jupyter.jupyter_UI
Usage: In Jupyter Notebooks (.ipynb) only
Returns: results [dict of 3 DataFrames]. Displays a full interactive interface, enabling users to input parameters through widgets and visualise plots immediately.
Launches an interactive dashboard-style interface inside a Jupyter Notebook for running GRACE-HPC with widgets, allowing users to repeatedly input parameters and visualise results without coding. ---