buildfunctions 0.2.0__tar.gz → 0.2.2__tar.gz
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- buildfunctions-0.2.2/.env.example +2 -0
- buildfunctions-0.2.2/.gitignore +20 -0
- buildfunctions-0.2.2/MANIFEST.in +5 -0
- buildfunctions-0.2.2/PKG-INFO +156 -0
- buildfunctions-0.2.2/README.md +136 -0
- buildfunctions-0.2.2/pyproject.toml +50 -0
- buildfunctions-0.2.2/src/buildfunctions/__init__.py +139 -0
- buildfunctions-0.2.2/src/buildfunctions/client.py +282 -0
- buildfunctions-0.2.2/src/buildfunctions/cpu_function.py +167 -0
- buildfunctions-0.2.2/src/buildfunctions/cpu_sandbox.py +392 -0
- buildfunctions-0.2.2/src/buildfunctions/dotdict.py +39 -0
- buildfunctions-0.2.2/src/buildfunctions/errors.py +90 -0
- buildfunctions-0.2.2/src/buildfunctions/framework.py +22 -0
- buildfunctions-0.2.2/src/buildfunctions/gpu_function.py +241 -0
- buildfunctions-0.2.2/src/buildfunctions/gpu_sandbox.py +443 -0
- buildfunctions-0.2.2/src/buildfunctions/http_client.py +97 -0
- buildfunctions-0.2.2/src/buildfunctions/memory.py +28 -0
- buildfunctions-0.2.2/src/buildfunctions/py.typed +0 -0
- buildfunctions-0.2.2/src/buildfunctions/resolve_code.py +109 -0
- buildfunctions-0.2.2/src/buildfunctions/types.py +229 -0
- buildfunctions-0.2.2/src/buildfunctions/uploader.py +198 -0
- buildfunctions-0.2.2/static/readme/buildfunctions-header.svg +1 -0
- buildfunctions-0.2.2/static/readme/buildfunctions-logo-and-servers-dark.svg +1 -0
- buildfunctions-0.2.2/static/readme/discord-button.png +0 -0
- buildfunctions-0.2.2/static/readme/read-the-docs-button.png +0 -0
- buildfunctions-0.2.2/tests/examples/auth.py +65 -0
- buildfunctions-0.2.2/tests/examples/cpu_function_code.py +9 -0
- buildfunctions-0.2.2/tests/examples/cpu_sandbox_code.py +11 -0
- buildfunctions-0.2.2/tests/examples/gpu_function_code.py +39 -0
- buildfunctions-0.2.2/tests/examples/gpu_function_code_streaming.py +81 -0
- buildfunctions-0.2.2/tests/examples/gpu_sandbox_code.py +39 -0
- buildfunctions-0.2.2/tests/examples/test_cpu_function.py +92 -0
- buildfunctions-0.2.2/tests/examples/test_cpu_sandbox.py +72 -0
- buildfunctions-0.2.2/tests/examples/test_gpu_function.py +95 -0
- buildfunctions-0.2.2/tests/examples/test_gpu_sandbox_with_local_model.py +76 -0
- buildfunctions-0.2.0/MANIFEST.in +0 -1
- buildfunctions-0.2.0/PKG-INFO +0 -6
- buildfunctions-0.2.0/pyproject.toml +0 -3
- buildfunctions-0.2.0/setup.cfg +0 -20
- buildfunctions-0.2.0/src/buildfunctions/__init__.py +0 -1
- buildfunctions-0.2.0/src/buildfunctions/api.py +0 -2
- buildfunctions-0.2.0/src/buildfunctions.egg-info/PKG-INFO +0 -6
- buildfunctions-0.2.0/src/buildfunctions.egg-info/SOURCES.txt +0 -9
- buildfunctions-0.2.0/src/buildfunctions.egg-info/dependency_links.txt +0 -1
- buildfunctions-0.2.0/src/buildfunctions.egg-info/top_level.txt +0 -1
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
__pycache__/
|
|
2
|
+
*.py[cod]
|
|
3
|
+
*.egg-info/
|
|
4
|
+
dist/
|
|
5
|
+
build/
|
|
6
|
+
.eggs/
|
|
7
|
+
*.egg
|
|
8
|
+
.env*
|
|
9
|
+
!.env.example
|
|
10
|
+
!.env.*.example
|
|
11
|
+
.venv/
|
|
12
|
+
.mypy_cache/
|
|
13
|
+
.pytest_cache/
|
|
14
|
+
.ruff_cache/
|
|
15
|
+
*.log
|
|
16
|
+
.DS_Store
|
|
17
|
+
.claude*
|
|
18
|
+
.pytest_cache*
|
|
19
|
+
tests/live*
|
|
20
|
+
tests/dist*
|
|
@@ -0,0 +1,156 @@
|
|
|
1
|
+
Metadata-Version: 2.4
|
|
2
|
+
Name: buildfunctions
|
|
3
|
+
Version: 0.2.2
|
|
4
|
+
Summary: The Buildfunctions SDK for Agents: Hardware-isolated CPU and GPU Sandboxes for untrusted AI actions
|
|
5
|
+
Project-URL: Homepage, https://www.buildfunctions.com
|
|
6
|
+
Project-URL: Documentation, https://www.buildfunctions.com/docs/sdk/quickstart
|
|
7
|
+
Project-URL: Repository, https://github.com/buildfunctions/sdk-python
|
|
8
|
+
Project-URL: Issues, https://github.com/buildfunctions/sdk-python/issues
|
|
9
|
+
Author: Buildfunctions
|
|
10
|
+
Keywords: AIAgents,AIApps,AIInfrastructure,DeveloperExperience,GPUs,Sandboxes,Serverless
|
|
11
|
+
Requires-Python: >=3.10
|
|
12
|
+
Requires-Dist: httpx>=0.27
|
|
13
|
+
Requires-Dist: python-dotenv>=1.0
|
|
14
|
+
Provides-Extra: dev
|
|
15
|
+
Requires-Dist: mypy>=1.13; extra == 'dev'
|
|
16
|
+
Requires-Dist: pytest-asyncio>=0.24; extra == 'dev'
|
|
17
|
+
Requires-Dist: pytest>=8.0; extra == 'dev'
|
|
18
|
+
Requires-Dist: ruff>=0.8; extra == 'dev'
|
|
19
|
+
Description-Content-Type: text/markdown
|
|
20
|
+
|
|
21
|
+
<p align="center">
|
|
22
|
+
<h1 align="center">
|
|
23
|
+
<a href="https://www.buildfunctions.com" target="_blank">
|
|
24
|
+
<img src="./static/readme/buildfunctions-header.svg" alt="logo" width="900">
|
|
25
|
+
</a>
|
|
26
|
+
</h1>
|
|
27
|
+
</p>
|
|
28
|
+
|
|
29
|
+
<h1 align="center">The Buildfunctions SDK for Agents</h1>
|
|
30
|
+
|
|
31
|
+
<p align="center">
|
|
32
|
+
<!-- <a href="https://discord.com/users/buildfunctions" target="_blank">
|
|
33
|
+
<img src="./static/readme/discord-button.png" height="32" />
|
|
34
|
+
</a> -->
|
|
35
|
+
<a href="https://www.buildfunctions.com/docs/sdk/quickstart" target="_blank">
|
|
36
|
+
<img src="./static/readme/read-the-docs-button.png" height="32" />
|
|
37
|
+
</a>
|
|
38
|
+
</p>
|
|
39
|
+
|
|
40
|
+
<p align="center">
|
|
41
|
+
<a href="https://pypi.org/project/buildfunctions" target="_blank">
|
|
42
|
+
<img src="https://img.shields.io/badge/pypi-buildfunctions-green">
|
|
43
|
+
</a>
|
|
44
|
+
</p>
|
|
45
|
+
|
|
46
|
+
<p align="center">
|
|
47
|
+
<h1 align="center">
|
|
48
|
+
<a href="https://www.buildfunctions.com" target="_blank">
|
|
49
|
+
<img src="./static/readme/buildfunctions-logo-and-servers-dark.svg" alt="logo" width="900">
|
|
50
|
+
</a>
|
|
51
|
+
</h1>
|
|
52
|
+
</p>
|
|
53
|
+
|
|
54
|
+
> Hardware-isolated execution environments for AI agents
|
|
55
|
+
|
|
56
|
+
## Installation
|
|
57
|
+
|
|
58
|
+
```bash
|
|
59
|
+
pip install buildfunctions
|
|
60
|
+
```
|
|
61
|
+
|
|
62
|
+
## Quick Start
|
|
63
|
+
|
|
64
|
+
### 1. Create an API Token
|
|
65
|
+
|
|
66
|
+
Get your API token at [buildfunctions.com/settings](https://www.buildfunctions.com/settings)
|
|
67
|
+
|
|
68
|
+
### 2. CPU Function
|
|
69
|
+
|
|
70
|
+
```python
|
|
71
|
+
from buildfunctions import Buildfunctions, CPUFunction
|
|
72
|
+
|
|
73
|
+
client = await Buildfunctions({"apiToken": API_TOKEN})
|
|
74
|
+
|
|
75
|
+
deployed_function = await CPUFunction.create({
|
|
76
|
+
"name": "my-cpu-function",
|
|
77
|
+
"code": "./cpu_function_code.py",
|
|
78
|
+
"language": "python",
|
|
79
|
+
"memory": 128,
|
|
80
|
+
"timeout": 30,
|
|
81
|
+
})
|
|
82
|
+
|
|
83
|
+
print(f"Endpoint: {deployed_function.endpoint}")
|
|
84
|
+
|
|
85
|
+
await deployed_function.delete()
|
|
86
|
+
```
|
|
87
|
+
|
|
88
|
+
### 3. CPU Sandbox
|
|
89
|
+
|
|
90
|
+
```python
|
|
91
|
+
from buildfunctions import Buildfunctions, CPUSandbox
|
|
92
|
+
|
|
93
|
+
client = await Buildfunctions({"apiToken": API_TOKEN})
|
|
94
|
+
|
|
95
|
+
sandbox = await CPUSandbox.create({
|
|
96
|
+
"name": "my-cpu-sandbox",
|
|
97
|
+
"language": "python",
|
|
98
|
+
"code": "/path/to/code/cpu_sandbox_code.py",
|
|
99
|
+
"memory": 128,
|
|
100
|
+
"timeout": 30,
|
|
101
|
+
})
|
|
102
|
+
|
|
103
|
+
result = await sandbox.run()
|
|
104
|
+
print(f"Result: {result}")
|
|
105
|
+
|
|
106
|
+
await sandbox.delete()
|
|
107
|
+
```
|
|
108
|
+
|
|
109
|
+
### 4. GPU Function
|
|
110
|
+
|
|
111
|
+
```python
|
|
112
|
+
from buildfunctions import Buildfunctions, GPUFunction
|
|
113
|
+
|
|
114
|
+
client = await Buildfunctions({"apiToken": API_TOKEN})
|
|
115
|
+
|
|
116
|
+
deployed_function = await GPUFunction.create({
|
|
117
|
+
"name": "my-gpu-function",
|
|
118
|
+
"code": "/path/to/code/gpu_function_code.py",
|
|
119
|
+
"language": "python",
|
|
120
|
+
"gpu": "T4",
|
|
121
|
+
"vcpus": 30,
|
|
122
|
+
"memory": "50000MB",
|
|
123
|
+
"timeout": 300,
|
|
124
|
+
"requirements": ["transformers==4.47.1", "torch", "accelerate"],
|
|
125
|
+
})
|
|
126
|
+
|
|
127
|
+
print(f"Endpoint: {deployed_function.endpoint}")
|
|
128
|
+
|
|
129
|
+
await deployed_function.delete()
|
|
130
|
+
```
|
|
131
|
+
|
|
132
|
+
### 5. GPU Sandbox with Local Model
|
|
133
|
+
|
|
134
|
+
```python
|
|
135
|
+
from buildfunctions import Buildfunctions, GPUSandbox
|
|
136
|
+
|
|
137
|
+
client = await Buildfunctions({"apiToken": API_TOKEN})
|
|
138
|
+
|
|
139
|
+
sandbox = await GPUSandbox.create({
|
|
140
|
+
"name": "my-gpu-sandbox",
|
|
141
|
+
"language": "python",
|
|
142
|
+
"memory": 10000,
|
|
143
|
+
"timeout": 300,
|
|
144
|
+
"vcpus": 6,
|
|
145
|
+
"code": "./gpu_sandbox_code.py",
|
|
146
|
+
"model": "/path/to/models/Qwen/Qwen3-8B",
|
|
147
|
+
"requirements": "torch",
|
|
148
|
+
})
|
|
149
|
+
|
|
150
|
+
result = await sandbox.run()
|
|
151
|
+
print(f"Response: {result}")
|
|
152
|
+
|
|
153
|
+
await sandbox.delete()
|
|
154
|
+
```
|
|
155
|
+
|
|
156
|
+
The SDK is currently in beta.
|
|
@@ -0,0 +1,136 @@
|
|
|
1
|
+
<p align="center">
|
|
2
|
+
<h1 align="center">
|
|
3
|
+
<a href="https://www.buildfunctions.com" target="_blank">
|
|
4
|
+
<img src="./static/readme/buildfunctions-header.svg" alt="logo" width="900">
|
|
5
|
+
</a>
|
|
6
|
+
</h1>
|
|
7
|
+
</p>
|
|
8
|
+
|
|
9
|
+
<h1 align="center">The Buildfunctions SDK for Agents</h1>
|
|
10
|
+
|
|
11
|
+
<p align="center">
|
|
12
|
+
<!-- <a href="https://discord.com/users/buildfunctions" target="_blank">
|
|
13
|
+
<img src="./static/readme/discord-button.png" height="32" />
|
|
14
|
+
</a> -->
|
|
15
|
+
<a href="https://www.buildfunctions.com/docs/sdk/quickstart" target="_blank">
|
|
16
|
+
<img src="./static/readme/read-the-docs-button.png" height="32" />
|
|
17
|
+
</a>
|
|
18
|
+
</p>
|
|
19
|
+
|
|
20
|
+
<p align="center">
|
|
21
|
+
<a href="https://pypi.org/project/buildfunctions" target="_blank">
|
|
22
|
+
<img src="https://img.shields.io/badge/pypi-buildfunctions-green">
|
|
23
|
+
</a>
|
|
24
|
+
</p>
|
|
25
|
+
|
|
26
|
+
<p align="center">
|
|
27
|
+
<h1 align="center">
|
|
28
|
+
<a href="https://www.buildfunctions.com" target="_blank">
|
|
29
|
+
<img src="./static/readme/buildfunctions-logo-and-servers-dark.svg" alt="logo" width="900">
|
|
30
|
+
</a>
|
|
31
|
+
</h1>
|
|
32
|
+
</p>
|
|
33
|
+
|
|
34
|
+
> Hardware-isolated execution environments for AI agents
|
|
35
|
+
|
|
36
|
+
## Installation
|
|
37
|
+
|
|
38
|
+
```bash
|
|
39
|
+
pip install buildfunctions
|
|
40
|
+
```
|
|
41
|
+
|
|
42
|
+
## Quick Start
|
|
43
|
+
|
|
44
|
+
### 1. Create an API Token
|
|
45
|
+
|
|
46
|
+
Get your API token at [buildfunctions.com/settings](https://www.buildfunctions.com/settings)
|
|
47
|
+
|
|
48
|
+
### 2. CPU Function
|
|
49
|
+
|
|
50
|
+
```python
|
|
51
|
+
from buildfunctions import Buildfunctions, CPUFunction
|
|
52
|
+
|
|
53
|
+
client = await Buildfunctions({"apiToken": API_TOKEN})
|
|
54
|
+
|
|
55
|
+
deployed_function = await CPUFunction.create({
|
|
56
|
+
"name": "my-cpu-function",
|
|
57
|
+
"code": "./cpu_function_code.py",
|
|
58
|
+
"language": "python",
|
|
59
|
+
"memory": 128,
|
|
60
|
+
"timeout": 30,
|
|
61
|
+
})
|
|
62
|
+
|
|
63
|
+
print(f"Endpoint: {deployed_function.endpoint}")
|
|
64
|
+
|
|
65
|
+
await deployed_function.delete()
|
|
66
|
+
```
|
|
67
|
+
|
|
68
|
+
### 3. CPU Sandbox
|
|
69
|
+
|
|
70
|
+
```python
|
|
71
|
+
from buildfunctions import Buildfunctions, CPUSandbox
|
|
72
|
+
|
|
73
|
+
client = await Buildfunctions({"apiToken": API_TOKEN})
|
|
74
|
+
|
|
75
|
+
sandbox = await CPUSandbox.create({
|
|
76
|
+
"name": "my-cpu-sandbox",
|
|
77
|
+
"language": "python",
|
|
78
|
+
"code": "/path/to/code/cpu_sandbox_code.py",
|
|
79
|
+
"memory": 128,
|
|
80
|
+
"timeout": 30,
|
|
81
|
+
})
|
|
82
|
+
|
|
83
|
+
result = await sandbox.run()
|
|
84
|
+
print(f"Result: {result}")
|
|
85
|
+
|
|
86
|
+
await sandbox.delete()
|
|
87
|
+
```
|
|
88
|
+
|
|
89
|
+
### 4. GPU Function
|
|
90
|
+
|
|
91
|
+
```python
|
|
92
|
+
from buildfunctions import Buildfunctions, GPUFunction
|
|
93
|
+
|
|
94
|
+
client = await Buildfunctions({"apiToken": API_TOKEN})
|
|
95
|
+
|
|
96
|
+
deployed_function = await GPUFunction.create({
|
|
97
|
+
"name": "my-gpu-function",
|
|
98
|
+
"code": "/path/to/code/gpu_function_code.py",
|
|
99
|
+
"language": "python",
|
|
100
|
+
"gpu": "T4",
|
|
101
|
+
"vcpus": 30,
|
|
102
|
+
"memory": "50000MB",
|
|
103
|
+
"timeout": 300,
|
|
104
|
+
"requirements": ["transformers==4.47.1", "torch", "accelerate"],
|
|
105
|
+
})
|
|
106
|
+
|
|
107
|
+
print(f"Endpoint: {deployed_function.endpoint}")
|
|
108
|
+
|
|
109
|
+
await deployed_function.delete()
|
|
110
|
+
```
|
|
111
|
+
|
|
112
|
+
### 5. GPU Sandbox with Local Model
|
|
113
|
+
|
|
114
|
+
```python
|
|
115
|
+
from buildfunctions import Buildfunctions, GPUSandbox
|
|
116
|
+
|
|
117
|
+
client = await Buildfunctions({"apiToken": API_TOKEN})
|
|
118
|
+
|
|
119
|
+
sandbox = await GPUSandbox.create({
|
|
120
|
+
"name": "my-gpu-sandbox",
|
|
121
|
+
"language": "python",
|
|
122
|
+
"memory": 10000,
|
|
123
|
+
"timeout": 300,
|
|
124
|
+
"vcpus": 6,
|
|
125
|
+
"code": "./gpu_sandbox_code.py",
|
|
126
|
+
"model": "/path/to/models/Qwen/Qwen3-8B",
|
|
127
|
+
"requirements": "torch",
|
|
128
|
+
})
|
|
129
|
+
|
|
130
|
+
result = await sandbox.run()
|
|
131
|
+
print(f"Response: {result}")
|
|
132
|
+
|
|
133
|
+
await sandbox.delete()
|
|
134
|
+
```
|
|
135
|
+
|
|
136
|
+
The SDK is currently in beta.
|
|
@@ -0,0 +1,50 @@
|
|
|
1
|
+
[build-system]
|
|
2
|
+
requires = ["hatchling"]
|
|
3
|
+
build-backend = "hatchling.build"
|
|
4
|
+
|
|
5
|
+
[project]
|
|
6
|
+
name = "buildfunctions"
|
|
7
|
+
version = "0.2.2"
|
|
8
|
+
description = "The Buildfunctions SDK for Agents: Hardware-isolated CPU and GPU Sandboxes for untrusted AI actions"
|
|
9
|
+
readme = "README.md"
|
|
10
|
+
requires-python = ">=3.10"
|
|
11
|
+
authors = [
|
|
12
|
+
{ name = "Buildfunctions" }
|
|
13
|
+
]
|
|
14
|
+
keywords = [
|
|
15
|
+
"AIAgents",
|
|
16
|
+
"AIInfrastructure",
|
|
17
|
+
"AIApps",
|
|
18
|
+
"Serverless",
|
|
19
|
+
"GPUs",
|
|
20
|
+
"Sandboxes",
|
|
21
|
+
"DeveloperExperience",
|
|
22
|
+
]
|
|
23
|
+
dependencies = [
|
|
24
|
+
"httpx>=0.27",
|
|
25
|
+
"python-dotenv>=1.0",
|
|
26
|
+
]
|
|
27
|
+
|
|
28
|
+
[project.optional-dependencies]
|
|
29
|
+
dev = [
|
|
30
|
+
"pytest>=8.0",
|
|
31
|
+
"pytest-asyncio>=0.24",
|
|
32
|
+
"mypy>=1.13",
|
|
33
|
+
"ruff>=0.8",
|
|
34
|
+
]
|
|
35
|
+
|
|
36
|
+
[project.urls]
|
|
37
|
+
Homepage = "https://www.buildfunctions.com"
|
|
38
|
+
Documentation = "https://www.buildfunctions.com/docs/sdk/quickstart"
|
|
39
|
+
Repository = "https://github.com/buildfunctions/sdk-python"
|
|
40
|
+
Issues = "https://github.com/buildfunctions/sdk-python/issues"
|
|
41
|
+
|
|
42
|
+
[tool.hatch.build.targets.wheel]
|
|
43
|
+
packages = ["src/buildfunctions"]
|
|
44
|
+
|
|
45
|
+
[tool.pytest.ini_options]
|
|
46
|
+
asyncio_mode = "auto"
|
|
47
|
+
|
|
48
|
+
[tool.ruff]
|
|
49
|
+
target-version = "py311"
|
|
50
|
+
line-length = 120
|
|
@@ -0,0 +1,139 @@
|
|
|
1
|
+
"""Buildfunctions SDK - Python SDK for the serverless platform for AI agents.
|
|
2
|
+
|
|
3
|
+
Example:
|
|
4
|
+
import asyncio
|
|
5
|
+
from buildfunctions import Buildfunctions, CPUSandbox, GPUSandbox, GPUFunction
|
|
6
|
+
|
|
7
|
+
async def main():
|
|
8
|
+
# Initialize the client (authenticates with the API)
|
|
9
|
+
client = await Buildfunctions({
|
|
10
|
+
"apiToken": os.environ["BUILDFUNCTIONS_API_TOKEN"]
|
|
11
|
+
})
|
|
12
|
+
|
|
13
|
+
# Access authenticated user info (supports both dot and bracket notation)
|
|
14
|
+
print(client.user.username)
|
|
15
|
+
print(client.authenticatedAt)
|
|
16
|
+
|
|
17
|
+
# Create a CPU sandbox
|
|
18
|
+
sandbox = await CPUSandbox.create({
|
|
19
|
+
"name": "my-sandbox",
|
|
20
|
+
"language": "python",
|
|
21
|
+
"memory": "512MB",
|
|
22
|
+
})
|
|
23
|
+
|
|
24
|
+
# Run code
|
|
25
|
+
result = await sandbox.run()
|
|
26
|
+
print(result.response)
|
|
27
|
+
|
|
28
|
+
# Clean up
|
|
29
|
+
await sandbox.delete()
|
|
30
|
+
|
|
31
|
+
asyncio.run(main())
|
|
32
|
+
"""
|
|
33
|
+
|
|
34
|
+
# Client exports - match TypeScript SDK naming exactly
|
|
35
|
+
from buildfunctions.client import (
|
|
36
|
+
Buildfunctions,
|
|
37
|
+
buildfunctions,
|
|
38
|
+
createClient,
|
|
39
|
+
create_client,
|
|
40
|
+
init,
|
|
41
|
+
)
|
|
42
|
+
|
|
43
|
+
# Function builders - match TypeScript SDK naming exactly
|
|
44
|
+
from buildfunctions.cpu_function import CPUFunction, create_cpu_function
|
|
45
|
+
from buildfunctions.gpu_function import GPUFunction, create_gpu_function
|
|
46
|
+
|
|
47
|
+
# Sandbox factories - match TypeScript SDK naming exactly
|
|
48
|
+
from buildfunctions.cpu_sandbox import CPUSandbox, create_cpu_sandbox
|
|
49
|
+
from buildfunctions.gpu_sandbox import GPUSandbox, create_gpu_sandbox
|
|
50
|
+
|
|
51
|
+
# Errors
|
|
52
|
+
from buildfunctions.errors import (
|
|
53
|
+
AuthenticationError,
|
|
54
|
+
BuildfunctionsError,
|
|
55
|
+
CapacityError,
|
|
56
|
+
NotFoundError,
|
|
57
|
+
ValidationError,
|
|
58
|
+
)
|
|
59
|
+
|
|
60
|
+
# Types
|
|
61
|
+
from buildfunctions.types import (
|
|
62
|
+
AuthenticatedUser,
|
|
63
|
+
AuthResponse,
|
|
64
|
+
BuildfunctionsConfig,
|
|
65
|
+
CPUFunctionOptions,
|
|
66
|
+
CPUSandboxConfig,
|
|
67
|
+
CPUSandboxInstance,
|
|
68
|
+
CreateFunctionOptions,
|
|
69
|
+
DeployedFunction,
|
|
70
|
+
ErrorCode,
|
|
71
|
+
FileMetadata,
|
|
72
|
+
FindUniqueOptions,
|
|
73
|
+
Framework,
|
|
74
|
+
FunctionConfig,
|
|
75
|
+
GPUFunctionOptions,
|
|
76
|
+
GPUSandboxConfig,
|
|
77
|
+
GPUSandboxInstance,
|
|
78
|
+
GPUType,
|
|
79
|
+
Language,
|
|
80
|
+
ListOptions,
|
|
81
|
+
Memory,
|
|
82
|
+
RunResult,
|
|
83
|
+
Runtime,
|
|
84
|
+
SandboxInstance,
|
|
85
|
+
UploadOptions,
|
|
86
|
+
)
|
|
87
|
+
|
|
88
|
+
__all__ = [
|
|
89
|
+
# Client (PascalCase - matches TypeScript)
|
|
90
|
+
"Buildfunctions",
|
|
91
|
+
"createClient",
|
|
92
|
+
"init",
|
|
93
|
+
# Client (snake_case aliases)
|
|
94
|
+
"buildfunctions",
|
|
95
|
+
"create_client",
|
|
96
|
+
# Function builders (PascalCase - matches TypeScript)
|
|
97
|
+
"CPUFunction",
|
|
98
|
+
"GPUFunction",
|
|
99
|
+
# Function builders (snake_case aliases)
|
|
100
|
+
"create_cpu_function",
|
|
101
|
+
"create_gpu_function",
|
|
102
|
+
# Sandbox factories (PascalCase - matches TypeScript)
|
|
103
|
+
"CPUSandbox",
|
|
104
|
+
"GPUSandbox",
|
|
105
|
+
# Sandbox factories (snake_case aliases)
|
|
106
|
+
"create_cpu_sandbox",
|
|
107
|
+
"create_gpu_sandbox",
|
|
108
|
+
# Errors
|
|
109
|
+
"BuildfunctionsError",
|
|
110
|
+
"AuthenticationError",
|
|
111
|
+
"NotFoundError",
|
|
112
|
+
"ValidationError",
|
|
113
|
+
"CapacityError",
|
|
114
|
+
# Types
|
|
115
|
+
"BuildfunctionsConfig",
|
|
116
|
+
"AuthenticatedUser",
|
|
117
|
+
"AuthResponse",
|
|
118
|
+
"Language",
|
|
119
|
+
"Runtime",
|
|
120
|
+
"GPUType",
|
|
121
|
+
"Framework",
|
|
122
|
+
"Memory",
|
|
123
|
+
"FunctionConfig",
|
|
124
|
+
"CPUFunctionOptions",
|
|
125
|
+
"GPUFunctionOptions",
|
|
126
|
+
"CreateFunctionOptions",
|
|
127
|
+
"DeployedFunction",
|
|
128
|
+
"CPUSandboxConfig",
|
|
129
|
+
"GPUSandboxConfig",
|
|
130
|
+
"RunResult",
|
|
131
|
+
"UploadOptions",
|
|
132
|
+
"SandboxInstance",
|
|
133
|
+
"CPUSandboxInstance",
|
|
134
|
+
"GPUSandboxInstance",
|
|
135
|
+
"FindUniqueOptions",
|
|
136
|
+
"ListOptions",
|
|
137
|
+
"ErrorCode",
|
|
138
|
+
"FileMetadata",
|
|
139
|
+
]
|