Introducing The Sweep: OX’s New Live Security Research Series
Register Now
Breaking: The 2026 Vulnpocalypse Hits PHP: Four Critical RCEs, but How Dangerous Are They?
Read the Report
Are you exposed? Connect your apps in minutes.
Scan your apps free

bounded-execution

Latest version: v0.1.0a4

Overview

Last scanned
23 Nov 2026
Published
23 Nov 2026
PyPI package Publisher: abhishek2x
0 Stars
0 Forks
3 Versions
196 Downloads
Python Repo language

Scan summary

bounded-execution was last scanned on 23 Nov 2026 at version 0.1.0a4. Risk score 0 of 100. No malicious behavior was detected.

  • Releases: 3 versions, all published within 5 days (19–23 Nov 2026).
  • Findings: No rules fired in version 0.1.0a4.
  • Downloads: 196 downloads.

Versions

3 versions published
Versions and the rules that fired in each
VersionPublishedStatus
0.1.0a4 LATEST 23 Nov 2026 No rules fired
0.1.0a2 19 Nov 2026 No rules fired
0.1.0a1 19 Nov 2026 No rules fired

No rules fired in 0.1.0a4

Findings

Findings for v0.1.0a4. The score is a capped sum of the weights of the rules that fired — not CVSS, not exploitability, and not a probability. It is not comparable across packages with different scan coverage.

The score describes 0.1.0a4; other versions have their own rules, not their own score.

README

The publisher’s own README, as collected from the registry.

bounded-execution

Bounded admission control for Python async, thread, and process execution.

View the package on PyPI.

bounded-execution provides separate synchronous and async APIs that limit how many tasks can be submitted without completing. Python's native executors limit concurrent workers, but ordinary submit() calls can continue to queue work. The library adds in-flight limits and producer backpressure while delegating execution to native executors and asyncio.

The two limits

  • max_workers limits how many tasks execute simultaneously.
  • max_in_flight limits accepted tasks that have not completed, including queued and running tasks. When capacity is exhausted, submit() waits until an accepted task completes, fails, or is cancelled.

Usage

Configure one or both backends explicitly and select a backend for every submission:

from bounded_execution import ExecutionEngine

with ExecutionEngine(
    thread_config={"max_workers": 8, "max_in_flight": 24},
    process_config={"max_workers": 4, "max_in_flight": 12},
) as engine:
    future = engine.submit(calculate, value, backend="process")
    result = future.result()

Each configured mapping contains exactly max_workers and max_in_flight, both positive integers, with max_in_flight >= max_workers. At least one backend configuration is required; there are no implicit worker-count defaults. submit() returns a standard concurrent.futures.Future. The v0.1 API will not include map(), submission timeouts, or a non-blocking submission variant.

Each backend has an independent in-flight limit. The limit controls admission, not task execution speed.

Async usage

Use AsyncExecutionEngine when the caller is running inside an asyncio event loop:

import asyncio
from bounded_execution import AsyncExecutionEngine

async def fetch_item(item_id: int) -> str:
    await asyncio.sleep(0.1)
    return f"item-{item_id}"

async def main() -> None:
    async with AsyncExecutionEngine(
        async_config={"max_in_flight": 3}
    ) as engine:
        futures = [
            await engine.submit(fetch_item, item_id, backend="async")
            for item_id in range(5)
        ]
        for future in futures:
            print(await future)

asyncio.run(main())

backend="async" executes native coroutine functions on the event loop. Use backend="thread" or backend="process" to offload synchronous functions without blocking the event loop. Async capacity is configured with async_config={"max_in_flight": ...}.

Choosing a backend

  • Use threads for blocking I/O and work that spends substantial time waiting.
  • Use processes for CPU-heavy pure-Python work when parallel execution justifies process startup and serialization overhead.

Process tasks and their arguments generally need to be picklable. Define process worker functions at module scope and protect process startup code with if __name__ == "__main__": where required by the platform. process_config can also pass an initializer and initargs to each worker. On Python 3.11 and newer, max_tasks_per_child can recycle workers after a configured number of tasks; worker replacement adds startup overhead and follows the native process-pool start-method rules. See Core concepts and backend selection for more details.

Development setup

Requires Python 3.9 or newer.

python3.9 -m venv .venv
source .venv/bin/activate
python -m pip install --upgrade pip
python -m pip install -r requirements.txt
ruff check .
ruff format --check src tests examples benchmarks
mypy src tests examples benchmarks
pytest

See the runnable thread example, process example, and async example for standalone examples.

Project layout

.
├── docs/                      # Concepts, contracts, benchmarking, and release guides
├── examples/                  # Runnable async, thread, and process examples
├── benchmarks/                # Submission comparison benchmark
├── src/bounded_execution/     # Installable Python package
├── tests/                     # Configuration, backend, and API tests
├── CHANGELOG.md               # Release history
├── MANIFEST.in                # Source distribution contents
└── pyproject.toml             # Packaging and tool configuration

Run python benchmarks/bounded_submission.py --help for benchmark options; see the benchmarking guide for measurement details.

Scope

The initial release is an in-process execution library, not a distributed queue or workflow system. Async scheduling, automatic backend selection, retries, pipelines, rate limiting, and priority scheduling are outside the v0.1 scope.

Distributed under the MIT License; see LICENSE.

Future scope

The following are candidate directions, not implemented features or release commitments:

  1. Async process execution: optionally run coroutines in worker processes. This depends on the async API and should proceed only if there is a demonstrated use case.
  2. Interpreter backend: add support for InterpreterPoolExecutor on Python 3.14 and newer, while keeping it unavailable on older Python versions. This can be developed independently of the async API.
  3. Opt-in retries: consider bounded retry scheduling, backoff, and clear idempotency requirements only after task lifecycle and shutdown behavior are stable.
  4. Hybrid compute-and-persist pipeline: consider an explicit two-stage pipeline that computes in the process backend and persists in the thread or async backend, with separate capacity limits and bounded handoff between stages.
  5. Advanced scheduling and composition: consider scheduling policies or a shared capacity budget only when concrete use cases justify their API and implementation cost.

See the documentation index for the maintained topic guides.

OX Radar and Response Center

Find threats in your stack.

OX Radar can check high-priority threats, like critical package CVEs, against your context.

Each incident is marked Detected or Not Detected with a remediation plan and proof all tracked in the Response Center.

Where it’s listed

The probe returned only these fields for this server — auth requirement, protocol and tool list weren’t observed, so they’re not shown (never guessed).

  • pypi-releases bounded-execution

References

The publisher’s own links, as the registry reports them. These are not sources for the assessment on this page.

Scan your whole stack

Group 1261154050 1
Group 1261154050
 

From OX Research Newsroom

Plug and Pray: Your AI Agents Are Taking Orders From Strangers
Research

Plug and Pray: Your AI Agents Are Taking Orders From Strangers

The 2026 Vulnpocalypse Hits PHP: Four Critical RCEs, but How Dangerous Are They?
Vulnerability Insights

The 2026 Vulnpocalypse Hits PHP: Four Critical RCEs, but How Dangerous Are They?

Critical Apache HTTP Server Flaw Exposes Web Servers to RCE (1)
CVE

CVE-2026-119618: Critical Apache HTTP Server Flaw Exposes Web Servers to Remote Code Execution

Frame 2085668439 (1)
Group 1261154229