Skip to main content

A secure and structured subprocess command executor for Python projects, featuring rich logging, customizable execution parameters, and robust exception handling.

Overview

darca-executor wraps Python’s subprocess with enhanced logging, structured error reporting, and testability. It is designed to work securely in both use_shell=True and use_shell=False modes.

Features

  • Shell and non-shell subprocess support

  • Built-in timeout, working directory, and environment handling

  • Captures stdout/stderr output

  • Integrates with custom Darca logging facility

  • Raises DarcaExecError with detailed metadata on failure

  • 100% test coverage with Pytest

Quick Start

from darca_executor import DarcaExecutor

executor = DarcaExecutor(use_shell=False)
result = executor.run(["echo", "Hello, Darca!"])
print(result.stdout)

Installation

Install dependencies using make and Poetry:

make install

Testing

Run all unit tests and generate a coverage report:

make test

Documentation

Build the documentation with:

make docs

License

This project is licensed under the MIT License.

Badges

Release files for darca-executor 0.1.0

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for darca-executor 0.1.0
File Size Uploaded
darca_executor-0.1.0.tar.gz 3.7 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for darca-executor 0.1.0
File Interpreter ABI Platform
darca_executor-0.1.0-py3-none-any.whl Python 3 none any Details

Total release size: 8.4 kB

Release files / darca_executor-0.1.0.tar.gz

Download URL darca_executor-0.1.0.tar.gz
Size 3.7 kB
Tags Source
SHA-256 checksum
How to use checksums
10fc6978c104f614ac680354c3dd2e14dcc1002e5921b2f88f31277da981575d
BLAKE2b-256 checksum
How to use checksums
bbb9defaa7e94354f9ac4c7beaf0912004bc47f7f35d3e7c15c3a8b10dfbc0fb
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/6.1.0 CPython/3.12.9

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Mar 22, 2025.

Transparency log

Release files / darca_executor-0.1.0-py3-none-any.whl

Download URL darca_executor-0.1.0-py3-none-any.whl
Size 4.7 kB
Tags Python 3
SHA-256 checksum
How to use checksums
868ee4db7f7ae76dc8ddd6d1767ac6bdf0f9ab5f61a9d435a44f11755c99984b
BLAKE2b-256 checksum
How to use checksums
f7b24af01e16d6330a1b9ccabd35357746c43e026fa73c39d0ed53fa78692493
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/6.1.0 CPython/3.12.9

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Mar 22, 2025.

Transparency log

Release history Release notifications | RSS feed

This release

0.1.0 This release

2 release files

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page