Skip to content

ClientSync

relationalai.client.client_sync
ClientSync(core: ClientCore)

Synchronous root client.

Use this client from synchronous applications/scripts:

  • construct via relationalai.client.connect_sync(...) or from_session_sync(...)
  • close via client.close() or with ...

Key differences vs Client (async):

  • .reasoners returns a synchronous ReasonersClientSync (blocking methods)
  • sync entrypoints guard against being called inside a running event loop (use await connect(...) from async code instead)

Logging/representation:

  • sensitive fields (config, auth tokens, sessions/transports) are excluded from repr(...)

Methods

.close()

ClientSync.close() -> None

Close the client (best-effort).

Returns:

  • None - Always returns None.

.get_reasoners()

ClientSync.get_reasoners() -> "ReasonersClientSync"

Return the reasoners service client.

This is the method form of ClientSync.reasoners, provided so reference docs can render an explicit API entry.

Returns:

  • ReasonersClientSync - A cached synchronous reasoners client.

.get_jobs()

ClientSync.get_jobs() -> "JobsClientSync"

Return the jobs service client.

This is the method form of ClientSync.jobs, provided so reference docs can render an explicit API entry.

Returns:

  • JobsClientSync - A cached synchronous jobs client.

Returned By

 client
├──  connect_sync
└──  from_session_sync

Referenced By

RelationalAI Documentation
└──  Build With RelationalAI
    └──  Understand how PyRel works > Use advanced reasoning > Predictive reasoning
        └──  Monitor training
            └──  Manage a training job