dagu-cron


Namedagu-cron JSON
Version 0.1.0 PyPI version JSON
download
home_pageNone
SummaryA tool to convert CRONTAB jobs to DAGU DAGs
upload_time2024-07-14 18:32:55
maintainerNone
docs_urlNone
authorAditya Thapliyal
requires_python>=3.6
licenseMIT
keywords crontab dag dagu scheduling
VCS
bugtrack_url
requirements build click dagu-cron importlib_metadata packaging pyaml pyproject_hooks PyYAML tomli zipp
Travis-CI No Travis.
coveralls test coverage No coveralls.
            # Dagu-cron

Dagu-cron is a versatile Python package and command-line tool designed to facilitate the conversion of CRONTAB jobs into DAGU DAGs, enabling efficient management of complex workflows within a controlled application environment.

## Features

- **CRONTAB to DAGU Conversion**: Automatically convert CRONTAB entries to DAGU DAGs, streamlining the management and visualization of intricate workflows.
  
- **Workflow Management**:
  - **Add Steps**: Seamlessly integrate new steps into existing DAGs.
  - **Transfer Steps**: Move steps between DAGs to reorganize workflows.
  - **Remove Steps**: Simplify DAGs by removing unnecessary steps.
  
- **CLI and Library Integration**:
  - **Command-Line Interface**: Execute commands to perform CRONTAB conversion, step addition, transfer, and removal.
  - **Library Functions**: Import directly into projects for deeper integration and customized workflow management.
  
- **Secure Application Environment**: Control and manage DAG operations exclusively through the application interface, ensuring security by restricting access to the DAGU UI and server.

## Usage

### Command-Line Interface

Execute commands to perform tasks:

```bash
# Convert CRONTAB to DAGU DAGs
$ dagu-cron build -o /path/to/output/dags

# Add a step to an existing DAG
$ dagu-cron add_step -o /path/to/output/dags -dag dag_name -step step_name -schedule "*/5 * * * *" -command "python script.py" -dependencies "dependency1,dependency2"

# Transfer a step from one DAG to another
$ dagu-cron transfer_step -o /path/to/output/dags -source source_dag.yaml -dest dest_dag.yaml -step step_name

# Remove a step from a DAG
$ dagu-cron remove_step -o /path/to/output/dags -dag dag_name -step step_name
```

Library Integration
Import functions for programmatic control:

```bash
from dagu_cron.lib import add_step_to_dag, build_dag_from_crontab

# Example usage in Python code

output_dir = '/path/to/output/dags'
dag_name = 'my_dag.yaml'
step_name = 'step1'
step_schedule = '*/5 * * * *'
step_command = 'python script.py'
step_dependencies = 'dependency1,dependency2'

add_step_core(output_dir, dag_name, step_name, step_schedule, step_command, step_dependencies)

build_core(output_dir)
```

By offering both a versatile CLI and seamless library integration, dagu-cron empowers developers to manage workflows effectively and securely, whether through direct commands or integrated functions within their projects.

            

