procyl 0.1.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.
@@ -0,0 +1,21 @@
1
+ MIT License
2
+
3
+ Copyright (c) 2026 yolezz
4
+
5
+ Permission is hereby granted, free of charge, to any person obtaining a copy
6
+ of this software and associated documentation files (the "Software"), to deal
7
+ in the Software without restriction, including without limitation the rights
8
+ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9
+ copies of the Software, and to permit persons to whom the Software is
10
+ furnished to do so, subject to the following conditions:
11
+
12
+ The above copyright notice and this permission notice shall be included in all
13
+ copies or substantial portions of the Software.
14
+
15
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17
+ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18
+ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19
+ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20
+ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21
+ SOFTWARE.
procyl-0.1.0/PKG-INFO ADDED
@@ -0,0 +1,27 @@
1
+ Metadata-Version: 2.4
2
+ Name: procyl
3
+ Version: 0.1.0
4
+ Summary: Lightweight Python execution layer for managing isolated workers as named tasks
5
+ Author: yolezz
6
+ License: MIT
7
+ Project-URL: Homepage, https://github.com/yo-le-zz/Procyl
8
+ Project-URL: Source, https://github.com/yo-le-zz/Procyl
9
+ Requires-Python: >=3.10
10
+ Description-Content-Type: text/markdown
11
+ License-File: LICENSE.txt
12
+ Dynamic: license-file
13
+
14
+ # Procyl
15
+
16
+ Procyl is a lightweight Python execution layer for managing isolated workers as named tasks. It allows defining and running Python code snippets as independent units using a simple API, with output captured through subprocess execution.
17
+
18
+ ## Example
19
+
20
+ ```python
21
+ import procyl
22
+
23
+ procyl.create("hello", """
24
+ print("Hello World")
25
+ """)
26
+
27
+ print(procyl.run("hello"))
procyl-0.1.0/README.md ADDED
@@ -0,0 +1,14 @@
1
+ # Procyl
2
+
3
+ Procyl is a lightweight Python execution layer for managing isolated workers as named tasks. It allows defining and running Python code snippets as independent units using a simple API, with output captured through subprocess execution.
4
+
5
+ ## Example
6
+
7
+ ```python
8
+ import procyl
9
+
10
+ procyl.create("hello", """
11
+ print("Hello World")
12
+ """)
13
+
14
+ print(procyl.run("hello"))
@@ -0,0 +1,25 @@
1
+ [project]
2
+ name = "procyl"
3
+ version = "0.1.0"
4
+ description = "Lightweight Python execution layer for managing isolated workers as named tasks"
5
+ readme = "README.md"
6
+ requires-python = ">=3.10"
7
+ license = { text = "MIT" }
8
+ authors = [
9
+ { name = "yolezz" }
10
+ ]
11
+
12
+
13
+ dependencies = []
14
+
15
+
16
+ [project.urls]
17
+ "Homepage" = "https://github.com/yo-le-zz/Procyl"
18
+ "Source" = "https://github.com/yo-le-zz/Procyl"
19
+
20
+ [project.scripts]
21
+ procyl = "procyl.cli:main"
22
+
23
+ [build-system]
24
+ requires = ["setuptools>=68"]
25
+ build-backend = "setuptools.build_meta"
procyl-0.1.0/setup.cfg ADDED
@@ -0,0 +1,4 @@
1
+ [egg_info]
2
+ tag_build =
3
+ tag_date = 0
4
+
@@ -0,0 +1 @@
1
+ from .core import create, run, status, delete
@@ -0,0 +1,17 @@
1
+ from .runner import run_code
2
+
3
+ _workers = {}
4
+
5
+ def create(name: str, code: str):
6
+ _workers[name] = code
7
+
8
+ def run(name: str):
9
+ if name not in _workers:
10
+ raise ValueError(f"Worker '{name}' not found")
11
+ return run_code(_workers[name])
12
+
13
+ def status(name: str):
14
+ return "exists" if name in _workers else "missing"
15
+
16
+ def delete(name: str):
17
+ _workers.pop(name, None)
@@ -0,0 +1,18 @@
1
+ import subprocess
2
+ import tempfile
3
+ import os
4
+
5
+ def run_code(code: str):
6
+ with tempfile.NamedTemporaryFile("w", suffix=".py", delete=False) as f:
7
+ f.write(code)
8
+ path = f.name
9
+
10
+ try:
11
+ result = subprocess.run(
12
+ ["python", path],
13
+ capture_output=True,
14
+ text=True
15
+ )
16
+ return result.stdout + result.stderr
17
+ finally:
18
+ os.remove(path)
File without changes
File without changes
@@ -0,0 +1,27 @@
1
+ Metadata-Version: 2.4
2
+ Name: procyl
3
+ Version: 0.1.0
4
+ Summary: Lightweight Python execution layer for managing isolated workers as named tasks
5
+ Author: yolezz
6
+ License: MIT
7
+ Project-URL: Homepage, https://github.com/yo-le-zz/Procyl
8
+ Project-URL: Source, https://github.com/yo-le-zz/Procyl
9
+ Requires-Python: >=3.10
10
+ Description-Content-Type: text/markdown
11
+ License-File: LICENSE.txt
12
+ Dynamic: license-file
13
+
14
+ # Procyl
15
+
16
+ Procyl is a lightweight Python execution layer for managing isolated workers as named tasks. It allows defining and running Python code snippets as independent units using a simple API, with output captured through subprocess execution.
17
+
18
+ ## Example
19
+
20
+ ```python
21
+ import procyl
22
+
23
+ procyl.create("hello", """
24
+ print("Hello World")
25
+ """)
26
+
27
+ print(procyl.run("hello"))
@@ -0,0 +1,14 @@
1
+ LICENSE.txt
2
+ README.md
3
+ pyproject.toml
4
+ src/procyl/__init__.py
5
+ src/procyl/core.py
6
+ src/procyl/runner.py
7
+ src/procyl/utils.py
8
+ src/procyl/worker.py
9
+ src/procyl.egg-info/PKG-INFO
10
+ src/procyl.egg-info/SOURCES.txt
11
+ src/procyl.egg-info/dependency_links.txt
12
+ src/procyl.egg-info/entry_points.txt
13
+ src/procyl.egg-info/top_level.txt
14
+ tests/test_core.py
@@ -0,0 +1,2 @@
1
+ [console_scripts]
2
+ procyl = procyl.cli:main
@@ -0,0 +1 @@
1
+ procyl
@@ -0,0 +1,16 @@
1
+ import procyl
2
+
3
+ def test_create_and_run():
4
+ procyl.create("t1", "print('ok')")
5
+ output = procyl.run("t1")
6
+ assert "ok" in output
7
+
8
+ def test_status():
9
+ procyl.create("t2", "print('x')")
10
+ assert procyl.status("t2") == "exists"
11
+ assert procyl.status("fake") == "missing"
12
+
13
+ def test_delete():
14
+ procyl.create("t3", "print('x')")
15
+ procyl.delete("t3")
16
+ assert procyl.status("t3") == "missing"