Skip to main content

Add your description here

Project description

Azure Jobs

A simple interface to manage Azure Jobs. Features include:

  1. Create jobs from templates with flexible command line overrides.
  2. Support global and local configurations by using .azurejobs files. (Credentials may be stored here.)
  3. Pretty print job details, export status, link to custom dashboards.
  4. Set up alerts for job events using simple hooks.

Get started

  1. Install the Azure Jobs CLI tool.
pipx install azure_jobs
  1. Setup your credentials by running:
aj init
  1. Pull templates from private repositories:
aj pull <repository-url>
  1. Run jobs using the CLI:
aj run -t <template> <command> [args...]

Template

A template consists of a YAML file defines:

  1. The job's environment (e.g., AML, Singularity)
  2. GPU, CPU resources required
  3. Storages used.
  4. Pre-execution commands (Environment preparation commands)
  5. Account information (e.g., Azure subscription ID)

By default, azure_jobs will store environments in the ~/.azurejobs/environments directory. Storage credentials will be stored in the ~/.azurejobs/storage directory. Account information will be stored in the ~/.azurejobs/account directory.

Templates will be stored in the ~/.azurejobs/templates directory. A reserved template name is default, it will be updated automatically with the latest configuration.

Configuration Structure

base: base_configuration or a list of configurations to merge
config:
    example_a: value_a
    example_b: value_b

Configuration Merging

Configuration can be merged by the following rules:

  1. Dict configuration will be merged recursively.
  2. List configuration will be merged by appending elements from the source list to the target list.
  3. Scalar values will be replaced by the target value.

Here is the code for merging configurations:

def merge_confs(*data):
    # merge multiple dictionaries or lists recursively
    if all(isinstance(d, dict) for d in data):
        merged = {}
        for d in data:
            for key, value in d.items():
                if key in merged:
                    merged[key] = merge_confs(merged[key], value)
                else:
                    merged[key] = value
        return merged
    elif all(isinstance(d, list) for d in data):
        merged = []
        for d in zip(*data):
            merged.append(merge_confs(*d))
        return merged
    return data[-1]

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

azure_jobs-0.1.9.tar.gz (31.3 kB view details)

Uploaded Source

Built Distribution

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

azure_jobs-0.1.9-py3-none-any.whl (6.1 kB view details)

Uploaded Python 3

File details

Details for the file azure_jobs-0.1.9.tar.gz.

File metadata

  • Download URL: azure_jobs-0.1.9.tar.gz
  • Upload date:
  • Size: 31.3 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: uv/0.6.10

File hashes

Hashes for azure_jobs-0.1.9.tar.gz
Algorithm Hash digest
SHA256 59ec8af63a0f3cf873aef4f50531bc423d9e97c6f5c1dc44ea013699f7677751
MD5 5607eff159ed30b985cb4d1376e14078
BLAKE2b-256 9f12899e04dccff35e730b6ce913dc7959090d23b78826f6cad8dd279fdfd00a

See more details on using hashes here.

File details

Details for the file azure_jobs-0.1.9-py3-none-any.whl.

File metadata

  • Download URL: azure_jobs-0.1.9-py3-none-any.whl
  • Upload date:
  • Size: 6.1 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: uv/0.6.10

File hashes

Hashes for azure_jobs-0.1.9-py3-none-any.whl
Algorithm Hash digest
SHA256 d489e29c84b45a7dbfdb87e70e6ca7353c63a40443bff20c7c8bba14adad0289
MD5 7a2f67d7719e081f78a5c4d749834646
BLAKE2b-256 3592f859797343e8a9b48e0c4e1c2bdbea348dccc1dcd4535a6c98417c4b3ee9

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