Raw data

            {
    "_id": null,
    "home_page": null,
    "name": "dagu-cron",
    "maintainer": null,
    "docs_url": null,
    "requires_python": ">=3.6",
    "maintainer_email": null,
    "keywords": "CRONTAB, DAG, DAGU, scheduling",
    "author": "Aditya Thapliyal",
    "author_email": "Aditya Thapliyal <adityathapliyal0607@gmail.com>",
    "download_url": "https://files.pythonhosted.org/packages/94/58/2e18c8aad5f98e46063974a5cec6bcf716f2bdb28c2593cc239e713fe4da/dagu_cron-0.1.0.tar.gz",
    "platform": null,
    "description": "# Dagu-cron\n\nDagu-cron is a versatile Python package and command-line tool designed to facilitate the conversion of CRONTAB jobs into DAGU DAGs, enabling efficient management of complex workflows within a controlled application environment.\n\n## Features\n\n- **CRONTAB to DAGU Conversion**: Automatically convert CRONTAB entries to DAGU DAGs, streamlining the management and visualization of intricate workflows.\n  \n- **Workflow Management**:\n  - **Add Steps**: Seamlessly integrate new steps into existing DAGs.\n  - **Transfer Steps**: Move steps between DAGs to reorganize workflows.\n  - **Remove Steps**: Simplify DAGs by removing unnecessary steps.\n  \n- **CLI and Library Integration**:\n  - **Command-Line Interface**: Execute commands to perform CRONTAB conversion, step addition, transfer, and removal.\n  - **Library Functions**: Import directly into projects for deeper integration and customized workflow management.\n  \n- **Secure Application Environment**: Control and manage DAG operations exclusively through the application interface, ensuring security by restricting access to the DAGU UI and server.\n\n## Usage\n\n### Command-Line Interface\n\nExecute commands to perform tasks:\n\n```bash\n# Convert CRONTAB to DAGU DAGs\n$ dagu-cron build -o /path/to/output/dags\n\n# Add a step to an existing DAG\n$ dagu-cron add_step -o /path/to/output/dags -dag dag_name -step step_name -schedule \"*/5 * * * *\" -command \"python script.py\" -dependencies \"dependency1,dependency2\"\n\n# Transfer a step from one DAG to another\n$ dagu-cron transfer_step -o /path/to/output/dags -source source_dag.yaml -dest dest_dag.yaml -step step_name\n\n# Remove a step from a DAG\n$ dagu-cron remove_step -o /path/to/output/dags -dag dag_name -step step_name\n```\n\nLibrary Integration\nImport functions for programmatic control:\n\n```bash\nfrom dagu_cron.lib import add_step_to_dag, build_dag_from_crontab\n\n# Example usage in Python code\n\noutput_dir = '/path/to/output/dags'\ndag_name = 'my_dag.yaml'\nstep_name = 'step1'\nstep_schedule = '*/5 * * * *'\nstep_command = 'python script.py'\nstep_dependencies = 'dependency1,dependency2'\n\nadd_step_core(output_dir, dag_name, step_name, step_schedule, step_command, step_dependencies)\n\nbuild_core(output_dir)\n```\n\nBy offering both a versatile CLI and seamless library integration, dagu-cron empowers developers to manage workflows effectively and securely, whether through direct commands or integrated functions within their projects.\n",
    "bugtrack_url": null,
    "license": "MIT",
    "summary": "A tool to convert CRONTAB jobs to DAGU DAGs",
    "version": "0.1.0",
    "project_urls": {
        "repository": "https://github.com/Aditya060/DAGU-Cron_to_DAG"
    },
    "split_keywords": [
        "crontab",
        " dag",
        " dagu",
        " scheduling"
    ],
    "urls": [
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "ac7d1e108b771c9f013c00ef9ce8e775f6d515bb8e5627b199373fd8e6a33e24",
                "md5": "d997fd4dd37afa3160de85a7a97bbe9f",
                "sha256": "88e401fd575f86a8c09934e2541691f0af55628e91bff521640e4e6005ae3fc2"
            },
            "downloads": -1,
            "filename": "dagu_cron-0.1.0-py3-none-any.whl",
            "has_sig": false,
            "md5_digest": "d997fd4dd37afa3160de85a7a97bbe9f",
            "packagetype": "bdist_wheel",
            "python_version": "py3",
            "requires_python": ">=3.6",
            "size": 5698,
            "upload_time": "2024-07-14T18:32:53",
            "upload_time_iso_8601": "2024-07-14T18:32:53.880825Z",
            "url": "https://files.pythonhosted.org/packages/ac/7d/1e108b771c9f013c00ef9ce8e775f6d515bb8e5627b199373fd8e6a33e24/dagu_cron-0.1.0-py3-none-any.whl",
            "yanked": false,
            "yanked_reason": null
        },
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "94582e18c8aad5f98e46063974a5cec6bcf716f2bdb28c2593cc239e713fe4da",
                "md5": "8846bd252c3be347cfe6de86071aab1e",
                "sha256": "226fd573134a7fd2daf35ed4feea2d52cf2b80e0ad5245916e51014e6d3d8f81"
            },
            "downloads": -1,
            "filename": "dagu_cron-0.1.0.tar.gz",
            "has_sig": false,
            "md5_digest": "8846bd252c3be347cfe6de86071aab1e",
            "packagetype": "sdist",
            "python_version": "source",
            "requires_python": ">=3.6",
            "size": 5684,
            "upload_time": "2024-07-14T18:32:55",
            "upload_time_iso_8601": "2024-07-14T18:32:55.715842Z",
            "url": "https://files.pythonhosted.org/packages/94/58/2e18c8aad5f98e46063974a5cec6bcf716f2bdb28c2593cc239e713fe4da/dagu_cron-0.1.0.tar.gz",
            "yanked": false,
            "yanked_reason": null
        }
    ],
    "upload_time": "2024-07-14 18:32:55",
    "github": true,
    "gitlab": false,
    "bitbucket": false,
    "codeberg": false,
    "github_user": "Aditya060",
    "github_project": "DAGU-Cron_to_DAG",
    "travis_ci": false,
    "coveralls": false,
    "github_actions": false,
    "requirements": [
        {
            "name": "build",
            "specs": [
                [
                    "==",
                    "1.2.1"
                ]
            ]
        },
        {
            "name": "click",
            "specs": [
                [
                    "==",
                    "8.1.7"
                ]
            ]
        },
        {
            "name": "dagu-cron",
            "specs": [
                [
                    "==",
                    "0.1.0"
                ]
            ]
        },
        {
            "name": "importlib_metadata",
            "specs": [
                [
                    "==",
                    "8.0.0"
                ]
            ]
        },
        {
            "name": "packaging",
            "specs": [
                [
                    "==",
                    "24.1"
                ]
            ]
        },
        {
            "name": "pyaml",
            "specs": [
                [
                    "==",
                    "24.4.0"
                ]
            ]
        },
        {
            "name": "pyproject_hooks",
            "specs": [
                [
                    "==",
                    "1.1.0"
                ]
            ]
        },
        {
            "name": "PyYAML",
            "specs": [
                [
                    "==",
                    "6.0.1"
                ]
            ]
        },
        {
            "name": "tomli",
            "specs": [
                [
                    "==",
                    "2.0.1"
                ]
            ]
        },
        {
            "name": "zipp",
            "specs": [
                [
                    "==",
                    "3.19.2"
                ]
            ]
        }
    ],
    "lcname": "dagu-cron"
}
        
Elapsed time: 0.31622s