Skip to main content

Task execution engine for data management and monitoring

Project description

Avaris
Avaris Task Engine

Avaris is a modular task execution and data processing engine designed for easy integration and customization for various task executions, with a strong focus on data management tasks.

Notable Features

  • Flexible Task Configurations: Manage and customize your tasks with YAML configuration files.
  • Modular Design: Easily extend or modify components, supporting dynamic loading of plugins under .avaris/src.
  • Asynchronous Support: Built with async capabilities for efficient I/O operations.
  • Task Scheduling: Supports different backends, currently only APScheduler.
  • Extensible Executors: Execute tasks based on predefined or custom logic.
  • Data Management: Introduces SQLDataManager for relational database management, in addition to customizable data managers and handlers for diverse data storage and processing needs.

Installation

# Clone the repository
git clone https://github.com/avyr-io/avaris.git
cd avaris

# Install requirements
python -m pip install poetry
poetry install
python -m avaris start --config config/conf.yml --compendium-dir ./compendium

Getting Started

To run Avaris, you'll need to specify your engine configuration and compendium directory. Here's a quick guide to get you started.

Configuration Files

Avaris requires two main types of configuration files:

  • Engine Configuration (config/conf.yml): Defines global settings for the Avaris avaris.engine.
  • Compendium Configurations (./compendium): Each compendium file should have its own configuration file in this directory, detailing tasks, endpoints, and data management settings.

Running Avaris

python -m avaris start --config config/conf.yml --compendium-dir ./compendium

Replace config/conf.yml and ./compendium with the paths to your actual engine configuration file and compendium configuration directory, respectively.

Examples

Here are some examples of how to use Avaris for different tasks.

Defining a compendium Configuration

# compendium_config.yml
compendium:
  - name: PrometheusVersioncompendium
    destination: local
    tasks:
      - name: FetchLatestPrometheusVersion
        schedule: "* * * * *"
        executor:
          task: http_get_github_release
          parameters:
            api_url: "https://api.github.com/repos/prometheus/prometheus/releases/latest"

  - name: FluentBitVersioncompendium
    destination: local
    tasks:
      - name: FetchLatestFluentBitVersion
        schedule: "* * * * *"
        executor:
          task: http_get_github_release
          parameters:
            api_url: "https://api.github.com/repos/fluent/fluent-bit/releases/latest"

Custom Task Executor

Implementing a custom task executor involves creating a Python class that inherits from TaskExecutor and defines the execute method.

# my_avaris.executor.py
from avaris.executor.executor import TaskExecutor
from pydantic import BaseModel
from avaris.task.task_registry import register_task_executor
class MyExecutorParameters(BaseModel):
    __NAME__ = 'my_exec_identifier'
    # Define parameters here

@register_task_executor(MyExecutorParameters.__NAME__)
class MyExecutor(TaskExecutor[MyExecutorParameters]):
    PARAMETER_TYPE=MyExecutorParameters
    async def execute(self) -> dict:
        # Implementation of your task
        try:
            return {}
        except Exception as e:
            self.logger.error(f"An error occurred while executing task: {e}")
            return {"error":str(e)}

Custom tasks under .src/plugins/executor/your_executor.py are automatically loaded.

How To Contribute

Contributions to Avaris are welcome. Please refer to the CONTRIBUTING.md file for guidelines on how to make contributions.

License

Avaris is released under the Apache 2.0 License. See the LICENSE file for more details.

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

avaris-0.1.5.tar.gz (31.9 kB view details)

Uploaded Source

Built Distribution

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

avaris-0.1.5-py3-none-any.whl (44.3 kB view details)

Uploaded Python 3

File details

Details for the file avaris-0.1.5.tar.gz.

File metadata

  • Download URL: avaris-0.1.5.tar.gz
  • Upload date:
  • Size: 31.9 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: poetry/1.8.2 CPython/3.8.18 Linux/6.5.0-1017-azure

File hashes

Hashes for avaris-0.1.5.tar.gz
Algorithm Hash digest
SHA256 e2eaa00f9416b03508ce06aa1a42618a75dcd03eb90938ecc41baf89b8085844
MD5 e1171fa384eef439e27305ae4b5387ac
BLAKE2b-256 ceb6ddf858567b33b9bd6d7795770c9972a31780ba1f7e400ff99bd06c6c5f0d

See more details on using hashes here.

File details

Details for the file avaris-0.1.5-py3-none-any.whl.

File metadata

  • Download URL: avaris-0.1.5-py3-none-any.whl
  • Upload date:
  • Size: 44.3 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: poetry/1.8.2 CPython/3.8.18 Linux/6.5.0-1017-azure

File hashes

Hashes for avaris-0.1.5-py3-none-any.whl
Algorithm Hash digest
SHA256 bd9496522b88ee57d4f640690053ee75e38eeb8423a59cff8cebde69280a2e28
MD5 95326d39ce771a73b45587d36f81765e
BLAKE2b-256 7f562d6f299e99b1d449166df5fae7bba4fd17fcee1b822ca4c4ebfe7745a603

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