20 KiB
Generated
Flamenco
Render Farm manager API
The flamenco.manager
package is automatically generated by the OpenAPI Generator project:
- API version: 1.0.0
- Package version: 3.8-alpha1
- Build package: org.openapitools.codegen.languages.PythonClientCodegen For more information, please visit https://flamenco.blender.org/
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_type import AvailableJobType
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.job_blocklist import JobBlocklist
from flamenco.manager.model.job_deletion_info import JobDeletionInfo
from flamenco.manager.model.job_last_rendered_image_info import JobLastRenderedImageInfo
from flamenco.manager.model.job_mass_deletion_selection import JobMassDeletionSelection
from flamenco.manager.model.job_priority_change import JobPriorityChange
from flamenco.manager.model.job_status_change import JobStatusChange
from flamenco.manager.model.job_tasks_summary import JobTasksSummary
from flamenco.manager.model.jobs_query_result import JobsQueryResult
from flamenco.manager.model.submitted_job import SubmittedJob
from flamenco.manager.model.task import Task
from flamenco.manager.model.task_log_info import TaskLogInfo
from flamenco.manager.model.task_status_change import TaskStatusChange
# 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:
# Request deletion this job, including its tasks and any log files. The actual deletion may happen in the background. No job files will be deleted (yet).
api_instance.delete_job(job_id)
except flamenco.manager.ApiException as e:
print("Exception when calling JobsApi->delete_job: %s\n" % e)
Documentation for API Endpoints
All URIs are relative to http://localhost
Class | Method | HTTP request | Description |
---|---|---|---|
JobsApi | delete_job | DELETE /api/v3/jobs/{job_id} | Request deletion this job, including its tasks and any log files. The actual deletion may happen in the background. No job files will be deleted (yet). |
JobsApi | delete_job_mass | DELETE /api/v3/jobs/mass-delete | Mark jobs for deletion, based on certain criteria. |
JobsApi | delete_job_what_would_it_do | GET /api/v3/jobs/{job_id}/what-would-delete-do | Get info about what would be deleted when deleting this job. The job itself, its logs, and the last-rendered images will always be deleted. The job files are only deleted conditionally, and this operation can be used to figure that out. |
JobsApi | fetch_global_last_rendered_info | GET /api/v3/jobs/last-rendered | Get the URL that serves the last-rendered images. |
JobsApi | fetch_job | GET /api/v3/jobs/{job_id} | Fetch info about the job. |
JobsApi | fetch_job_blocklist | GET /api/v3/jobs/{job_id}/blocklist | Fetch the list of workers that are blocked from doing certain task types on this job. |
JobsApi | fetch_job_last_rendered_info | GET /api/v3/jobs/{job_id}/last-rendered | Get the URL that serves the last-rendered images of this job. |
JobsApi | fetch_job_tasks | GET /api/v3/jobs/{job_id}/tasks | Fetch a summary of all tasks of the given job. |
JobsApi | fetch_jobs | GET /api/v3/jobs | List all jobs in the database. |
JobsApi | fetch_task | GET /api/v3/tasks/{task_id} | Fetch a single task. |
JobsApi | fetch_task_log_info | GET /api/v3/tasks/{task_id}/log | Get the URL of the task log, and some more info. |
JobsApi | fetch_task_log_tail | GET /api/v3/tasks/{task_id}/logtail | Fetch the last few lines of the task's log. |
JobsApi | get_job_type | GET /api/v3/jobs/type/{typeName} | Get single job type and its parameters. |
JobsApi | get_job_types | GET /api/v3/jobs/types | Get list of job types and their parameters. |
JobsApi | remove_job_blocklist | DELETE /api/v3/jobs/{job_id}/blocklist | Remove entries from a job blocklist. |
JobsApi | set_job_priority | POST /api/v3/jobs/{job_id}/setpriority | |
JobsApi | set_job_status | POST /api/v3/jobs/{job_id}/setstatus | |
JobsApi | set_task_status | POST /api/v3/tasks/{task_id}/setstatus | |
JobsApi | submit_job | POST /api/v3/jobs | Submit a new job for Flamenco Manager to execute. |
JobsApi | submit_job_check | POST /api/v3/jobs/check | Submit a new job for Flamenco Manager to check. |
MetaApi | check_blender_exe_path | POST /api/v3/configuration/check/blender | Validate a CLI command for use as way to start Blender |
MetaApi | check_shared_storage_path | POST /api/v3/configuration/check/shared-storage | Validate a path for use as shared storage. |
MetaApi | find_blender_exe_path | GET /api/v3/configuration/check/blender | Find one or more CLI commands for use as way to start Blender |
MetaApi | get_configuration | GET /api/v3/configuration | Get the configuration of this Manager. |
MetaApi | get_configuration_file | GET /api/v3/configuration/file | Retrieve the configuration of Flamenco Manager. |
MetaApi | get_farm_status | GET /api/v3/status | Get the status of this Flamenco farm. |
MetaApi | get_shared_storage | GET /api/v3/configuration/shared-storage/{audience}/{platform} | Get the shared storage location of this Manager, adjusted for the given audience and platform. |
MetaApi | get_variables | GET /api/v3/configuration/variables/{audience}/{platform} | Get the variables of this Manager. Used by the Blender add-on to recognise two-way variables, and for the web interface to do variable replacement based on the browser's platform. |
MetaApi | get_version | GET /api/v3/version | Get the Flamenco version of this Manager |
MetaApi | save_setup_assistant_config | POST /api/v3/configuration/setup-assistant | Update the Manager's configuration, and restart it in fully functional mode. |
ShamanApi | shaman_checkout | POST /api/v3/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 /api/v3/shaman/checkout/requirements | Checks a Shaman Requirements file, and reports which files are unknown. |
ShamanApi | shaman_file_store | POST /api/v3/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 /api/v3/shaman/files/{checksum}/{filesize} | Check the status of a file on the Shaman server. |
WorkerApi | may_worker_run | GET /api/v3/worker/task/{task_id}/may-i-run | The response indicates whether the worker is allowed to run / keep running the task. Optionally contains a queued worker status change. |
WorkerApi | register_worker | POST /api/v3/worker/register-worker | Register a new worker |
WorkerApi | schedule_task | POST /api/v3/worker/task | Obtain a new task to execute |
WorkerApi | sign_off | POST /api/v3/worker/sign-off | Mark the worker as offline |
WorkerApi | sign_on | POST /api/v3/worker/sign-on | Authenticate & sign in the worker. |
WorkerApi | task_output_produced | POST /api/v3/worker/task/{task_id}/output-produced | Store the most recently rendered frame here. Note that it is up to the Worker to ensure this is in a format that's digestable by the Manager. Currently only PNG and JPEG support is planned. |
WorkerApi | task_update | POST /api/v3/worker/task/{task_id} | Update the task, typically to indicate progress, completion, or failure. |
WorkerApi | worker_state | GET /api/v3/worker/state | |
WorkerApi | worker_state_changed | POST /api/v3/worker/state-changed | Worker changed state. This could be as acknowledgement of a Manager-requested state change, or in response to worker-local signals. |
WorkerMgtApi | create_worker_tag | POST /api/v3/worker-mgt/tags | Create a new worker tag. |
WorkerMgtApi | delete_worker | DELETE /api/v3/worker-mgt/workers/{worker_id} | Remove the given worker. It is recommended to only call this function when the worker is in `offline` state. If the worker is still running, stop it first. Any task still assigned to the worker will be requeued. |
WorkerMgtApi | delete_worker_tag | DELETE /api/v3/worker-mgt/tag/{tag_id} | Remove this worker tag. This unassigns all workers from the tag and removes it. |
WorkerMgtApi | fetch_worker | GET /api/v3/worker-mgt/workers/{worker_id} | Fetch info about the worker. |
WorkerMgtApi | fetch_worker_sleep_schedule | GET /api/v3/worker-mgt/workers/{worker_id}/sleep-schedule | |
WorkerMgtApi | fetch_worker_tag | GET /api/v3/worker-mgt/tag/{tag_id} | Get a single worker tag. |
WorkerMgtApi | fetch_worker_tags | GET /api/v3/worker-mgt/tags | Get list of worker tags. |
WorkerMgtApi | fetch_workers | GET /api/v3/worker-mgt/workers | Get list of workers. |
WorkerMgtApi | request_worker_status_change | POST /api/v3/worker-mgt/workers/{worker_id}/setstatus | |
WorkerMgtApi | set_worker_sleep_schedule | POST /api/v3/worker-mgt/workers/{worker_id}/sleep-schedule | |
WorkerMgtApi | set_worker_tags | POST /api/v3/worker-mgt/workers/{worker_id}/settags | |
WorkerMgtApi | update_worker_tag | PUT /api/v3/worker-mgt/tag/{tag_id} | Update an existing worker tag. |
Documentation For Models
- AssignedTask
- AvailableJobSetting
- AvailableJobSettingEvalInfo
- AvailableJobSettingSubtype
- AvailableJobSettingType
- AvailableJobSettingVisibility
- AvailableJobType
- AvailableJobTypes
- BlenderPathCheckResult
- BlenderPathFindResult
- BlenderPathSource
- Command
- Error
- EventFarmStatus
- EventJobUpdate
- EventLastRenderedUpdate
- EventLifeCycle
- EventTaskLogUpdate
- EventTaskUpdate
- EventWorkerTagUpdate
- EventWorkerUpdate
- FarmStatus
- FarmStatusReport
- FlamencoVersion
- Job
- JobAllOf
- JobBlocklist
- JobBlocklistEntry
- JobDeletionInfo
- JobLastRenderedImageInfo
- JobMassDeletionSelection
- JobMetadata
- JobPriorityChange
- JobSettings
- JobStatus
- JobStatusChange
- JobStorageInfo
- JobTasksSummary
- JobsQuery
- JobsQueryResult
- LifeCycleEventType
- ManagerConfiguration
- ManagerVariable
- ManagerVariableAudience
- ManagerVariables
- MayKeepRunning
- PathCheckInput
- PathCheckResult
- RegisteredWorker
- SecurityError
- SetupAssistantConfig
- ShamanCheckout
- ShamanCheckoutResult
- ShamanFileSpec
- ShamanFileSpecWithStatus
- ShamanFileStatus
- ShamanRequirementsRequest
- ShamanRequirementsResponse
- ShamanSingleFileStatus
- SharedStorageLocation
- SocketIOSubscription
- SocketIOSubscriptionOperation
- SocketIOSubscriptionType
- SubmittedJob
- Task
- TaskLogInfo
- TaskStatus
- TaskStatusChange
- TaskSummary
- TaskUpdate
- TaskWorker
- Worker
- WorkerAllOf
- WorkerList
- WorkerRegistration
- WorkerSignOn
- WorkerSleepSchedule
- WorkerStateChange
- WorkerStateChanged
- WorkerStatus
- WorkerStatusChangeRequest
- WorkerSummary
- WorkerTag
- WorkerTagChangeRequest
- WorkerTagList
- WorkerTask
- WorkerTaskAllOf
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 *