Skip to main content

Run lightweight local workflows

Project description

Dyngle

Run lightweight local workflows

Dyngle is a simple workflow runner that executes sequences of commands defined in configuration files. It's like a lightweight combination of Make and a task runner, designed for automating common development and operational tasks.

Basic usage

Create a configuration file (e.g., .dyngle.yml) with your workflows:

dyngle:
  operations:
    build:
      - python -m pip install -e .
      - python -m pytest
    deploy:
      - docker build -t myapp .
      - docker push myapp
    clean:
      - rm -rf __pycache__
      - rm -rf .pytest_cache

Run an operation:

dyngle run build

Configuration

Dyngle reads configuration from YAML files. You can specify the config file location using:

  • --config command line option
  • DYNGLE_CONFIG environment variable
  • .dyngle.yml in current directory
  • ~/.dyngle.yml in home directory

Workflow structure

Each operation is defined as a list of tasks under dyngle.operations. Tasks are executed sequentially using Python's subprocess module for security.

Example with multiple operations:

dyngle:
  operations:
    test:
      - python -m unittest discover
      - python -m coverage report
    docs:
      - sphinx-build docs docs/_build
      - open docs/_build/index.html
    setup:
      - python -m venv venv
      - source venv/bin/activate
      - pip install -r requirements.txt

Expressions

Configs can also contain expressions.

dyngle:
  expressions:
    say-hello: >-
        'Hello ' + name + '!'
  operations:
    say-hello: echo {{say-hello}}

Expressions can use a controlled subset of the Python standard library, including:

  • Built-in data types such as str()
  • Essential built-in functions such as len()
  • The core modules from the datetime package (but some methods such as strftime() will fail)
  • A specialized function called formatted() to perform string formatting operations on a datetime object
  • A restricted version of Path() that only operates within the current working directory

Security

Commands are executed using Python's subprocess.run() with arguments split in a shell-like fashion. The shell is not used, which reduces the likelihood of shell injection attacks. However, note that Dyngle is not robust to malicious configuration.

Quick installation (MacOS)

brew install python@3.11
python3.11 -m pip install pipx
pipx install dyngle

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

dyngle-0.4.1.tar.gz (4.8 kB view details)

Uploaded Source

Built Distribution

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

dyngle-0.4.1-py3-none-any.whl (6.9 kB view details)

Uploaded Python 3

File details

Details for the file dyngle-0.4.1.tar.gz.

File metadata

  • Download URL: dyngle-0.4.1.tar.gz
  • Upload date:
  • Size: 4.8 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.2.0 CPython/3.13.7

File hashes

Hashes for dyngle-0.4.1.tar.gz
Algorithm Hash digest
SHA256 b94d545ad2661daa77e247a069d3aa3266a3cb43192b00b0c60a0df5434b6994
MD5 9842759a2dc2697ae6b35bf60ca5c2c2
BLAKE2b-256 0835c1c03dfe121747e21d46fad3d7ef3c1c32ea84e14405708b5f312a3b3494

See more details on using hashes here.

File details

Details for the file dyngle-0.4.1-py3-none-any.whl.

File metadata

  • Download URL: dyngle-0.4.1-py3-none-any.whl
  • Upload date:
  • Size: 6.9 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.2.0 CPython/3.13.7

File hashes

Hashes for dyngle-0.4.1-py3-none-any.whl
Algorithm Hash digest
SHA256 2d6d3bb07cc16a4f41d04366f9f3c610a90715df983ce29041e1f6400ba9da8d
MD5 fd8972b0e0bb06b2b81a7ff5e8142887
BLAKE2b-256 487cb3b0debc6eac424afa8fc4c67fdbdeec698a2c98fe19a70d857739925ecd

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