Skip to main content

Execution module for reuse along projects..

Project description

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

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

darca_executor-0.1.0.tar.gz (3.7 kB view details)

Uploaded Source

Built Distribution

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

darca_executor-0.1.0-py3-none-any.whl (4.7 kB view details)

Uploaded Python 3

File details

Details for the file darca_executor-0.1.0.tar.gz.

File metadata

  • Download URL: darca_executor-0.1.0.tar.gz
  • Upload date:
  • Size: 3.7 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.12.9

File hashes

Hashes for darca_executor-0.1.0.tar.gz
Algorithm Hash digest
SHA256 10fc6978c104f614ac680354c3dd2e14dcc1002e5921b2f88f31277da981575d
MD5 b991e095b70159c805ae7382510fc37a
BLAKE2b-256 bbb9defaa7e94354f9ac4c7beaf0912004bc47f7f35d3e7c15c3a8b10dfbc0fb

See more details on using hashes here.

Provenance

The following attestation bundles were made for darca_executor-0.1.0.tar.gz:

Publisher: cd.yml on roelkist/darca-executor

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file darca_executor-0.1.0-py3-none-any.whl.

File metadata

  • Download URL: darca_executor-0.1.0-py3-none-any.whl
  • Upload date:
  • Size: 4.7 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.12.9

File hashes

Hashes for darca_executor-0.1.0-py3-none-any.whl
Algorithm Hash digest
SHA256 868ee4db7f7ae76dc8ddd6d1767ac6bdf0f9ab5f61a9d435a44f11755c99984b
MD5 0e50aedee71b73d5dfa6f7dcf35c4fae
BLAKE2b-256 f7b24af01e16d6330a1b9ccabd35357746c43e026fa73c39d0ed53fa78692493

See more details on using hashes here.

Provenance

The following attestation bundles were made for darca_executor-0.1.0-py3-none-any.whl:

Publisher: cd.yml on roelkist/darca-executor

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

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