valohai-yaml


Namevalohai-yaml JSON
Version 0.39.0 PyPI version JSON
download
home_page
SummaryValohai.yaml validation and parsing
upload_time2024-03-13 12:37:03
maintainer
docs_urlNone
author
requires_python>=3.8
license
keywords strings utility
VCS
bugtrack_url
requirements No requirements were recorded.
Travis-CI No Travis.
coveralls test coverage
            # valohai-yaml

[![Build Status](https://github.com/valohai/valohai-yaml/actions/workflows/ci.yml/badge.svg)](https://github.com/valohai/valohai-yaml/actions/workflows/ci.yml)
[![Codecov](https://codecov.io/gh/valohai/valohai-yaml/branch/master/graph/badge.svg)](https://codecov.io/gh/valohai/valohai-yaml)
[![License: MIT](https://img.shields.io/badge/License-MIT-green.svg)](https://opensource.org/licenses/MIT)

Parses and validates `valohai.yaml` files.

Valohai YAML files are used to define how your machine learning project workloads and pipelines are ran on the [Valohai](https://valohai.com/) ecosystem. Refer to [Valohai Documentation](https://docs.valohai.com/) to learn how to write the actual YAML files and for more in-depth usage examples.

## Installation

```bash
pip install valohai-yaml
```

## Usage

### Validation

Programmatic usage:

```python
from valohai_yaml import validate, ValidationErrors

try:
    with open('path/to/valohai.yaml') as f:
        validate(f)
except ValidationErrors as errors:
    print('oh no!')
    for err in errors:
        print(err)
```

Command-line usage:

```bash
valohai-yaml my_yaml.yaml
echo $?  # 1 if errors, 0 if ok
```

### Parsing

```python
from valohai_yaml import parse

with open('path/to/valohai.yaml') as f:
    config = parse(f)

print(config.steps['cool step'].command)
```

# Development

```bash
# setup development dependencies
make dev

# run linting and type checks
make lint

# run tests
make test
```

            

Raw data

            {
    "_id": null,
    "home_page": "",
    "name": "valohai-yaml",
    "maintainer": "",
    "docs_url": null,
    "requires_python": ">=3.8",
    "maintainer_email": "",
    "keywords": "strings,utility",
    "author": "",
    "author_email": "Valohai <info@valohai.com>",
    "download_url": "https://files.pythonhosted.org/packages/b3/4e/c010a458032895ee94b23ffb604458976577222346570a85e704b7a1a526/valohai_yaml-0.39.0.tar.gz",
    "platform": null,
    "description": "# valohai-yaml\n\n[![Build Status](https://github.com/valohai/valohai-yaml/actions/workflows/ci.yml/badge.svg)](https://github.com/valohai/valohai-yaml/actions/workflows/ci.yml)\n[![Codecov](https://codecov.io/gh/valohai/valohai-yaml/branch/master/graph/badge.svg)](https://codecov.io/gh/valohai/valohai-yaml)\n[![License: MIT](https://img.shields.io/badge/License-MIT-green.svg)](https://opensource.org/licenses/MIT)\n\nParses and validates `valohai.yaml` files.\n\nValohai YAML files are used to define how your machine learning project workloads and pipelines are ran on the [Valohai](https://valohai.com/) ecosystem. Refer to [Valohai Documentation](https://docs.valohai.com/) to learn how to write the actual YAML files and for more in-depth usage examples.\n\n## Installation\n\n```bash\npip install valohai-yaml\n```\n\n## Usage\n\n### Validation\n\nProgrammatic usage:\n\n```python\nfrom valohai_yaml import validate, ValidationErrors\n\ntry:\n    with open('path/to/valohai.yaml') as f:\n        validate(f)\nexcept ValidationErrors as errors:\n    print('oh no!')\n    for err in errors:\n        print(err)\n```\n\nCommand-line usage:\n\n```bash\nvalohai-yaml my_yaml.yaml\necho $?  # 1 if errors, 0 if ok\n```\n\n### Parsing\n\n```python\nfrom valohai_yaml import parse\n\nwith open('path/to/valohai.yaml') as f:\n    config = parse(f)\n\nprint(config.steps['cool step'].command)\n```\n\n# Development\n\n```bash\n# setup development dependencies\nmake dev\n\n# run linting and type checks\nmake lint\n\n# run tests\nmake test\n```\n",
    "bugtrack_url": null,
    "license": "",
    "summary": "Valohai.yaml validation and parsing",
    "version": "0.39.0",
    "project_urls": {
        "Homepage": "https://github.com/valohai/valohai-yaml"
    },
    "split_keywords": [
        "strings",
        "utility"
    ],
    "urls": [
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "482be37d87aeb56471d622157d0a69a59b29f9c632086c336a33a8512f5bea90",
                "md5": "48b34ebc8957855c8242e23080fe0bf4",
                "sha256": "b84de3daedf93dd3fa146a847808913cfd6d705c6ac8ddb7c4feab9fa3973f99"
            },
            "downloads": -1,
            "filename": "valohai_yaml-0.39.0-py3-none-any.whl",
            "has_sig": false,
            "md5_digest": "48b34ebc8957855c8242e23080fe0bf4",
            "packagetype": "bdist_wheel",
            "python_version": "py3",
            "requires_python": ">=3.8",
            "size": 53724,
            "upload_time": "2024-03-13T12:37:01",
            "upload_time_iso_8601": "2024-03-13T12:37:01.431474Z",
            "url": "https://files.pythonhosted.org/packages/48/2b/e37d87aeb56471d622157d0a69a59b29f9c632086c336a33a8512f5bea90/valohai_yaml-0.39.0-py3-none-any.whl",
            "yanked": false,
            "yanked_reason": null
        },
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "b34ec010a458032895ee94b23ffb604458976577222346570a85e704b7a1a526",
                "md5": "2e26324687fa9c3118e35e6e0a0c03a8",
                "sha256": "320fb4782a6e0cee23f411f1f358de652a260da551d2cb738f6b2fd1a17b8aea"
            },
            "downloads": -1,
            "filename": "valohai_yaml-0.39.0.tar.gz",
            "has_sig": false,
            "md5_digest": "2e26324687fa9c3118e35e6e0a0c03a8",
            "packagetype": "sdist",
            "python_version": "source",
            "requires_python": ">=3.8",
            "size": 50410,
            "upload_time": "2024-03-13T12:37:03",
            "upload_time_iso_8601": "2024-03-13T12:37:03.787742Z",
            "url": "https://files.pythonhosted.org/packages/b3/4e/c010a458032895ee94b23ffb604458976577222346570a85e704b7a1a526/valohai_yaml-0.39.0.tar.gz",
            "yanked": false,
            "yanked_reason": null
        }
    ],
    "upload_time": "2024-03-13 12:37:03",
    "github": true,
    "gitlab": false,
    "bitbucket": false,
    "codeberg": false,
    "github_user": "valohai",
    "github_project": "valohai-yaml",
    "travis_ci": false,
    "coveralls": true,
    "github_actions": true,
    "lcname": "valohai-yaml"
}
        
Elapsed time: 0.23342s