Skip to main content

Multi-purpose library and command line tool that implements functionality to support applications using AWS Deadline Cloud.

Project description

AWS Deadline Cloud Client

pypi python license

AWS Deadline Cloud client is a multi-purpose python library and command line tool for interacting with and submitting Open Job Description (OpenJD) jobs to AWS Deadline Cloud.

To support building workflows on top of AWS Deadline Cloud, it implements its own user interaction, job creation, file upload/download, and other useful helpers around the service's API. It can function as a pipeline tool, a standalone GUI application, or even be embedded within other applications' runtimes.

Notable features include:

  • A command-line interface with subcommands for querying your AWS Deadline Cloud resources, and submitting jobs to your AWS Deadline Cloud Farm.
  • A library of functions that implement AWS Deadline Cloud's Job Attachments functionality.
  • A library of functions for creating a job submission UI within any content creation tool that supports Python 3.8+ based plugins and the Qt GUI framework.

Compatibility

This library requires:

  1. Python 3.8 through 3.13; and
  2. Linux, Windows, or macOS operating system.

Versioning

This package's version follows Semantic Versioning 2.0, but is still considered to be in its initial development, thus backwards incompatible versions are denoted by minor version bumps. To help illustrate how versions will increment during this initial development stage, they are described below:

  1. The MAJOR version is currently 0, indicating initial development.
  2. The MINOR version is currently incremented when backwards incompatible changes are introduced to the public API.
  3. The PATCH version is currently incremented when bug fixes or backwards compatible changes are introduced to the public API.

Contributing

We welcome all contributions. Please see CONTRIBUTING.md for guidance on how to contribute. Please report issues such as bugs, inaccurate or confusing information, and so on, by making feature requests in the issue tracker. We encourage code contributions in the form of pull requests.

Getting Started

The AWS Deadline Cloud client can be installed by the standard python packaging mechanisms:

$ pip install deadline

or if you want the optional gui dependencies:

$ pip install "deadline[gui]"

Usage

After installation it can then be used as a command line tool:

$ deadline farm list
- farmId: farm-1234567890abcdefg
  displayName: my-first-farm

or as a python library:

from deadline.client import api
api.list_farms()
# {'farms': [{'farmId': 'farm-1234567890abcdefg', 'displayName': 'my-first-farm', ...},]}

Job-related Files

For job-related files and data, AWS Deadline Cloud supports either transferring files to AWS using job attachments or reading files from network storage that is shared between both your local workstation and your farm.

Job attachments

Job attachments enable you to transfer files between your workstations and AWS Deadline Cloud using Amazon S3 buckets as content-addressed storage in your AWS account. The use of a content-addressed storage means that a file will never need to be uploaded again once it has been uploaded once.

See job attachments for a more in-depth look at how files are uploaded, stored, and retrieved.

Shared storage and storage profiles

Jobs can reference files that are stored on shared network storage. The Deadline Client uses a storage profile to determine which paths on the workstation are part of the network storage and do not need to be transferred using job attachments.

To use an existing storage profile with the Deadline Client, you can configure your default storage profile via CLI:

deadline config set settings.storage_profile_id sp-10b2e48ad6ac4fc88595dfcbef6271f2

Or with the configuration GUI:

deadline config gui

Shared storage is possible with customer-managed fleets (CMF) but not service-managed fleets (SMF). See shared storage for more information.

Job Bundles

A job bundle is one of the tools that you can use to define jobs for AWS Deadline Cloud. They group an Open Job Description (OpenJD) template with additional information such as files and directories that your jobs use with job attachments. You can use this package's command-line interface and/or its Python interface to use a job bundle to submit jobs for a queue to run. Please see the Job Bundles section of the AWS Deadline Cloud Developer Guide for detailed information on job bundles.

At a minimum, a job bundle is a folder that contains an OpenJD template as a file named template.json or template.yaml. However, it can optionally include:

  1. An asset_references.yaml file - lists file inputs and outputs.
  2. A parameter_values.yaml file - contains the selected values for the job template's parameters.
  3. Any number of additional files required for the job.

For example job bundles, visit the samples repository.

To submit a job bundle, you can run

$ deadline bundle submit <path/to/bundle>

or if you have the optional GUI components installed, you can load up a job bundle for submission by running:

$ deadline bundle gui-submit --browse

On submission, a job bundle will be created in the job history directory (default: ~/.deadline/job_history).

Configuration

You can see the current configuration by running:

$ deadline config show

and change the settings by running the associated get, set and clear commands.

If you need to parse the settings as json, you can specify the output by running:

$ deadline config show --output json

Which will output:

{"settings.config_file_path": "~/.deadline/config", "deadline-cloud-monitor.path": "", "defaults.aws_profile_name": "(default)", "settings.job_history_dir": "~/.deadline/job_history/(default)", "defaults.farm_id": "", "settings.storage_profile_id": "", "defaults.queue_id": "", "defaults.job_id": "", "settings.auto_accept": "false", "settings.conflict_resolution": "NOT_SELECTED", "settings.log_level": "WARNING", "telemetry.opt_out": "false", "telemetry.identifier": "00000000-0000-0000-0000-000000000000", "defaults.job_attachments_file_system": "COPIED", "settings.s3_max_pool_connections": "50", "settings.small_file_threshold_multiplier": "20"}

