Skip to main content

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 .exe artifacts 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") accepts python, pyinstaller, nuitka, or auto.

Examples

Several ready-to-run examples are available in the examples folder:

Testing

Run the test suite with:

pytest -q

Project structure

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

procyl-0.1.1.tar.gz (8.4 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

procyl-0.1.1-py3-none-any.whl (7.5 kB view details)

Uploaded Python 3

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

Hashes for procyl-0.1.1.tar.gz
Algorithm Hash digest
SHA256 77dec7b27745af52055a1534cc2eb4f96d6c5fc7c512be9c9cc2b73e001c17f6
MD5 0b79a95d6813569bc3952db41ba0835f
BLAKE2b-256 dfb62dcc130095c9d092dc76468877285eb65e4578746b620b2cb86db70b3256

See more details on using hashes here.

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

Hashes for procyl-0.1.1-py3-none-any.whl
Algorithm Hash digest
SHA256 a7106bde41f34fb759c38fd8db871d7ff4f941548d03d9bac7f245a67eeeb7f0
MD5 b93d6ad846acad0fac49869566323065
BLAKE2b-256 8bdc5b67d20b9ad94514894637147035cc55eaef84c4bedf037c904dc3c476c2

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page