({{, (RefLink[ExternalSessionObject, paclet:ref/ExternalSessionObject])[…] 
represents an external session started by (RefLink[StartExternalSession, paclet:ref/StartExternalSession]) for use with (RefLink[ExternalEvaluate, paclet:ref/ExternalEvaluate]).}})

OpenersNotesSection(Spacer1)Details

(RefLink[ExternalSessionObject, paclet:ref/ExternalSessionObject])[…][prop] returns a property of the external session.

The following possible properties can be used:

Available properties can be queried with (RefLink[ExternalSessionObject, paclet:ref/ExternalSessionObject])[…]["Properties"].

OpenersPrimaryExamplesSection(Spacer1)Examples  (5)

OpenersExampleSection0(Spacer1)Basic Examples  (2)

Start an external session to get an (RefLink[ExternalSessionObject, paclet:ref/ExternalSessionObject]):

session=StartExternalSession["Python"]

Delete the external session with (RefLink[DeleteObject, paclet:ref/DeleteObject]):

DeleteObject[session]

Query properties from an (RefLink[ExternalSessionObject, paclet:ref/ExternalSessionObject]):

session=StartExternalSession["NodeJS"]

session["Executable"]

Delete the session object:

DeleteObject[session]

OpenersExampleSection1(Spacer1)Scope  (2)

Start a session:

session=StartExternalSession["Python"]

List all possible properties:

session["Properties"]

Make a dataset of all (RefLink[ExternalSessionObject, paclet:ref/ExternalSessionObject]) properties:

Dataset@AssociationMap[session,session["Properties"]]

Delete the session object:

DeleteObject[session]

Evaluate code in a session and see the "EvaluationCount" property increase:

session=StartExternalSession["Python"];
Dynamic[session["EvaluationCount"]]

Do[ExternalEvaluate[session,"2+2"],10]

Display how long the session has been running with the "SessionTime" property:

Dynamic[Quantity[session["SessionTime"],"Seconds"]]

OpenersExampleSection3(Spacer1)Properties & Relations  (1)

Get all external sessions with (RefLink[ExternalSessions, paclet:ref/ExternalSessions]):

StartExternalSession["NodeJS"];
StartExternalSession["Python"];
ExternalSessions[]

Delete the session objects:

DeleteObject[%]

({{DocumentationFooterIconsRelatedFunction.png, ({{See Also}, {(RefLink[ExternalSessions, paclet:ref/ExternalSessions])  ▪  (RefLink[StartExternalSession, paclet:ref/StartExternalSession])  ▪  (RefLink[ExternalEvaluate, paclet:ref/ExternalEvaluate])  ▪  (RefLink[FindExternalEvaluators, paclet:ref/FindExternalEvaluators])}})}})

({{DocumentationFooterIconsRelatedGuide.png, ({{Related Guides}, {▪(RefLinkPlain[External Interpreted Language Interfaces, paclet:guide/ExternalInterpretedLanguageInterfaces])}})}})