Repository navigation
Expand file tree
/
Copy pathAspire.Hosting.Python.cs
More file actions
73 lines (60 loc) · 4.3 KB
/
Copy pathAspire.Hosting.Python.cs
File metadata and controls
73 lines (60 loc) · 4.3 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
//------------------------------------------------------------------------------
// <auto-generated>
// This code was generated by a tool.
//
// Changes to this file may cause incorrect behavior and will be lost if
// the code is regenerated.
// </auto-generated>
//------------------------------------------------------------------------------
namespace Aspire.Hosting
{
public static partial class PythonAppResourceBuilderExtensions
{
[System.Obsolete("Use AddPythonScript, AddPythonModule, or AddPythonExecutable and chain with .WithVirtualEnvironment(...).WithArgs(...) instead.")]
[System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)]
public static ApplicationModel.IResourceBuilder<Python.PythonAppResource> AddPythonApp(this IDistributedApplicationBuilder builder, string name, string appDirectory, string scriptPath, string virtualEnvironmentPath, params string[] scriptArgs) { throw null; }
[System.Obsolete("Use AddPythonScript, AddPythonModule, or AddPythonExecutable and chain with .WithArgs(...) instead.")]
[System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)]
public static ApplicationModel.IResourceBuilder<Python.PythonAppResource> AddPythonApp(this IDistributedApplicationBuilder builder, string name, string appDirectory, string scriptPath, params string[] scriptArgs) { throw null; }
[AspireExport]
public static ApplicationModel.IResourceBuilder<Python.PythonAppResource> AddPythonApp(this IDistributedApplicationBuilder builder, string name, string appDirectory, string scriptPath) { throw null; }
[AspireExport]
public static ApplicationModel.IResourceBuilder<Python.PythonAppResource> AddPythonExecutable(this IDistributedApplicationBuilder builder, string name, string appDirectory, string executableName) { throw null; }
[AspireExport]
public static ApplicationModel.IResourceBuilder<Python.PythonAppResource> AddPythonModule(this IDistributedApplicationBuilder builder, string name, string appDirectory, string moduleName) { throw null; }
[AspireExport]
public static ApplicationModel.IResourceBuilder<Python.UvicornAppResource> AddUvicornApp(this IDistributedApplicationBuilder builder, string name, string appDirectory, string app) { throw null; }
[AspireExport]
public static ApplicationModel.IResourceBuilder<T> WithDebugging<T>(this ApplicationModel.IResourceBuilder<T> builder)
where T : Python.PythonAppResource { throw null; }
[AspireExport]
public static ApplicationModel.IResourceBuilder<T> WithEntrypoint<T>(this ApplicationModel.IResourceBuilder<T> builder, Python.EntrypointType entrypointType, string entrypoint)
where T : Python.PythonAppResource { throw null; }
[AspireExport]
public static ApplicationModel.IResourceBuilder<T> WithPip<T>(this ApplicationModel.IResourceBuilder<T> builder, bool install = true, string[]? installArgs = null)
where T : Python.PythonAppResource { throw null; }
[AspireExport]
public static ApplicationModel.IResourceBuilder<T> WithUv<T>(this ApplicationModel.IResourceBuilder<T> builder, bool install = true, string[]? args = null)
where T : Python.PythonAppResource { throw null; }
[AspireExport]
public static ApplicationModel.IResourceBuilder<T> WithVirtualEnvironment<T>(this ApplicationModel.IResourceBuilder<T> builder, string virtualEnvironmentPath, bool createIfNotExists = true)
where T : Python.PythonAppResource { throw null; }
}
}
namespace Aspire.Hosting.Python
{
public enum EntrypointType
{
Executable = 0,
Script = 1,
Module = 2
}
public partial class PythonAppResource : ApplicationModel.ExecutableResource, IResourceWithServiceDiscovery, ApplicationModel.IResourceWithEndpoints, ApplicationModel.IResource, ApplicationModel.IContainerFilesDestinationResource
{
public PythonAppResource(string name, string executablePath, string appDirectory) : base(default!, default!, default!) { }
}
public partial class UvicornAppResource : PythonAppResource
{
public UvicornAppResource(string name, string executablePath, string appDirectory) : base(default!, default!, default!) { }
}
}