valohai-yaml


Namevalohai-yaml JSON
Version 0.43.0 PyPI version JSON
download
home_pageNone
SummaryValohai.yaml validation and parsing
upload_time2024-11-04 13:22:24
maintainerNone
docs_urlNone
authorNone
requires_python>=3.8
licenseNone
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": null,
    "name": "valohai-yaml",
    "maintainer": null,
    "docs_url": null,
    "requires_python": ">=3.8",
    "maintainer_email": null,
    "keywords": "strings, utility",
    "author": null,
    "author_email": "Valohai <info@valohai.com>",
    "download_url": "https://files.pythonhosted.org/packages/43/64/e75293c21d0cd0f6e916ee884be989c38d89375d65db317d9cfe56b0541f/valohai_yaml-0.43.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": null,
    "summary": "Valohai.yaml validation and parsing",
    "version": "0.43.0",
    "project_urls": {
        "Homepage": "https://github.com/valohai/valohai-yaml"
    },
    "split_keywords": [
        "strings",
        " utility"
    ],
    "urls": [
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "54c520137e053f0f7f907f2fcb9d333690e1398062274b9a28a9d26c0507c0d2",
                "md5": "eb6eb542eba348291ac6c8dada601053",
                "sha256": "a5d9591551a357dcc7749f2784ac434978c6fafb65d571aa15c1ecde8fc7b0cb"
            },
            "downloads": -1,
            "filename": "valohai_yaml-0.43.0-py3-none-any.whl",
            "has_sig": false,
            "md5_digest": "eb6eb542eba348291ac6c8dada601053",
            "packagetype": "bdist_wheel",
            "python_version": "py3",
            "requires_python": ">=3.8",
            "size": 55080,
            "upload_time": "2024-11-04T13:22:23",
            "upload_time_iso_8601": "2024-11-04T13:22:23.249310Z",
            "url": "https://files.pythonhosted.org/packages/54/c5/20137e053f0f7f907f2fcb9d333690e1398062274b9a28a9d26c0507c0d2/valohai_yaml-0.43.0-py3-none-any.whl",
            "yanked": false,
            "yanked_reason": null
        },
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "4364e75293c21d0cd0f6e916ee884be989c38d89375d65db317d9cfe56b0541f",
                "md5": "2fdfd79a1c5d97c2a1bb30eba6d52cc7",
                "sha256": "0b8f06fb9ffc43b6f575f5778791207bd2afbc73a77bf3ed7424b6183a74bb8b"
            },
            "downloads": -1,
            "filename": "valohai_yaml-0.43.0.tar.gz",
            "has_sig": false,
            "md5_digest": "2fdfd79a1c5d97c2a1bb30eba6d52cc7",
            "packagetype": "sdist",
            "python_version": "source",
            "requires_python": ">=3.8",
            "size": 52510,
            "upload_time": "2024-11-04T13:22:24",
            "upload_time_iso_8601": "2024-11-04T13:22:24.820411Z",
            "url": "https://files.pythonhosted.org/packages/43/64/e75293c21d0cd0f6e916ee884be989c38d89375d65db317d9cfe56b0541f/valohai_yaml-0.43.0.tar.gz",
            "yanked": false,
            "yanked_reason": null
        }
    ],
    "upload_time": "2024-11-04 13:22:24",
    "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: 2.84540s