To see a list of settings that can be configured, run:

$ deadline config --help

Or you can manage settings by a graphical user-interface if you have the optional GUI dependencies:

$ deadline config gui

By default, configuration of AWS Deadline Cloud is provided at ~/.deadline/config, however this can be overridden by the DEADLINE_CONFIG_FILE_PATH environment variable.

Authentication

In addition to the standard AWS credential mechanisms (AWS Profiles, instance profiles, and environment variables), AWS Deadline Cloud monitor credentials are also supported.

To view the currently configured credentials authentication status, run:

$ deadline auth status
    Profile Name: (default)
          Source: HOST_PROVIDED
          Status: AUTHENTICATED
API Availability: True

If the currently selected AWS Profile is set-up to use AWS Deadline Cloud monitor credentials, you can authenticate by logging in:

$ deadline auth login

and removing them by logging out:

$ deadline auth logout

AWS Credentials Integration

You can use the Deadline Cloud client to obtain temporary AWS credentials for a queue and use them with the AWS CLI or SDK. This enables you to create AWS profiles that have queue-specific permissions for use in programmatic workflows.

To export credentials for a queue in a format compatible with the AWS SDK credentials_process interface:

$ deadline queue export-credentials --farm-id farm-1234567890abcdefg --queue-id q-12345abcdef --mode USER
{
  "Version": 1,
  "AccessKeyId": "ASIA...",
  "SecretAccessKey": "wJalr...",
  "SessionToken": "AQoD...",
  "Expiration": "2025-04-08T20:00:46Z"
}

You can then reference this command in your AWS config file to create a profile that uses these credentials. Often this will be a profile from a Deadline Cloud monitor session:

[profile deadline-queue]
credential_process = deadline queue export-credentials --farm-id farm-1234567890abcdefg --queue-id q-12345abcdef --mode USER --profile myfarm-us-west-2
region = us-west-2

Then use this profile with AWS CLI commands:

$ aws s3 ls --profile deadline-queue

Available modes:

  • USER: Credentials with full queue-role permissions.
  • READ: Credentials with read-only permissions for queue logs

Code of Conduct

This project has adopted the Amazon Open Source Code of Conduct. For more information see the Code of Conduct FAQ or contact opensource-codeofconduct@amazon.com with any additional questions or comments.

Security Issue Notifications

We take all security reports seriously. When we receive such reports, we will investigate and subsequently address any potential vulnerabilities as quickly as possible. If you discover a potential security issue in this project, please notify AWS/Amazon Security via our vulnerability reporting page or directly via email to AWS Security. Please do not create a public GitHub issue in this project.

Telemetry

See telemetry for more information.

License

This project is licensed under the Apache-2.0 License.

Optional third party dependencies - GUI

N.B.: Although this repository is released under the Apache-2.0 license, its optional GUI feature uses the third party Qt and PySide projects. The Qt and PySide projects' licensing includes the LGPL-3.0 license.

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

deadline-0.50.1.tar.gz (227.7 kB view details)

Uploaded Source

Built Distribution

deadline-0.50.1-py3-none-any.whl (278.8 kB view details)

Uploaded Python 3

File details

Details for the file deadline-0.50.1.tar.gz.

File metadata

  • Download URL: deadline-0.50.1.tar.gz
  • Upload date:
  • Size: 227.7 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.12.9

File hashes

Hashes for deadline-0.50.1.tar.gz
Algorithm Hash digest
SHA256 7341b6dcc3394816299d3e20385c75c4f24c1fab27bb0bb51e077c2d1df6f635
MD5 b9ccc391ac7ab5de55fd18c97a503fa9
BLAKE2b-256 e98fbb7a4c63d112b3581f8bd558e2e86b68931a69ccd45c057997d451a2ab28

See more details on using hashes here.

Provenance

The following attestation bundles were made for deadline-0.50.1.tar.gz:

Publisher: release_publish.yml on aws-deadline/deadline-cloud

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file deadline-0.50.1-py3-none-any.whl.

File metadata

  • Download URL: deadline-0.50.1-py3-none-any.whl
  • Upload date:
  • Size: 278.8 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.12.9

File hashes

Hashes for deadline-0.50.1-py3-none-any.whl
Algorithm Hash digest
SHA256 6548533f2b1ae82f6c3f3256cc700272393b3a54fc6b9f49e161bc3eff9d6275
MD5 670f6b48c7668c4721f2c8a86f44bb0b
BLAKE2b-256 77e0781f2b2ace36ecf94bad698d2456731cda5ea8c76a506e60d3b690efd97a

See more details on using hashes here.

Provenance

The following attestation bundles were made for deadline-0.50.1-py3-none-any.whl:

Publisher: release_publish.yml on aws-deadline/deadline-cloud

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page