Skip to main content

Run commands, scripts and import environmental variables

Project description

ATP-Run

atprun is a command-line tool that allows you to define and run scripts using a simple YAML configuration file. It is designed to be easy to use and flexible, making it a great choice for managing and executing scripts in your projects. It supports defining environment variables, multi-line scripts. In the project directory, create a file named atprun.yml and define your scripts in it.

You can then use the atprun script <script_name> to run your scripts.

1. Installation

1.1. Pipx

You can install ATP-Run using Pipx, which is a tool to install and run Python applications in isolated environments.

pipx install atprun

1.2. uv tool

You can also install ATP-Run using the uv tool, which is a tool to install and run Python applications in isolated environments.

uv tool install atprun

1.3. pip

You can also install ATP-Run using pip:

pip install atprun

1.4. Pipenv

You can also install ATP-Run using Pipenv:

pipenv install atprun

2. Usage

Define your scripts in a YAML configuration file (e.g., atprun.yml) and use the atprun script <script_name> command to run them.

Example: atprun script my_script

2.1. Examples atprun.yml

Simple script

scripts:
  my_script:
    run: "echo Hello, World!"

Multiple line script

scripts:
  my_script:
    run: |
      echo "First Line"
      echo "Second line"

Set environment variables

scripts:
  my_script:
    environment:
      ENV_VAR_TEST: "Hello world 1"
    run: echo "$ENV_VAR_TEST"

Load environment variables from .env file

scripts:
  my_script:
    env_file:
      - ".env"
      - ".env.development"
    run: |
      echo "$DOTENV_TEST_1"
      echo "$DOTENV_DEV_TEST_1"

3. Settings

3.1 Configuration File

Default: atprun.yml (current directory)

You can change the path to the configuration file using the --config-path option.

Example:

atprun --config-path path/to/your_config.yml script my_script

or by setting environment variable ATPRUN_CONFIG_PATH

Example:

export ATPRUN_CONFIG_PATH=path/to/your_config.yml

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

atprun-0.1.12.tar.gz (5.3 kB view details)

Uploaded Source

Built Distribution

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

atprun-0.1.12-py3-none-any.whl (5.5 kB view details)

Uploaded Python 3

File details

Details for the file atprun-0.1.12.tar.gz.

File metadata

  • Download URL: atprun-0.1.12.tar.gz
  • Upload date:
  • Size: 5.3 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.7

File hashes

Hashes for atprun-0.1.12.tar.gz
Algorithm Hash digest
SHA256 45180595c720d932e3f82b4adce9d0e18584239a4a35abfaea35f1daad38fdd9
MD5 cd5f781ad19b16742b54f61ffa2112c3
BLAKE2b-256 b0d01cd2a4fa24a2a026637e1002b1ee6ab0cabbe12cfdfc4fbc65ef160e90b5

See more details on using hashes here.

Provenance

The following attestation bundles were made for atprun-0.1.12.tar.gz:

Publisher: pypi_build.yml on atp-things/atp-run

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

File details

Details for the file atprun-0.1.12-py3-none-any.whl.

File metadata

  • Download URL: atprun-0.1.12-py3-none-any.whl
  • Upload date:
  • Size: 5.5 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.7

File hashes

Hashes for atprun-0.1.12-py3-none-any.whl
Algorithm Hash digest
SHA256 8a45385c23a7573e957ba80cf585008589d1f2862573cd6a00b9eda243106b0b
MD5 3743c18802e7846f7a39c0bfb44b3ae5
BLAKE2b-256 c9a7ea0cc8263a20abfe1dcedfc9f6077b04f32101e8ba6f453ddbdc4dafa1d2

See more details on using hashes here.

Provenance

The following attestation bundles were made for atprun-0.1.12-py3-none-any.whl:

Publisher: pypi_build.yml on atp-things/atp-run

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