http_solver#

Standalone REST-based solver session.

This module provides HttpSolver, a lightweight solver session that communicates with Fluent exclusively over the REST (HTTP) transport. It is completely independent of the gRPC infrastructure (BaseSession, FluentConnection, ServiceFactory, etc.).

Usage:

>>> from ansys.fluent.core.solver.session.http_solver import HttpSolver
>>> from ansys.fluent.core.rest.client import FluentRestClient
>>>
>>> client = FluentRestClient.connect(
...     url="http://127.0.0.1:5000", token="my-token"
... )
>>> solver = HttpSolver(client)
>>> solver.settings.setup.models.energy.enabled()

Classes:

HttpSolver(rest_client[, version])

Standalone solver session backed by the Fluent REST API.

class ansys.fluent.core.solver.session.http_solver.HttpSolver(rest_client, version='271')#

Bases: object

Standalone solver session backed by the Fluent REST API.

Unlike the gRPC-based Solver, this class has no dependency on BaseSession, FluentConnection, or any gRPC service. Settings classes are built at runtime from get_static_info() — no generated settings module is required.

Parameters:
rest_clientFluentRestClient

A connected REST client instance (see FluentRestClient.connect()).

versionstr, optional

Fluent version string (e.g. "271"). Defaults to "271" since the REST API is only available from Fluent 27.1 onward.

Methods:

__init__(rest_client[, version])

exit()

Release the REST connection.

is_active()

Whether the REST connection is still usable.

Attributes:

settings

Root settings object (built at runtime via REST get_static_info()).

__init__(rest_client, version='271')#
exit()#

Release the REST connection.

Only client-side state is dropped; the Fluent server itself keeps running. This mirrors BaseSession.exit() closely enough for fixture/context-manager teardown; moving it into a finalizer (as BaseSession does) is left for the inheritance refactor.

is_active()#

Whether the REST connection is still usable.

property settings#

Root settings object (built at runtime via REST get_static_info()).