4. Python API ๐#
The Flow360 Python API provides a powerful, user-friendly interface to configure, run, and analyze Computational Fluid Dynamics (CFD) simulations. Built with modern Python practices, the API leverages Pydantic models for robust configuration and validation, making it both flexible and reliable.
New to Flow360? Start here to learn the basics and set up your environment.
Run your first CFD simulations with step-by-step guides.
Explore complex setups, multiphysics coupling, and optimization workflows.
Extract insights from your simulation results with powerful analysis tools.
Efficiently organize and manage multiple simulation campaigns.
Comprehensive documentation of classes, methods, and parameters.
4.1. Installation and Setup#
Getting Started#
Before using Flow360, you need to:
Sign up for a user account at flow360.simulation.cloud
Obtain your API key from your account profile
Install the Python package and configure your API key
Package Installation#
Install the latest stable version:
pip install -U flow360
To install a specific version of Python API, for example 24.11:
pip install "flow360==24.11.*"
For pre-release versions:
pip install -U flow360 --pre
To install a specific Github branch of Python API, for example develop branch:
pip install git+https://github.com/flexcompute/Flow360.git@develop
API Key Configuration#
Most of the functionalities (like uploading mesh and submitting case) of Flow360 Python API requires setting up proper API key for authentication. The API key can be obtained from the Flow360 WebUI by clicking on your avatar on the top right of your workspace then clicking on your Account then Python Authentication. Please contact customer support for more information.

Fig. 4.1.1 Accessing your API key.#
To setup the API key authentication, you can use one of the following methods: Method 1: Global Configuration (Recommended)
In the command line. Run the following command.
flow360 configure --apikey XXX
If you want to configure the API key on Windows, you can run the following command in the command prompt.
flow360 configure --apikey XXX
This will prompt you to enter your API key and store it in ~/.flow360
Method 2: Configure in Python
import flow360 as fl fl.configure(apikey='XXX')
Method 3: Environment Variable in Shell
In the command line. Run the following command.
export FLOW360_APIKEY="XXX"
In the PowerShell. Run the following command.
$Env:FLOW360_APIKEY="XXX"
Method 4: Environment Variable in Python
import os
os.environ["FLOW360_APIKEY"] = "XXX"
import flow360
Note
The FLOW360_APIKEY
environment variable takes precedence over the configuration file.
Testing Your Installation#
To verify your installation is working correctly:
import flow360
print(flow360.__version__) # Check installed version