SessionsPythonPlugin Class

Definition

A plugin for running Python code in an Azure Container Apps dynamic sessions code interpreter.

public class SessionsPythonPlugin
type SessionsPythonPlugin = class
Public Class SessionsPythonPlugin
Inheritance
SessionsPythonPlugin

Constructors

SessionsPythonPlugin(SessionsPythonSettings, IHttpClientFactory, Func<Task<String>>, ILoggerFactory)

Initializes a new instance of the SessionsPythonTool class.

Methods

DownloadFileAsync(String, String)

Downloads a file from the current Session ID.

ExecuteCodeAsync(String)

Executes the provided Python code. Start and end the code snippet with double quotes to define it as a string. Insert \n within the string wherever a new line should appear. Add spaces directly after \n sequences to replicate indentation. Use "" to include double quotes within the code without ending the string. Keep everything in a single line; the \n sequences will represent line breaks when the string is processed or displayed.

ListFilesAsync()

Lists all files in the provided session id pool.

UploadFileAsync(String, String)

Upload a file to the session pool.

Applies to