Skip to main content

Build Status codecov Documentation Status PyPI PyPI - Python Version Code style: black

saltant SDK for Python

saltant-py is a Python SDK for saltant. It lets you perform any action possible on the saltant API (some much more conveniently) within the comforts (hopefully) of Python. As a refresher, you might want to look at saltant's API reference to see what actions are possible.

The documentation for saltant-py is fairly comprehensive, and can be found at saltant-py.readthedocs.io.

Installation

Using pip,

pip install saltant-py

or, from source, after cloning this repository, run

python setup.py install

where python is in versions 2.7 or 3.5+.

Usage

After connecting to the saltant server with

from saltant.client import from_env
client = from_env() # uses env vars

or

from saltant.client import Client
client = Client(
    base_api_url='https://shahlabjobs.ca/api/',
    auth_token='p0gch4mp101fy451do9uod1s1x9i4a')

You can perform API operations on task types:

# Load in a task type
my_task_type = client.container_task_types.get(id=1)

# Edit the description of the task type
my_task_type.description = "this description is better"

# Push the description upstream
my_task_type.put()

You can launch task instances:

# Launch a task instance
my_task_instance = client.container_task_instances.create(
    task_type_id=my_task_type.id,
    task_queue_id=1,
    arguments={"launch_code": 12345},
)

# Wait for the task instance to finish
my_task_instance.wait_until_finished()

And much more! (See the docs for more details.)

See also

saltant-cli, a saltant CLI.

Metadata

Release files for saltant-py 0.4.0

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for saltant-py 0.4.0
File Size Uploaded Provenance
saltant-py-0.4.0.tar.gz 15.5 kB Without provenance Details

Release files / saltant-py-0.4.0.tar.gz

Download URL saltant-py-0.4.0.tar.gz
Size 15.5 kB
Tags Source
SHA-256 checksum
How to use checksums
a076e90ce1a75353ae7c199ccee36cbaeb2265b7522a5f54cd91399e4fa44684
BLAKE2b-256 checksum
How to use checksums
3136af6f3d33706dcee71b682b071a0f8d6058183f327994f660388925f50150
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/1.12.1 pkginfo/1.4.2 requests/2.20.0 setuptools/40.0.0 requests-toolbelt/0.8.0 tqdm/4.28.1 CPython/3.6.7

Security for saltant-py 0.4.0

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

No provenance found

None of the files in this release were uploaded with provenance metadata.

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page