splime 0.1.2__tar.gz → 0.1.4__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.
- {splime-0.1.2/src/splime.egg-info → splime-0.1.4}/PKG-INFO +6 -6
- {splime-0.1.2 → splime-0.1.4}/README.md +5 -5
- {splime-0.1.2 → splime-0.1.4}/pyproject.toml +29 -1
- splime-0.1.4/src/spl/__init__.py +29 -0
- {splime-0.1.2 → splime-0.1.4}/src/spl/client.py +698 -127
- {splime-0.1.2 → splime-0.1.4}/src/spl/core/__init__.py +1 -0
- {splime-0.1.2 → splime-0.1.4}/src/spl/core/common.py +29 -4
- {splime-0.1.2 → splime-0.1.4}/src/spl/core/entities/artifact.py +0 -1
- {splime-0.1.2 → splime-0.1.4}/src/spl/core/entities/local_function.py +1 -2
- {splime-0.1.2 → splime-0.1.4}/src/spl/core/entities/node_remote.py +30 -0
- {splime-0.1.2 → splime-0.1.4}/src/spl/core/ir/common.py +1 -1
- {splime-0.1.2 → splime-0.1.4}/src/spl/daemon/__main__.py +0 -1
- splime-0.1.4/src/spl/daemon/canonical.py +198 -0
- {splime-0.1.2 → splime-0.1.4}/src/spl/daemon/cli.py +2 -2
- {splime-0.1.2 → splime-0.1.4}/src/spl/daemon/docker_environment.py +0 -3
- {splime-0.1.2 → splime-0.1.4}/src/spl/daemon/docker_pool.py +2 -2
- {splime-0.1.2 → splime-0.1.4}/src/spl/daemon/environment.py +11 -4
- {splime-0.1.2 → splime-0.1.4}/src/spl/daemon/environment_base.py +1 -2
- {splime-0.1.2 → splime-0.1.4}/src/spl/daemon/heartbeat_service.py +1 -1
- {splime-0.1.2 → splime-0.1.4}/src/spl/daemon/metadata.py +0 -1
- {splime-0.1.2 → splime-0.1.4}/src/spl/daemon/remote_client.py +1 -2
- {splime-0.1.2 → splime-0.1.4}/src/spl/daemon/repositories/env.py +4 -11
- {splime-0.1.2 → splime-0.1.4}/src/spl/daemon/repositories/library.py +1 -13
- splime-0.1.4/src/spl/daemon/repositories/object.py +1988 -0
- {splime-0.1.2 → splime-0.1.4}/src/spl/daemon/repositories/run.py +1 -9
- {splime-0.1.2 → splime-0.1.4}/src/spl/daemon/repositories/server_connection.py +1 -10
- {splime-0.1.2 → splime-0.1.4}/src/spl/daemon/repositories/sync_event.py +1 -13
- {splime-0.1.2 → splime-0.1.4}/src/spl/daemon/routes/_helpers.py +7 -1
- {splime-0.1.2 → splime-0.1.4}/src/spl/daemon/routes/envs.py +1 -1
- {splime-0.1.2 → splime-0.1.4}/src/spl/daemon/routes/objects.py +59 -2
- {splime-0.1.2 → splime-0.1.4}/src/spl/daemon/runtime_backend.py +0 -1
- {splime-0.1.2 → splime-0.1.4}/src/spl/daemon/runtime_config.py +0 -1
- {splime-0.1.2 → splime-0.1.4}/src/spl/daemon/secret_store.py +0 -1
- {splime-0.1.2 → splime-0.1.4}/src/spl/daemon/server.py +415 -44
- splime-0.1.4/src/spl/daemon/storage_base.py +1366 -0
- {splime-0.1.2 → splime-0.1.4}/src/spl/daemon/store.py +140 -6
- {splime-0.1.2 → splime-0.1.4}/src/spl/daemon/worker.py +3 -4
- {splime-0.1.2 → splime-0.1.4}/src/spl/daemon_client.py +105 -15
- {splime-0.1.2 → splime-0.1.4}/src/spl/pipeline_widget.py +0 -1
- {splime-0.1.2 → splime-0.1.4}/src/spl/server_client.py +5 -7
- {splime-0.1.2 → splime-0.1.4/src/splime.egg-info}/PKG-INFO +6 -6
- {splime-0.1.2 → splime-0.1.4}/src/splime.egg-info/SOURCES.txt +1 -0
- splime-0.1.2/src/spl/__init__.py +0 -14
- splime-0.1.2/src/spl/daemon/repositories/object.py +0 -997
- splime-0.1.2/src/spl/daemon/storage_base.py +0 -542
- {splime-0.1.2 → splime-0.1.4}/LICENSE +0 -0
- {splime-0.1.2 → splime-0.1.4}/NOTICE +0 -0
- {splime-0.1.2 → splime-0.1.4}/setup.cfg +0 -0
- {splime-0.1.2 → splime-0.1.4}/src/spl/core/entities/__init__.py +0 -0
- {splime-0.1.2 → splime-0.1.4}/src/spl/core/entities/adapter.py +0 -0
- {splime-0.1.2 → splime-0.1.4}/src/spl/core/entities/control.py +0 -0
- {splime-0.1.2 → splime-0.1.4}/src/spl/core/entities/distribution.py +0 -0
- {splime-0.1.2 → splime-0.1.4}/src/spl/core/entities/function.py +0 -0
- {splime-0.1.2 → splime-0.1.4}/src/spl/core/entities/misc.py +0 -0
- {splime-0.1.2 → splime-0.1.4}/src/spl/core/entities/module.py +0 -0
- {splime-0.1.2 → splime-0.1.4}/src/spl/core/entities/node.py +0 -0
- {splime-0.1.2 → splime-0.1.4}/src/spl/core/entities/node_function.py +0 -0
- {splime-0.1.2 → splime-0.1.4}/src/spl/core/entities/pipeline.py +0 -0
- {splime-0.1.2 → splime-0.1.4}/src/spl/core/entities/scalar.py +0 -0
- {splime-0.1.2 → splime-0.1.4}/src/spl/core/ir/__init__.py +0 -0
- {splime-0.1.2 → splime-0.1.4}/src/spl/core/ir/parse.py +0 -0
- {splime-0.1.2 → splime-0.1.4}/src/spl/core/ir/unparse.py +0 -0
- {splime-0.1.2 → splime-0.1.4}/src/spl/core/ir/utils.py +0 -0
- {splime-0.1.2 → splime-0.1.4}/src/spl/daemon/__init__.py +0 -0
- {splime-0.1.2 → splime-0.1.4}/src/spl/daemon/client.py +2 -2
- {splime-0.1.2 → splime-0.1.4}/src/spl/daemon/repositories/__init__.py +0 -0
- {splime-0.1.2 → splime-0.1.4}/src/spl/daemon/routes/__init__.py +0 -0
- {splime-0.1.2 → splime-0.1.4}/src/spl/daemon/routes/artifacts.py +0 -0
- {splime-0.1.2 → splime-0.1.4}/src/spl/daemon/routes/diagnostics.py +0 -0
- {splime-0.1.2 → splime-0.1.4}/src/spl/daemon/routes/libraries.py +0 -0
- {splime-0.1.2 → splime-0.1.4}/src/spl/daemon/routes/remote.py +0 -0
- {splime-0.1.2 → splime-0.1.4}/src/spl/daemon/routes/runs.py +0 -0
- {splime-0.1.2 → splime-0.1.4}/src/spl/daemon/routes/server_connections.py +0 -0
- {splime-0.1.2 → splime-0.1.4}/src/spl/daemon/runtime_dependencies.py +0 -0
- {splime-0.1.2 → splime-0.1.4}/src/spl/daemon/server_connection.py +0 -0
- {splime-0.1.2 → splime-0.1.4}/src/spl/daemon/services/__init__.py +0 -0
- {splime-0.1.2 → splime-0.1.4}/src/spl/daemon/services/sync.py +0 -0
- {splime-0.1.2 → splime-0.1.4}/src/spl/daemon/signature.py +0 -0
- {splime-0.1.2 → splime-0.1.4}/src/spl/py.typed +0 -0
- {splime-0.1.2 → splime-0.1.4}/src/splime.egg-info/dependency_links.txt +0 -0
- {splime-0.1.2 → splime-0.1.4}/src/splime.egg-info/entry_points.txt +0 -0
- {splime-0.1.2 → splime-0.1.4}/src/splime.egg-info/requires.txt +0 -0
- {splime-0.1.2 → splime-0.1.4}/src/splime.egg-info/top_level.txt +0 -0
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.4
|
|
2
2
|
Name: splime
|
|
3
|
-
Version: 0.1.
|
|
3
|
+
Version: 0.1.4
|
|
4
4
|
Summary: Reuse Python functions across projects without rewriting or redeploying them.
|
|
5
5
|
Author-email: Yastrebov Kirill <yastrebovks@gmail.com>
|
|
6
6
|
License-Expression: Apache-2.0
|
|
@@ -94,7 +94,7 @@ spl-daemon serve # listens on http://127.0.0.1:8765 by default
|
|
|
94
94
|
contacts a server:
|
|
95
95
|
|
|
96
96
|
```python
|
|
97
|
-
from spl
|
|
97
|
+
from spl import SPLClient
|
|
98
98
|
|
|
99
99
|
def daily_total(date: str) -> float:
|
|
100
100
|
prices = {"2026-06-08": [11.0, 6.5, 24.5]}
|
|
@@ -104,8 +104,8 @@ client = SPLClient() # local-first; no server contact
|
|
|
104
104
|
client.publish(daily_total, name="daily_total")
|
|
105
105
|
|
|
106
106
|
result = client.call("daily_total", kwargs={"date": "2026-06-08"})
|
|
107
|
-
print(result.mode)
|
|
108
|
-
print(result.
|
|
107
|
+
print(result.mode) # "local"
|
|
108
|
+
print(result.output) # 42.0 (unwrapped value; result.value keeps the raw port dict)
|
|
109
109
|
```
|
|
110
110
|
|
|
111
111
|
That is the whole loop: define a function, `publish` it as a versioned node, then `call`
|
|
@@ -137,11 +137,11 @@ Libraries group versioned objects and control who can see and run them. Creating
|
|
|
137
137
|
curating libraries uses a server-connected client:
|
|
138
138
|
|
|
139
139
|
```python
|
|
140
|
-
client.
|
|
140
|
+
client.library.create("risk", display_name="Risk", visibility="private")
|
|
141
141
|
client.publish(risk_score, name="risk_score", library="risk")
|
|
142
142
|
|
|
143
143
|
# Grant scoped access to a teammate
|
|
144
|
-
client.
|
|
144
|
+
client.library.grant("risk", "analyst1", scopes=["metadata:read", "objects:read", "execute"])
|
|
145
145
|
```
|
|
146
146
|
|
|
147
147
|
A library can also reference a live object from another library (`add_reference`, follows
|
|
@@ -42,7 +42,7 @@ spl-daemon serve # listens on http://127.0.0.1:8765 by default
|
|
|
42
42
|
contacts a server:
|
|
43
43
|
|
|
44
44
|
```python
|
|
45
|
-
from spl
|
|
45
|
+
from spl import SPLClient
|
|
46
46
|
|
|
47
47
|
def daily_total(date: str) -> float:
|
|
48
48
|
prices = {"2026-06-08": [11.0, 6.5, 24.5]}
|
|
@@ -52,8 +52,8 @@ client = SPLClient() # local-first; no server contact
|
|
|
52
52
|
client.publish(daily_total, name="daily_total")
|
|
53
53
|
|
|
54
54
|
result = client.call("daily_total", kwargs={"date": "2026-06-08"})
|
|
55
|
-
print(result.mode)
|
|
56
|
-
print(result.
|
|
55
|
+
print(result.mode) # "local"
|
|
56
|
+
print(result.output) # 42.0 (unwrapped value; result.value keeps the raw port dict)
|
|
57
57
|
```
|
|
58
58
|
|
|
59
59
|
That is the whole loop: define a function, `publish` it as a versioned node, then `call`
|
|
@@ -85,11 +85,11 @@ Libraries group versioned objects and control who can see and run them. Creating
|
|
|
85
85
|
curating libraries uses a server-connected client:
|
|
86
86
|
|
|
87
87
|
```python
|
|
88
|
-
client.
|
|
88
|
+
client.library.create("risk", display_name="Risk", visibility="private")
|
|
89
89
|
client.publish(risk_score, name="risk_score", library="risk")
|
|
90
90
|
|
|
91
91
|
# Grant scoped access to a teammate
|
|
92
|
-
client.
|
|
92
|
+
client.library.grant("risk", "analyst1", scopes=["metadata:read", "objects:read", "execute"])
|
|
93
93
|
```
|
|
94
94
|
|
|
95
95
|
A library can also reference a live object from another library (`add_reference`, follows
|
|
@@ -4,7 +4,7 @@ build-backend = "setuptools.build_meta"
|
|
|
4
4
|
|
|
5
5
|
[project]
|
|
6
6
|
name = "splime"
|
|
7
|
-
version = "0.1.
|
|
7
|
+
version = "0.1.4"
|
|
8
8
|
|
|
9
9
|
description = "Reuse Python functions across projects without rewriting or redeploying them."
|
|
10
10
|
readme = "README.md"
|
|
@@ -107,9 +107,37 @@ line-length = 120
|
|
|
107
107
|
select = []
|
|
108
108
|
ignore = []
|
|
109
109
|
|
|
110
|
+
# Scoped, justified allowances. These silence rules only where the pattern is
|
|
111
|
+
# legitimate for this code (infrastructure/daemon), not project-wide.
|
|
112
|
+
[tool.ruff.lint.per-file-ignores]
|
|
113
|
+
# pkgutil.extend_path runs before the package re-exports its public API,
|
|
114
|
+
# so the public imports intentionally sit below that call.
|
|
115
|
+
"src/spl/__init__.py" = ["E402"]
|
|
116
|
+
# The daemon is infrastructure: it spawns the interpreter/docker to build
|
|
117
|
+
# environments and run workers (S603/S607), opens controlled URLs (S310),
|
|
118
|
+
# binds its serve socket (S104), uses container-local /tmp (S108), builds SQL
|
|
119
|
+
# from fixed non-user identifiers (S608), keeps sentinel/env-name constants
|
|
120
|
+
# (S105), wraps transport errors without chaining (B904), does best-effort
|
|
121
|
+
# cleanup in except blocks (S110/S112), and names one internal control-flow
|
|
122
|
+
# signal (N818).
|
|
123
|
+
"src/spl/daemon/**" = [
|
|
124
|
+
"S603", "S607", "S310", "S104", "S108", "S608",
|
|
125
|
+
"S105", "B904", "S110", "S112", "N818",
|
|
126
|
+
]
|
|
127
|
+
# The CLI and daemon bootstrap print to the console on purpose.
|
|
128
|
+
"src/spl/daemon/cli.py" = ["T201"]
|
|
129
|
+
"src/spl/daemon/server.py" = ["T201"]
|
|
130
|
+
# Top-level HTTP clients use urllib against controlled endpoints and wrap
|
|
131
|
+
# transport errors into their own exception types.
|
|
132
|
+
"src/spl/daemon_client.py" = ["S310", "S110", "B904", "S105"]
|
|
133
|
+
"src/spl/server_client.py" = ["S310", "B904"]
|
|
134
|
+
# The notebook pipeline widget embeds long HTML/JS/CSS template lines.
|
|
135
|
+
"src/spl/pipeline_widget.py" = ["E501"]
|
|
136
|
+
|
|
110
137
|
|
|
111
138
|
[tool.pytest.ini_options]
|
|
112
139
|
addopts = "-raq --strict-markers"
|
|
140
|
+
pythonpath = ["src"]
|
|
113
141
|
|
|
114
142
|
python_files = ["test_*.py", "tests.py"]
|
|
115
143
|
testpaths = ["tests"]
|
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
from __future__ import annotations
|
|
2
|
+
|
|
3
|
+
__path__ = __import__("pkgutil").extend_path(__path__, __name__)
|
|
4
|
+
|
|
5
|
+
from spl.client import PublishedObject, RemoteResult, RemoteRun, SPLClient
|
|
6
|
+
from spl.core import spl_export_to_dir, spl_export_to_file, spl_import_from_file
|
|
7
|
+
from spl.core.common import Deployment, lift
|
|
8
|
+
from spl.core.entities.distribution import DDistribution
|
|
9
|
+
from spl.core.entities.node import DEFAULT_PORT, InputPort, OutputPort
|
|
10
|
+
from spl.core.entities.node_remote import NodeRemote
|
|
11
|
+
from spl.server_client import SPLServerClient
|
|
12
|
+
|
|
13
|
+
__all__ = [
|
|
14
|
+
"SPLClient",
|
|
15
|
+
"SPLServerClient",
|
|
16
|
+
"RemoteRun",
|
|
17
|
+
"RemoteResult",
|
|
18
|
+
"PublishedObject",
|
|
19
|
+
"NodeRemote",
|
|
20
|
+
"lift",
|
|
21
|
+
"Deployment",
|
|
22
|
+
"DEFAULT_PORT",
|
|
23
|
+
"InputPort",
|
|
24
|
+
"OutputPort",
|
|
25
|
+
"DDistribution",
|
|
26
|
+
"spl_export_to_file",
|
|
27
|
+
"spl_export_to_dir",
|
|
28
|
+
"spl_import_from_file",
|
|
29
|
+
]
|