8.1 KiB
Flamenco
Render Farm manager API
The flamenco.manager
package is automatically generated by the OpenAPI Generator project:
- API version: 1.0.0
- Package version:
2fb3b4d6
- Build package: org.openapitools.codegen.languages.PythonClientCodegen For more information, please visit https://flamenco.io/
Requirements.
Python >=3.6
Installation & Usage
This python library package is generated without supporting files like setup.py or requirements files
To be able to use it, you will need these dependencies in your own package that uses this library:
- urllib3 >= 1.25.3
- python-dateutil
Getting Started
In your own code, to use this library to connect and interact with Flamenco, you can run the following:
import time
import flamenco.manager
from pprint import pprint
from flamenco.manager.api import jobs_api
from flamenco.manager.model.available_job_types import AvailableJobTypes
from flamenco.manager.model.error import Error
from flamenco.manager.model.job import Job
from flamenco.manager.model.jobs_query import JobsQuery
from flamenco.manager.model.jobs_query_result import JobsQueryResult
from flamenco.manager.model.submitted_job import SubmittedJob
# Defining the host is optional and defaults to http://localhost
# See configuration.py for a list of all supported configuration parameters.
configuration = flamenco.manager.Configuration(
host = "http://localhost"
)
# Enter a context with an instance of the API client
with flamenco.manager.ApiClient(configuration) as api_client:
# Create an instance of the API class
api_instance = jobs_api.JobsApi(api_client)
job_id = "job_id_example" # str |
try:
# Fetch info about the job.
api_response = api_instance.fetch_job(job_id)
pprint(api_response)
except flamenco.manager.ApiException as e:
print("Exception when calling JobsApi->fetch_job: %s\n" % e)
Documentation for API Endpoints
All URIs are relative to http://localhost
Class | Method | HTTP request | Description |
---|---|---|---|
JobsApi | fetch_job | GET /api/jobs/{job_id} | Fetch info about the job. |
JobsApi | get_job_types | GET /api/jobs/types | Get list of job types and their parameters. |
JobsApi | query_jobs | POST /api/jobs/query | Fetch list of jobs. |
JobsApi | submit_job | POST /api/jobs | Submit a new job for Flamenco Manager to execute. |
MetaApi | get_configuration | GET /api/configuration | Get the configuration of this Manager. |
MetaApi | get_version | GET /api/version | Get the Flamenco version of this Manager |
ShamanApi | shaman_checkout | POST /shaman/checkout/create | Create a directory, and symlink the required files into it. The files must all have been uploaded to Shaman before calling this endpoint. |
ShamanApi | shaman_checkout_requirements | POST /shaman/checkout/requirements | Checks a Shaman Requirements file, and reports which files are unknown. |
ShamanApi | shaman_file_store | POST /shaman/files/{checksum}/{filesize} | Store a new file on the Shaman server. Note that the Shaman server can forcibly close the HTTP connection when another client finishes uploading the exact same file, to prevent double uploads. The file's contents should be sent in the request body. |
ShamanApi | shaman_file_store_check | GET /shaman/files/{checksum}/{filesize} | Check the status of a file on the Shaman server. |
WorkerApi | register_worker | POST /api/worker/register-worker | Register a new worker |
WorkerApi | schedule_task | POST /api/worker/task | Obtain a new task to execute |
WorkerApi | sign_off | POST /api/worker/sign-off | Mark the worker as offline |
WorkerApi | sign_on | POST /api/worker/sign-on | Authenticate & sign in the worker. |
WorkerApi | task_update | POST /api/worker/task/{task_id} | Update the task, typically to indicate progress, completion, or failure. |
WorkerApi | worker_state | GET /api/worker/state | |
WorkerApi | worker_state_changed | POST /api/worker/state-changed | Worker changed state. This could be as acknowledgement of a Manager-requested state change, or in response to worker-local signals. |
Documentation For Models
- AssignedTask
- AvailableJobSetting
- AvailableJobSettingSubtype
- AvailableJobSettingType
- AvailableJobType
- AvailableJobTypes
- Command
- Error
- FlamencoVersion
- Job
- JobAllOf
- JobMetadata
- JobSettings
- JobStatus
- JobUpdate
- JobsQuery
- JobsQueryResult
- ManagerConfiguration
- RegisteredWorker
- SecurityError
- ShamanCheckout
- ShamanCheckoutResult
- ShamanFileSpec
- ShamanFileSpecWithStatus
- ShamanFileStatus
- ShamanRequirementsRequest
- ShamanRequirementsResponse
- ShamanSingleFileStatus
- SubmittedJob
- TaskStatus
- TaskUpdate
- WorkerRegistration
- WorkerSignOn
- WorkerStateChange
- WorkerStateChanged
- WorkerStatus
Documentation For Authorization
worker_auth
- Type: HTTP basic authentication
Author
Notes for Large OpenAPI documents
If the OpenAPI document is large, imports in flamenco.manager.apis and flamenco.manager.models may fail with a RecursionError indicating the maximum recursion limit has been exceeded. In that case, there are a couple of solutions:
Solution 1: Use specific imports for apis and models like:
from flamenco.manager.api.default_api import DefaultApi
from flamenco.manager.model.pet import Pet
Solution 2: Before importing the package, adjust the maximum recursion limit as shown below:
import sys
sys.setrecursionlimit(1500)
import flamenco.manager
from flamenco.manager.apis import *
from flamenco.manager.models import *