A lightweight worker system for creating, compiling, running, and managing Python-based processes
Project description
Procyl
Procyl is a lightweight Python worker system for creating, compiling, running, and managing small executable processes from Python code. It is designed for developers who want a simple API for building and launching workers with optional compilation, timeouts, cleanup rules, and progress tracking.
Created by yo-le-zz.
Features
- Create named workers with Python code, optional icon, arguments and compiler preferences
- Run workers directly from temporary Python files
- Precompile workers into persistent
.exeartifacts with PyInstaller or Nuitka - Runtime compile workers on-the-fly for one-shot execution
- Configure timeouts so a process is stopped if it hangs
- Automatically delete generated artifacts after a chosen delay
- Track compilation progress through the worker status
- Run multiple workers in parallel and compile several workers in threads
Installation
pip install .
To install optional compile backends:
pip install .[compile]
Quick start
import procyl
procyl.create(
"hello",
'print("Hello from Procyl")',
icon="hello.png",
args=["--demo"],
timeout_seconds=5,
auto_delete_after=30,
)
print(procyl.run("hello"))
print(procyl.status("hello"))
procyl.precompile("hello", output_dir="./dist", compiler="pyinstaller")
procyl.delete("hello")
Core API
create(name, code, icon=None, args=None, compiler="auto", output_dir=None, timeout_seconds=None, auto_delete_after=None, compile_args=None)run(name, args=None)precompile(name, output_dir=None, compiler=None, thread=False)runtime_compile(name, compiler=None)status(name)delete(name)
Compilation modes
precompile(...)keeps a build artifact on disk.runtime_compile(...)compiles and runs once, then uses temporary files for the build.create(..., compiler="auto")acceptspython,pyinstaller,nuitka, orauto.
Examples
Several ready-to-run examples are available in the examples folder:
- examples/demo.py
- examples/threaded_compile.py
- examples/runtime_worker.py
- examples/parallel_workers.py
Testing
Run the test suite with:
pytest -q
Project structure
- src/procyl/core.py for the public API
- src/procyl/worker.py for worker state and compilation logic
- src/procyl/runner.py for subprocess execution and cleanup
- tests for regression tests
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file procyl-0.1.1.tar.gz.
File metadata
- Download URL: procyl-0.1.1.tar.gz
- Upload date:
- Size: 8.4 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: uv/0.11.21 {"installer":{"name":"uv","version":"0.11.21","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Ubuntu","version":"26.04","id":"resolute","libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":null}
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
77dec7b27745af52055a1534cc2eb4f96d6c5fc7c512be9c9cc2b73e001c17f6
|
|
| MD5 |
0b79a95d6813569bc3952db41ba0835f
|
|
| BLAKE2b-256 |
dfb62dcc130095c9d092dc76468877285eb65e4578746b620b2cb86db70b3256
|
File details
Details for the file procyl-0.1.1-py3-none-any.whl.
File metadata
- Download URL: procyl-0.1.1-py3-none-any.whl
- Upload date:
- Size: 7.5 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: uv/0.11.21 {"installer":{"name":"uv","version":"0.11.21","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Ubuntu","version":"26.04","id":"resolute","libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":null}
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
a7106bde41f34fb759c38fd8db871d7ff4f941548d03d9bac7f245a67eeeb7f0
|
|
| MD5 |
b93d6ad846acad0fac49869566323065
|
|
| BLAKE2b-256 |
8bdc5b67d20b9ad94514894637147035cc55eaef84c4bedf037c904dc3c476c2
|