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
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file atprun-0.1.13.tar.gz.
File metadata
- Download URL: atprun-0.1.13.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
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
098f6b4270051fda2b5616496e6d1c8832ffd2f6e2b09983feb91bab24c3ae60
|
|
| MD5 |
9372234084653d6374cbffcefdd191d0
|
|
| BLAKE2b-256 |
8b3ddd6bd8fc419bb60f96201d32e03d4e88c2141d1fc33bf78b9a5fcd62b499
|
Provenance
The following attestation bundles were made for atprun-0.1.13.tar.gz:
Publisher:
pypi_build.yml on atp-things/atp-run
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
atprun-0.1.13.tar.gz -
Subject digest:
098f6b4270051fda2b5616496e6d1c8832ffd2f6e2b09983feb91bab24c3ae60 - Sigstore transparency entry: 661456706
- Sigstore integration time:
-
Permalink:
atp-things/atp-run@01a9b6e5a9bfa43e329c84e01354905b93889528 -
Branch / Tag:
refs/tags/v0.1.13 - Owner: https://github.com/atp-things
-
Access:
private
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
pypi_build.yml@01a9b6e5a9bfa43e329c84e01354905b93889528 -
Trigger Event:
push
-
Statement type:
File details
Details for the file atprun-0.1.13-py3-none-any.whl.
File metadata
- Download URL: atprun-0.1.13-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
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
9d8754b455c96ebb82b8484e137ec2c4e6b1649821c2877d654774fac0fe62bf
|
|
| MD5 |
31871d872c2449762909abaad28a9f73
|
|
| BLAKE2b-256 |
aeceb6e3db77564640eb021c1b0e65a174b0eaf7cb24b3854cb5e411162b4c5c
|
Provenance
The following attestation bundles were made for atprun-0.1.13-py3-none-any.whl:
Publisher:
pypi_build.yml on atp-things/atp-run
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
atprun-0.1.13-py3-none-any.whl -
Subject digest:
9d8754b455c96ebb82b8484e137ec2c4e6b1649821c2877d654774fac0fe62bf - Sigstore transparency entry: 661456711
- Sigstore integration time:
-
Permalink:
atp-things/atp-run@01a9b6e5a9bfa43e329c84e01354905b93889528 -
Branch / Tag:
refs/tags/v0.1.13 - Owner: https://github.com/atp-things
-
Access:
private
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
pypi_build.yml@01a9b6e5a9bfa43e329c84e01354905b93889528 -
Trigger Event:
push
-
Statement type: