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.4.tar.gz (31.5 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.4-py3-none-any.whl (43.8 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: avaris-0.1.4.tar.gz
  • Upload date:
  • Size: 31.5 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.4.tar.gz
Algorithm Hash digest
SHA256 e1afcd6b5cfc20f0af279374d55a55db52b49065d355dde52f74871aec48c07c
MD5 cdb8b00999185831d18cc69fee884cc0
BLAKE2b-256 4191ada10e433b9b6d77e50ae30cc184dfa1570dbf161d51ce8e1d1db69a044f

See more details on using hashes here.

File details

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

File metadata

  • Download URL: avaris-0.1.4-py3-none-any.whl
  • Upload date:
  • Size: 43.8 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.4-py3-none-any.whl
Algorithm Hash digest
SHA256 99c6a238fc83582553f219199fd7a06c2f2c721ed846869ac9d2fa1080b1c653
MD5 3101318b40d900d2032c4a4d4994c001
BLAKE2b-256 8fc728e27aad57782bcd31702d578fc7fbd813494b964bd92963d84aec251180

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