Skip to main content

Pydantic models for nomad

Project description

nomad-pydantic

Typed Python models for building, validating, rendering, and managing Nomad jobs.

Build Status codecov License PyPI

nomad-pydantic represents jobs, task groups, tasks, resources, services, volumes, and periodic schedules as Pydantic models. It renders the JSON envelope accepted by nomad job run -json and provides a mockable client for common Nomad CLI lifecycle operations.

from nomad_pydantic import Job, NomadConfiguration, Task, TaskGroup

config = NomadConfiguration(
    job=Job(
        id="hello",
        type="batch",
        task_groups=[
            TaskGroup(
                name="hello",
                tasks=[
                    Task(
                        name="hello",
                        driver="docker",
                        config={"image": "alpine:3", "args": ["echo", "hello"]},
                    )
                ],
            )
        ],
    )
)

config.write()

Documentation

  • Tutorial builds and renders a first job.
  • How-to guides cover Hydra, periodic jobs, and lifecycle operations.
  • Concepts explains the model hierarchy and JSON boundary.
  • API reference documents every public model and client.

Ecosystem

nomad-pydantic follows the same configuration pattern as supervisor-pydantic, systemd-pydantic, and cron-pydantic. The broader declarative Airflow stack is built from airflow-pydantic and airflow-config, with runtime integrations provided by airflow-supervisor, airflow-systemd, and airflow-cron.

Installation

pip install nomad-pydantic

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

nomad_pydantic-0.1.0.tar.gz (13.8 kB view details)

Uploaded Source

Built Distribution

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

nomad_pydantic-0.1.0-py3-none-any.whl (15.2 kB view details)

Uploaded Python 3

File details

Details for the file nomad_pydantic-0.1.0.tar.gz.

File metadata

  • Download URL: nomad_pydantic-0.1.0.tar.gz
  • Upload date:
  • Size: 13.8 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.12.13

File hashes

Hashes for nomad_pydantic-0.1.0.tar.gz
Algorithm Hash digest
SHA256 e34e92139a00ee4976ad8659b9afc295fea82b2a190974673cb4439dd497a670
MD5 a3997bc574bf47bf0d3cdd4430fb07a8
BLAKE2b-256 2e039e3c41195eb1032a809af85a63c68fa4fbecfb4239efe8d3e06b790f5b49

See more details on using hashes here.

File details

Details for the file nomad_pydantic-0.1.0-py3-none-any.whl.

File metadata

  • Download URL: nomad_pydantic-0.1.0-py3-none-any.whl
  • Upload date:
  • Size: 15.2 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.12.13

File hashes

Hashes for nomad_pydantic-0.1.0-py3-none-any.whl
Algorithm Hash digest
SHA256 f9748692835fd86af9beba2cee0be643dd48e6a6a8e353eb7891d0ec2475e000
MD5 2ef5d0156268417bf6e11caed1e3b374
BLAKE2b-256 ba14c25ed4dd3759ba9adad5040e5ae445d8ef9a2bd0b0ae13949b580bcfb7ca

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