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.1.tar.gz (14.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.1-py3-none-any.whl (16.3 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: nomad_pydantic-0.1.1.tar.gz
  • Upload date:
  • Size: 14.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.1.tar.gz
Algorithm Hash digest
SHA256 166d8899d2d1c2300f88ded775deec77bacb8139fe515571851e15f0a2d6d6a2
MD5 532e6819af37fbee04c2a6ab0f236295
BLAKE2b-256 a8a03aa988dc53dcd53ae242ded2f19fef2749a81bf69e25db51362ec30fd16b

See more details on using hashes here.

File details

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

File metadata

  • Download URL: nomad_pydantic-0.1.1-py3-none-any.whl
  • Upload date:
  • Size: 16.3 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.1-py3-none-any.whl
Algorithm Hash digest
SHA256 8f06b2d8276f174b2a509fb064ba6bc9288933a680ec5fd09e128ec18f416561
MD5 5fed832450de66dc6204441ed44fde9f
BLAKE2b-256 4fd8c1e3a9a156123d657b348d8e28fc225197ae7affab2fbd646ac4f28eb822

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