# kaxi
<p align="center">
<em>Run pipelines similar to github actions</em>
</p>
<div align="center">
[![Package version](https://img.shields.io/pypi/v/kaxi?color=%2334D058&label=pypi%20package)](https://pypi.org/project/kaxi/)
[![Code style: black](https://img.shields.io/badge/code%20style-black-000000.svg)](https://github.com/psf/black)
[![Semantic Versions](https://img.shields.io/badge/%20%20%F0%9F%93%A6%F0%9F%9A%80-semantic--versions-e10079.svg)](https://github.com/gabrielguarisa/kaxi/releases)
[![License](https://img.shields.io/github/license/gabrielguarisa/kaxi)](https://github.com/gabrielguarisa/kaxi/blob/main/LICENSE)
</div>
## Installation
```bash
pip install kaxi
```
## Usage
You can run a pipeline by running the following command:
```bash
kaxi <pipeline_file>.yaml
```
Or you can programmatically run a pipeline by running the following command:
```python
from kaxi import Runner
runner = Runner(your_pipeline)
runner.execute()
```
## Pipeline file
A pipeline file is a yaml file that contains a list of steps to execute. Each step is a dictionary with the following keys:
- `uses`: The callable to execute (e.g. `pandas.read_csv`)
- `name` (optional): The name of the step
- `with` (optional): A dictionary of arguments to pass to the callable
If you want to use arguments without the respective name, you can use the `args` key inside the `with` dictionary.
### Example
```yaml
verbose: true
steps:
- uses: os.path.isfile
name: file_exists
with:
path: example.yaml
- uses: kaxi.log.info
with:
args:
- ${file_exists}
```
### Environment variables
You can use environment variables in your pipeline file by using the `${ENV_VAR}` syntax.
To define environment variables, you can set them inside the `enviroment` key:
```yaml
environment:
ENV_VAR: value
```
Another way to use environment variables is to use the ouput of a step as an environment variable, this can be done by using the `name` of the step inside the `${}` syntax:
```yaml
steps:
- uses: os.path.isfile
name: file_exists
with:
path: example.yaml
- uses: kaxi.log.info
with:
args:
- ${file_exists}
```
Raw data
{
"_id": null,
"home_page": "https://github.com/gabrielguarisa/kaxi",
"name": "kaxi",
"maintainer": "",
"docs_url": null,
"requires_python": ">=3.8,<4.0",
"maintainer_email": "",
"keywords": "",
"author": "Gabriel Guarisa",
"author_email": "gabrielguarisa@gmail.com",
"download_url": "https://files.pythonhosted.org/packages/65/9f/038f6e5f1c3497faddd083be72791f2c00a8f3775a77378924854e0d3ee4/kaxi-0.1.1.tar.gz",
"platform": null,
"description": "# kaxi\n\n<p align=\"center\">\n <em>Run pipelines similar to github actions</em>\n</p>\n\n<div align=\"center\">\n\n[![Package version](https://img.shields.io/pypi/v/kaxi?color=%2334D058&label=pypi%20package)](https://pypi.org/project/kaxi/)\n[![Code style: black](https://img.shields.io/badge/code%20style-black-000000.svg)](https://github.com/psf/black)\n[![Semantic Versions](https://img.shields.io/badge/%20%20%F0%9F%93%A6%F0%9F%9A%80-semantic--versions-e10079.svg)](https://github.com/gabrielguarisa/kaxi/releases)\n[![License](https://img.shields.io/github/license/gabrielguarisa/kaxi)](https://github.com/gabrielguarisa/kaxi/blob/main/LICENSE)\n\n</div>\n\n## Installation\n\n```bash\npip install kaxi\n```\n\n## Usage\n\nYou can run a pipeline by running the following command:\n\n```bash\nkaxi <pipeline_file>.yaml\n```\n\nOr you can programmatically run a pipeline by running the following command:\n\n```python\nfrom kaxi import Runner\n\nrunner = Runner(your_pipeline)\nrunner.execute()\n```\n\n## Pipeline file\n\nA pipeline file is a yaml file that contains a list of steps to execute. Each step is a dictionary with the following keys:\n\n- `uses`: The callable to execute (e.g. `pandas.read_csv`)\n- `name` (optional): The name of the step\n- `with` (optional): A dictionary of arguments to pass to the callable\n\nIf you want to use arguments without the respective name, you can use the `args` key inside the `with` dictionary.\n\n### Example\n\n```yaml\nverbose: true\n\nsteps:\n - uses: os.path.isfile\n name: file_exists\n with:\n path: example.yaml\n\n - uses: kaxi.log.info\n with:\n args:\n - ${file_exists}\n```\n\n### Environment variables\n\nYou can use environment variables in your pipeline file by using the `${ENV_VAR}` syntax.\n\nTo define environment variables, you can set them inside the `enviroment` key:\n\n```yaml\nenvironment:\n ENV_VAR: value\n```\n\nAnother way to use environment variables is to use the ouput of a step as an environment variable, this can be done by using the `name` of the step inside the `${}` syntax:\n\n```yaml\nsteps:\n - uses: os.path.isfile\n name: file_exists\n with:\n path: example.yaml\n\n - uses: kaxi.log.info\n with:\n args:\n - ${file_exists}\n```",
"bugtrack_url": null,
"license": "MIT",
"summary": "Run pipelines similar to github actions",
"version": "0.1.1",
"project_urls": {
"Homepage": "https://github.com/gabrielguarisa/kaxi",
"Repository": "https://github.com/gabrielguarisa/kaxi"
},
"split_keywords": [],
"urls": [
{
"comment_text": "",
"digests": {
"blake2b_256": "379537502ded2e001f4cdf45e83cda101038687d76a81b1f983dbb9ff75554b8",
"md5": "d524b608b169380b54c3136e9ade22b2",
"sha256": "0992e19046599f9d9773723f5c7456b9f5afad6fe5c23316914cb029ca98c694"
},
"downloads": -1,
"filename": "kaxi-0.1.1-py3-none-any.whl",
"has_sig": false,
"md5_digest": "d524b608b169380b54c3136e9ade22b2",
"packagetype": "bdist_wheel",
"python_version": "py3",
"requires_python": ">=3.8,<4.0",
"size": 5144,
"upload_time": "2023-06-17T03:13:03",
"upload_time_iso_8601": "2023-06-17T03:13:03.757155Z",
"url": "https://files.pythonhosted.org/packages/37/95/37502ded2e001f4cdf45e83cda101038687d76a81b1f983dbb9ff75554b8/kaxi-0.1.1-py3-none-any.whl",
"yanked": false,
"yanked_reason": null
},
{
"comment_text": "",
"digests": {
"blake2b_256": "659f038f6e5f1c3497faddd083be72791f2c00a8f3775a77378924854e0d3ee4",
"md5": "4e0cbc703465dbd2fa2cd22c3706e057",
"sha256": "70bd31cba6aff608592c9a62ab1a96911a9f84210fd12ad70a9db0fae69a760f"
},
"downloads": -1,
"filename": "kaxi-0.1.1.tar.gz",
"has_sig": false,
"md5_digest": "4e0cbc703465dbd2fa2cd22c3706e057",
"packagetype": "sdist",
"python_version": "source",
"requires_python": ">=3.8,<4.0",
"size": 4321,
"upload_time": "2023-06-17T03:13:04",
"upload_time_iso_8601": "2023-06-17T03:13:04.982199Z",
"url": "https://files.pythonhosted.org/packages/65/9f/038f6e5f1c3497faddd083be72791f2c00a8f3775a77378924854e0d3ee4/kaxi-0.1.1.tar.gz",
"yanked": false,
"yanked_reason": null
}
],
"upload_time": "2023-06-17 03:13:04",
"github": true,
"gitlab": false,
"bitbucket": false,
"codeberg": false,
"github_user": "gabrielguarisa",
"github_project": "kaxi",
"travis_ci": false,
"coveralls": false,
"github_actions": true,
"lcname": "kaxi"
}