synapserun 0.3.0__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.
- synapserun-0.3.0/PKG-INFO +88 -0
- synapserun-0.3.0/README.md +64 -0
- synapserun-0.3.0/pyproject.toml +40 -0
- synapserun-0.3.0/setup.cfg +4 -0
- synapserun-0.3.0/synapse/__init__.py +29 -0
- synapserun-0.3.0/synapse/cell.py +1258 -0
- synapserun-0.3.0/synapse/cli.py +105 -0
- synapserun-0.3.0/synapse/client.py +187 -0
- synapserun-0.3.0/synapse/crewai_tool.py +118 -0
- synapserun-0.3.0/synapse/decorator.py +314 -0
- synapserun-0.3.0/synapse/e2b_compat.py +481 -0
- synapserun-0.3.0/synapse/langchain_tool.py +190 -0
- synapserun-0.3.0/synapse/syn_executor.py +193 -0
- synapserun-0.3.0/synapse/tools/__init__.py +28 -0
- synapserun-0.3.0/synapse/tools/crewai_tool.py +103 -0
- synapserun-0.3.0/synapse/tools/langchain_tool.py +132 -0
- synapserun-0.3.0/synapse/transpiler.py +2302 -0
- synapserun-0.3.0/synapserun.egg-info/PKG-INFO +88 -0
- synapserun-0.3.0/synapserun.egg-info/SOURCES.txt +27 -0
- synapserun-0.3.0/synapserun.egg-info/dependency_links.txt +1 -0
- synapserun-0.3.0/synapserun.egg-info/entry_points.txt +2 -0
- synapserun-0.3.0/synapserun.egg-info/top_level.txt +1 -0
- synapserun-0.3.0/tests/test_client.py +86 -0
- synapserun-0.3.0/tests/test_decorator.py +236 -0
- synapserun-0.3.0/tests/test_filesystem_completeness.py +393 -0
- synapserun-0.3.0/tests/test_integration.py +194 -0
- synapserun-0.3.0/tests/test_lifecycle_batch_a.py +474 -0
- synapserun-0.3.0/tests/test_mcp.py +139 -0
- synapserun-0.3.0/tests/test_streaming_background.py +253 -0
|
@@ -0,0 +1,88 @@
|
|
|
1
|
+
Metadata-Version: 2.4
|
|
2
|
+
Name: synapserun
|
|
3
|
+
Version: 0.3.0
|
|
4
|
+
Summary: Synapse Cell SDK — E2B-compatible sandboxed code execution, 200x faster, with streaming and filesystem support
|
|
5
|
+
Author-email: Freshfield AI <hello@synapserun.dev>
|
|
6
|
+
License-Expression: MIT
|
|
7
|
+
Project-URL: Homepage, https://synapserun.dev
|
|
8
|
+
Project-URL: Documentation, https://synapserun.dev/docs
|
|
9
|
+
Project-URL: Repository, https://github.com/Freshfield-AI/synapse
|
|
10
|
+
Classifier: Development Status :: 3 - Alpha
|
|
11
|
+
Classifier: Intended Audience :: Developers
|
|
12
|
+
Classifier: Programming Language :: Python :: 3
|
|
13
|
+
Classifier: Programming Language :: Python :: 3.9
|
|
14
|
+
Classifier: Programming Language :: Python :: 3.10
|
|
15
|
+
Classifier: Programming Language :: Python :: 3.11
|
|
16
|
+
Classifier: Programming Language :: Python :: 3.12
|
|
17
|
+
Classifier: Programming Language :: Python :: 3.13
|
|
18
|
+
Classifier: Programming Language :: Python :: 3.14
|
|
19
|
+
Classifier: Topic :: Software Development :: Libraries
|
|
20
|
+
Classifier: Topic :: Software Development :: Testing
|
|
21
|
+
Classifier: Topic :: System :: Emulators
|
|
22
|
+
Requires-Python: >=3.9
|
|
23
|
+
Description-Content-Type: text/markdown
|
|
24
|
+
|
|
25
|
+
# synapserun
|
|
26
|
+
|
|
27
|
+
Synapse Cell SDK -- E2B-compatible sandboxed code execution, 200x faster.
|
|
28
|
+
|
|
29
|
+
[](https://pypi.org/project/synapserun/)
|
|
30
|
+
[](https://www.npmjs.com/package/@runsynapse/sdk)
|
|
31
|
+
[](https://www.python.org/downloads/)
|
|
32
|
+
[](https://opensource.org/licenses/MIT)
|
|
33
|
+
|
|
34
|
+
## Install
|
|
35
|
+
|
|
36
|
+
```bash
|
|
37
|
+
pip install synapserun
|
|
38
|
+
```
|
|
39
|
+
|
|
40
|
+
```bash
|
|
41
|
+
npm install @runsynapse/sdk
|
|
42
|
+
```
|
|
43
|
+
|
|
44
|
+
Zero dependencies -- pure Python stdlib / minimal TS.
|
|
45
|
+
|
|
46
|
+
## Quick Start
|
|
47
|
+
|
|
48
|
+
```python
|
|
49
|
+
from synapse.cell import Cell
|
|
50
|
+
|
|
51
|
+
cell = Cell(api_key="cell_sk_...")
|
|
52
|
+
result = cell.run("print(2 + 2)")
|
|
53
|
+
info = cell.get_info()
|
|
54
|
+
print(result.stdout) # "4"
|
|
55
|
+
cell.kill()
|
|
56
|
+
```
|
|
57
|
+
|
|
58
|
+
## E2B Migration (one-line change)
|
|
59
|
+
|
|
60
|
+
```python
|
|
61
|
+
# Before (E2B)
|
|
62
|
+
from e2b_code_interpreter import Sandbox
|
|
63
|
+
|
|
64
|
+
# After (Synapse -- same API, 200x faster)
|
|
65
|
+
from synapse.e2b_compat import Sandbox
|
|
66
|
+
|
|
67
|
+
sandbox = Sandbox()
|
|
68
|
+
execution = sandbox.run_code("print('hello')")
|
|
69
|
+
print(execution.text) # "hello"
|
|
70
|
+
sandbox.kill()
|
|
71
|
+
```
|
|
72
|
+
|
|
73
|
+
## Features (0.3.0)
|
|
74
|
+
|
|
75
|
+
- **Sandbox lifecycle**: create, connect, list, get_info, kill
|
|
76
|
+
- **Filesystem**: read, write, list, exists, get_info, remove, make_dir, rename
|
|
77
|
+
- **Streaming**: real-time on_stdout/on_stderr callbacks via SSE
|
|
78
|
+
- **Background commands**: CommandHandle with is_running/wait/kill
|
|
79
|
+
- **Cryptographic receipts**: SHA-256 execution chain
|
|
80
|
+
- **E2B compatibility**: drop-in Sandbox replacement
|
|
81
|
+
|
|
82
|
+
## Full API Reference
|
|
83
|
+
|
|
84
|
+
See [cell/CLAUDE.md](../CLAUDE.md) for the complete API surface and architecture.
|
|
85
|
+
|
|
86
|
+
## License
|
|
87
|
+
|
|
88
|
+
MIT
|
|
@@ -0,0 +1,64 @@
|
|
|
1
|
+
# synapserun
|
|
2
|
+
|
|
3
|
+
Synapse Cell SDK -- E2B-compatible sandboxed code execution, 200x faster.
|
|
4
|
+
|
|
5
|
+
[](https://pypi.org/project/synapserun/)
|
|
6
|
+
[](https://www.npmjs.com/package/@runsynapse/sdk)
|
|
7
|
+
[](https://www.python.org/downloads/)
|
|
8
|
+
[](https://opensource.org/licenses/MIT)
|
|
9
|
+
|
|
10
|
+
## Install
|
|
11
|
+
|
|
12
|
+
```bash
|
|
13
|
+
pip install synapserun
|
|
14
|
+
```
|
|
15
|
+
|
|
16
|
+
```bash
|
|
17
|
+
npm install @runsynapse/sdk
|
|
18
|
+
```
|
|
19
|
+
|
|
20
|
+
Zero dependencies -- pure Python stdlib / minimal TS.
|
|
21
|
+
|
|
22
|
+
## Quick Start
|
|
23
|
+
|
|
24
|
+
```python
|
|
25
|
+
from synapse.cell import Cell
|
|
26
|
+
|
|
27
|
+
cell = Cell(api_key="cell_sk_...")
|
|
28
|
+
result = cell.run("print(2 + 2)")
|
|
29
|
+
info = cell.get_info()
|
|
30
|
+
print(result.stdout) # "4"
|
|
31
|
+
cell.kill()
|
|
32
|
+
```
|
|
33
|
+
|
|
34
|
+
## E2B Migration (one-line change)
|
|
35
|
+
|
|
36
|
+
```python
|
|
37
|
+
# Before (E2B)
|
|
38
|
+
from e2b_code_interpreter import Sandbox
|
|
39
|
+
|
|
40
|
+
# After (Synapse -- same API, 200x faster)
|
|
41
|
+
from synapse.e2b_compat import Sandbox
|
|
42
|
+
|
|
43
|
+
sandbox = Sandbox()
|
|
44
|
+
execution = sandbox.run_code("print('hello')")
|
|
45
|
+
print(execution.text) # "hello"
|
|
46
|
+
sandbox.kill()
|
|
47
|
+
```
|
|
48
|
+
|
|
49
|
+
## Features (0.3.0)
|
|
50
|
+
|
|
51
|
+
- **Sandbox lifecycle**: create, connect, list, get_info, kill
|
|
52
|
+
- **Filesystem**: read, write, list, exists, get_info, remove, make_dir, rename
|
|
53
|
+
- **Streaming**: real-time on_stdout/on_stderr callbacks via SSE
|
|
54
|
+
- **Background commands**: CommandHandle with is_running/wait/kill
|
|
55
|
+
- **Cryptographic receipts**: SHA-256 execution chain
|
|
56
|
+
- **E2B compatibility**: drop-in Sandbox replacement
|
|
57
|
+
|
|
58
|
+
## Full API Reference
|
|
59
|
+
|
|
60
|
+
See [cell/CLAUDE.md](../CLAUDE.md) for the complete API surface and architecture.
|
|
61
|
+
|
|
62
|
+
## License
|
|
63
|
+
|
|
64
|
+
MIT
|
|
@@ -0,0 +1,40 @@
|
|
|
1
|
+
[build-system]
|
|
2
|
+
requires = ["setuptools>=68.0", "wheel"]
|
|
3
|
+
build-backend = "setuptools.build_meta"
|
|
4
|
+
|
|
5
|
+
[project]
|
|
6
|
+
name = "synapserun"
|
|
7
|
+
version = "0.3.0"
|
|
8
|
+
description = "Synapse Cell SDK — E2B-compatible sandboxed code execution, 200x faster, with streaming and filesystem support"
|
|
9
|
+
readme = "README.md"
|
|
10
|
+
requires-python = ">=3.9"
|
|
11
|
+
license = "MIT"
|
|
12
|
+
authors = [
|
|
13
|
+
{name = "Freshfield AI", email = "hello@synapserun.dev"},
|
|
14
|
+
]
|
|
15
|
+
classifiers = [
|
|
16
|
+
"Development Status :: 3 - Alpha",
|
|
17
|
+
"Intended Audience :: Developers",
|
|
18
|
+
"Programming Language :: Python :: 3",
|
|
19
|
+
"Programming Language :: Python :: 3.9",
|
|
20
|
+
"Programming Language :: Python :: 3.10",
|
|
21
|
+
"Programming Language :: Python :: 3.11",
|
|
22
|
+
"Programming Language :: Python :: 3.12",
|
|
23
|
+
"Programming Language :: Python :: 3.13",
|
|
24
|
+
"Programming Language :: Python :: 3.14",
|
|
25
|
+
"Topic :: Software Development :: Libraries",
|
|
26
|
+
"Topic :: Software Development :: Testing",
|
|
27
|
+
"Topic :: System :: Emulators",
|
|
28
|
+
]
|
|
29
|
+
|
|
30
|
+
[project.urls]
|
|
31
|
+
Homepage = "https://synapserun.dev"
|
|
32
|
+
Documentation = "https://synapserun.dev/docs"
|
|
33
|
+
Repository = "https://github.com/Freshfield-AI/synapse"
|
|
34
|
+
|
|
35
|
+
[project.scripts]
|
|
36
|
+
synapse = "synapse.cli:main"
|
|
37
|
+
|
|
38
|
+
[tool.setuptools.packages.find]
|
|
39
|
+
include = ["synapse*"]
|
|
40
|
+
exclude = ["js*"]
|
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
from synapse.cell import (
|
|
2
|
+
Cell,
|
|
3
|
+
CellResult,
|
|
4
|
+
CellReceipt,
|
|
5
|
+
CellError,
|
|
6
|
+
EntryInfo,
|
|
7
|
+
SandboxInfo,
|
|
8
|
+
SandboxState,
|
|
9
|
+
SandboxQuery,
|
|
10
|
+
SandboxPaginator,
|
|
11
|
+
CommandHandle,
|
|
12
|
+
)
|
|
13
|
+
from synapse.e2b_compat import Sandbox
|
|
14
|
+
|
|
15
|
+
__all__ = [
|
|
16
|
+
"Cell",
|
|
17
|
+
"CellResult",
|
|
18
|
+
"CellReceipt",
|
|
19
|
+
"CellError",
|
|
20
|
+
"EntryInfo",
|
|
21
|
+
"SandboxInfo",
|
|
22
|
+
"SandboxState",
|
|
23
|
+
"SandboxQuery",
|
|
24
|
+
"SandboxPaginator",
|
|
25
|
+
"CommandHandle",
|
|
26
|
+
"Sandbox",
|
|
27
|
+
]
|
|
28
|
+
__version__ = "0.3.0"
|
|
29
|
+
|