Change Account and Submit

Contents

Change Account and Submit#

This example demonstrates how to utilize the shared account feature within the Flow360 Python API. It covers the process of interactively selecting a shared account, submitting a pre-existing volume mesh to initiate a project under that account, and subsequently reverting to the original account context.

 1import flow360 as fl
 2from flow360.examples import OM6wing
 3
 4fl.Env.dev.active()
 5
 6# choose shared account interactively
 7fl.Accounts.choose_shared_account()
 8
 9# retrieve mesh files
10OM6wing.get_files()
11
12# submit mesh
13project = fl.Project.from_volume_mesh(
14    OM6wing.mesh_filename,
15    name="Account change mesh upload from Python",
16)
17
18# leave the account
19fl.Accounts.leave_shared_account()

Notes#

  • Accounts.leave_shared_account() is used to exit the shared account context and return to the user’s primary account.