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.
Files changed (83) hide show
  1. {splime-0.1.2/src/splime.egg-info → splime-0.1.4}/PKG-INFO +6 -6
  2. {splime-0.1.2 → splime-0.1.4}/README.md +5 -5
  3. {splime-0.1.2 → splime-0.1.4}/pyproject.toml +29 -1
  4. splime-0.1.4/src/spl/__init__.py +29 -0
  5. {splime-0.1.2 → splime-0.1.4}/src/spl/client.py +698 -127
  6. {splime-0.1.2 → splime-0.1.4}/src/spl/core/__init__.py +1 -0
  7. {splime-0.1.2 → splime-0.1.4}/src/spl/core/common.py +29 -4
  8. {splime-0.1.2 → splime-0.1.4}/src/spl/core/entities/artifact.py +0 -1
  9. {splime-0.1.2 → splime-0.1.4}/src/spl/core/entities/local_function.py +1 -2
  10. {splime-0.1.2 → splime-0.1.4}/src/spl/core/entities/node_remote.py +30 -0
  11. {splime-0.1.2 → splime-0.1.4}/src/spl/core/ir/common.py +1 -1
  12. {splime-0.1.2 → splime-0.1.4}/src/spl/daemon/__main__.py +0 -1
  13. splime-0.1.4/src/spl/daemon/canonical.py +198 -0
  14. {splime-0.1.2 → splime-0.1.4}/src/spl/daemon/cli.py +2 -2
  15. {splime-0.1.2 → splime-0.1.4}/src/spl/daemon/docker_environment.py +0 -3
  16. {splime-0.1.2 → splime-0.1.4}/src/spl/daemon/docker_pool.py +2 -2
  17. {splime-0.1.2 → splime-0.1.4}/src/spl/daemon/environment.py +11 -4
  18. {splime-0.1.2 → splime-0.1.4}/src/spl/daemon/environment_base.py +1 -2
  19. {splime-0.1.2 → splime-0.1.4}/src/spl/daemon/heartbeat_service.py +1 -1
  20. {splime-0.1.2 → splime-0.1.4}/src/spl/daemon/metadata.py +0 -1
  21. {splime-0.1.2 → splime-0.1.4}/src/spl/daemon/remote_client.py +1 -2
  22. {splime-0.1.2 → splime-0.1.4}/src/spl/daemon/repositories/env.py +4 -11
  23. {splime-0.1.2 → splime-0.1.4}/src/spl/daemon/repositories/library.py +1 -13
  24. splime-0.1.4/src/spl/daemon/repositories/object.py +1988 -0
  25. {splime-0.1.2 → splime-0.1.4}/src/spl/daemon/repositories/run.py +1 -9
  26. {splime-0.1.2 → splime-0.1.4}/src/spl/daemon/repositories/server_connection.py +1 -10
  27. {splime-0.1.2 → splime-0.1.4}/src/spl/daemon/repositories/sync_event.py +1 -13
  28. {splime-0.1.2 → splime-0.1.4}/src/spl/daemon/routes/_helpers.py +7 -1
  29. {splime-0.1.2 → splime-0.1.4}/src/spl/daemon/routes/envs.py +1 -1
  30. {splime-0.1.2 → splime-0.1.4}/src/spl/daemon/routes/objects.py +59 -2
  31. {splime-0.1.2 → splime-0.1.4}/src/spl/daemon/runtime_backend.py +0 -1
  32. {splime-0.1.2 → splime-0.1.4}/src/spl/daemon/runtime_config.py +0 -1
  33. {splime-0.1.2 → splime-0.1.4}/src/spl/daemon/secret_store.py +0 -1
  34. {splime-0.1.2 → splime-0.1.4}/src/spl/daemon/server.py +415 -44
  35. splime-0.1.4/src/spl/daemon/storage_base.py +1366 -0
  36. {splime-0.1.2 → splime-0.1.4}/src/spl/daemon/store.py +140 -6
  37. {splime-0.1.2 → splime-0.1.4}/src/spl/daemon/worker.py +3 -4
  38. {splime-0.1.2 → splime-0.1.4}/src/spl/daemon_client.py +105 -15
  39. {splime-0.1.2 → splime-0.1.4}/src/spl/pipeline_widget.py +0 -1
  40. {splime-0.1.2 → splime-0.1.4}/src/spl/server_client.py +5 -7
  41. {splime-0.1.2 → splime-0.1.4/src/splime.egg-info}/PKG-INFO +6 -6
  42. {splime-0.1.2 → splime-0.1.4}/src/splime.egg-info/SOURCES.txt +1 -0
  43. splime-0.1.2/src/spl/__init__.py +0 -14
  44. splime-0.1.2/src/spl/daemon/repositories/object.py +0 -997
  45. splime-0.1.2/src/spl/daemon/storage_base.py +0 -542
  46. {splime-0.1.2 → splime-0.1.4}/LICENSE +0 -0
  47. {splime-0.1.2 → splime-0.1.4}/NOTICE +0 -0
  48. {splime-0.1.2 → splime-0.1.4}/setup.cfg +0 -0
  49. {splime-0.1.2 → splime-0.1.4}/src/spl/core/entities/__init__.py +0 -0
  50. {splime-0.1.2 → splime-0.1.4}/src/spl/core/entities/adapter.py +0 -0
  51. {splime-0.1.2 → splime-0.1.4}/src/spl/core/entities/control.py +0 -0
  52. {splime-0.1.2 → splime-0.1.4}/src/spl/core/entities/distribution.py +0 -0
  53. {splime-0.1.2 → splime-0.1.4}/src/spl/core/entities/function.py +0 -0
  54. {splime-0.1.2 → splime-0.1.4}/src/spl/core/entities/misc.py +0 -0
  55. {splime-0.1.2 → splime-0.1.4}/src/spl/core/entities/module.py +0 -0
  56. {splime-0.1.2 → splime-0.1.4}/src/spl/core/entities/node.py +0 -0
  57. {splime-0.1.2 → splime-0.1.4}/src/spl/core/entities/node_function.py +0 -0
  58. {splime-0.1.2 → splime-0.1.4}/src/spl/core/entities/pipeline.py +0 -0
  59. {splime-0.1.2 → splime-0.1.4}/src/spl/core/entities/scalar.py +0 -0
  60. {splime-0.1.2 → splime-0.1.4}/src/spl/core/ir/__init__.py +0 -0
  61. {splime-0.1.2 → splime-0.1.4}/src/spl/core/ir/parse.py +0 -0
  62. {splime-0.1.2 → splime-0.1.4}/src/spl/core/ir/unparse.py +0 -0
  63. {splime-0.1.2 → splime-0.1.4}/src/spl/core/ir/utils.py +0 -0
  64. {splime-0.1.2 → splime-0.1.4}/src/spl/daemon/__init__.py +0 -0
  65. {splime-0.1.2 → splime-0.1.4}/src/spl/daemon/client.py +2 -2
  66. {splime-0.1.2 → splime-0.1.4}/src/spl/daemon/repositories/__init__.py +0 -0
  67. {splime-0.1.2 → splime-0.1.4}/src/spl/daemon/routes/__init__.py +0 -0
  68. {splime-0.1.2 → splime-0.1.4}/src/spl/daemon/routes/artifacts.py +0 -0
  69. {splime-0.1.2 → splime-0.1.4}/src/spl/daemon/routes/diagnostics.py +0 -0
  70. {splime-0.1.2 → splime-0.1.4}/src/spl/daemon/routes/libraries.py +0 -0
  71. {splime-0.1.2 → splime-0.1.4}/src/spl/daemon/routes/remote.py +0 -0
  72. {splime-0.1.2 → splime-0.1.4}/src/spl/daemon/routes/runs.py +0 -0
  73. {splime-0.1.2 → splime-0.1.4}/src/spl/daemon/routes/server_connections.py +0 -0
  74. {splime-0.1.2 → splime-0.1.4}/src/spl/daemon/runtime_dependencies.py +0 -0
  75. {splime-0.1.2 → splime-0.1.4}/src/spl/daemon/server_connection.py +0 -0
  76. {splime-0.1.2 → splime-0.1.4}/src/spl/daemon/services/__init__.py +0 -0
  77. {splime-0.1.2 → splime-0.1.4}/src/spl/daemon/services/sync.py +0 -0
  78. {splime-0.1.2 → splime-0.1.4}/src/spl/daemon/signature.py +0 -0
  79. {splime-0.1.2 → splime-0.1.4}/src/spl/py.typed +0 -0
  80. {splime-0.1.2 → splime-0.1.4}/src/splime.egg-info/dependency_links.txt +0 -0
  81. {splime-0.1.2 → splime-0.1.4}/src/splime.egg-info/entry_points.txt +0 -0
  82. {splime-0.1.2 → splime-0.1.4}/src/splime.egg-info/requires.txt +0 -0
  83. {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.2
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.client import SPLClient
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) # "local"
108
- print(result.value) # 42.0
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.create_library("risk", display_name="Risk", visibility="private")
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.grant_library("risk", "analyst1", scopes=["metadata:read", "objects:read", "execute"])
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.client import SPLClient
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) # "local"
56
- print(result.value) # 42.0
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.create_library("risk", display_name="Risk", visibility="private")
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.grant_library("risk", "analyst1", scopes=["metadata:read", "objects:read", "execute"])
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.2"
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
+ ]