Files
blender-portable-repo/scripts/addons/flamenco/manager/docs/ShamanApi.md
T
2026-03-17 15:25:32 -06:00

13 KiB

flamenco.manager.ShamanApi

All URIs are relative to http://localhost

Method HTTP request Description
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.
shaman_checkout_requirements POST /api/v3/shaman/checkout/requirements Checks a Shaman Requirements file, and reports which files are unknown.
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.
shaman_file_store_check GET /api/v3/shaman/files/{checksum}/{filesize} Check the status of a file on the Shaman server.

shaman_checkout

ShamanCheckoutResult shaman_checkout(shaman_checkout)

Create a directory, and symlink the required files into it. The files must all have been uploaded to Shaman before calling this endpoint.

Example

import time
import flamenco.manager
from flamenco.manager.api import shaman_api
from flamenco.manager.model.error import Error
from flamenco.manager.model.shaman_checkout import ShamanCheckout
from flamenco.manager.model.shaman_checkout_result import ShamanCheckoutResult
from pprint import pprint
# 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() as api_client:
    # Create an instance of the API class
    api_instance = shaman_api.ShamanApi(api_client)
    shaman_checkout = ShamanCheckout(
        files=[
            ShamanFileSpec(
                sha="sha_example",
                size=1,
                path="path_example",
            ),
        ],
        checkout_path="checkout_path_example",
    ) # ShamanCheckout | Set of files to check out.

    # example passing only required values which don't have defaults set
    try:
        # Create a directory, and symlink the required files into it. The files must all have been uploaded to Shaman before calling this endpoint.
        api_response = api_instance.shaman_checkout(shaman_checkout)
        pprint(api_response)
    except flamenco.manager.ApiException as e:
        print("Exception when calling ShamanApi->shaman_checkout: %s\n" % e)

Parameters

Name Type Description Notes
shaman_checkout ShamanCheckout Set of files to check out.

Return type

ShamanCheckoutResult

Authorization

No authorization required

HTTP request headers

  • Content-Type: application/json
  • Accept: application/json

HTTP response details

Status code Description Response headers
200 Checkout was created successfully. -
424 There were files missing. Use `shamanCheckoutRequirements` to figure out which ones. -
409 Checkout already exists. -
0 unexpected error -

[Back to top] [Back to API list] [Back to Model list] [Back to README]

shaman_checkout_requirements

ShamanRequirementsResponse shaman_checkout_requirements(shaman_requirements_request)

Checks a Shaman Requirements file, and reports which files are unknown.

Example

import time
import flamenco.manager
from flamenco.manager.api import shaman_api
from flamenco.manager.model.shaman_requirements_request import ShamanRequirementsRequest
from flamenco.manager.model.error import Error
from flamenco.manager.model.shaman_requirements_response import ShamanRequirementsResponse
from pprint import pprint
# 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() as api_client:
    # Create an instance of the API class
    api_instance = shaman_api.ShamanApi(api_client)
    shaman_requirements_request = ShamanRequirementsRequest(
        files=[
            ShamanFileSpec(
                sha="sha_example",
                size=1,
                path="path_example",
            ),
        ],
    ) # ShamanRequirementsRequest | Set of files to check

    # example passing only required values which don't have defaults set
    try:
        # Checks a Shaman Requirements file, and reports which files are unknown.
        api_response = api_instance.shaman_checkout_requirements(shaman_requirements_request)
        pprint(api_response)
    except flamenco.manager.ApiException as e:
        print("Exception when calling ShamanApi->shaman_checkout_requirements: %s\n" % e)

Parameters

Name Type Description Notes
shaman_requirements_request ShamanRequirementsRequest Set of files to check

Return type

ShamanRequirementsResponse

Authorization

No authorization required

HTTP request headers

  • Content-Type: application/json
  • Accept: application/json

HTTP response details

Status code Description Response headers
200 Subset of the posted requirements, indicating the unknown files. -
0 unexpected error -

[Back to top] [Back to API list] [Back to Model list] [Back to README]

shaman_file_store

shaman_file_store(checksum, filesize, body)

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.

Example

import time
import flamenco.manager
from flamenco.manager.api import shaman_api
from flamenco.manager.model.error import Error
from pprint import pprint
# 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() as api_client:
    # Create an instance of the API class
    api_instance = shaman_api.ShamanApi(api_client)
    checksum = "checksum_example" # str | SHA256 checksum of the file.
    filesize = 1 # int | Size of the file in bytes.
    body = open('/path/to/file', 'rb') # file_type | Contents of the file
    x_shaman_can_defer_upload = True # bool | The client indicates that it can defer uploading this file. The \"208\" response will not only be returned when the file is already fully known to the Shaman server, but also when someone else is currently uploading this file.  (optional)
    x_shaman_original_filename = "X-Shaman-Original-Filename_example" # str | The original filename. If sent along with the request, it will be included in the server logs, which can aid in debugging. MUST either be ASCII or encoded using RFC 2047 (aka MIME encoding). In the latter case the encoding MUST be UTF-8.  (optional)

    # example passing only required values which don't have defaults set
    try:
        # 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. 
        api_instance.shaman_file_store(checksum, filesize, body)
    except flamenco.manager.ApiException as e:
        print("Exception when calling ShamanApi->shaman_file_store: %s\n" % e)

    # example passing only required values which don't have defaults set
    # and optional values
    try:
        # 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. 
        api_instance.shaman_file_store(checksum, filesize, body, x_shaman_can_defer_upload=x_shaman_can_defer_upload, x_shaman_original_filename=x_shaman_original_filename)
    except flamenco.manager.ApiException as e:
        print("Exception when calling ShamanApi->shaman_file_store: %s\n" % e)

Parameters

Name Type Description Notes
checksum str SHA256 checksum of the file.
filesize int Size of the file in bytes.
body file_type Contents of the file
x_shaman_can_defer_upload bool The client indicates that it can defer uploading this file. The "208" response will not only be returned when the file is already fully known to the Shaman server, but also when someone else is currently uploading this file. [optional]
x_shaman_original_filename str The original filename. If sent along with the request, it will be included in the server logs, which can aid in debugging. MUST either be ASCII or encoded using RFC 2047 (aka MIME encoding). In the latter case the encoding MUST be UTF-8. [optional]

Return type

void (empty response body)

Authorization

No authorization required

HTTP request headers

  • Content-Type: application/octet-stream
  • Accept: application/json

HTTP response details

Status code Description Response headers
204 The file was accepted. -
208 The file was already known to the server. -
417 There was a mismatch between the request parameters and the actual file size or checksum of the uploaded file. -
425 Client should defer uploading this file. The file is currently in the process of being uploaded by someone else, and `X-Shaman-Can-Defer-Upload: true` was sent in the request. -
0 unexpected error -

[Back to top] [Back to API list] [Back to Model list] [Back to README]

shaman_file_store_check

ShamanSingleFileStatus shaman_file_store_check(checksum, filesize)

Check the status of a file on the Shaman server.

Example

import time
import flamenco.manager
from flamenco.manager.api import shaman_api
from flamenco.manager.model.error import Error
from flamenco.manager.model.shaman_single_file_status import ShamanSingleFileStatus
from pprint import pprint
# 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() as api_client:
    # Create an instance of the API class
    api_instance = shaman_api.ShamanApi(api_client)
    checksum = "checksum_example" # str | SHA256 checksum of the file.
    filesize = 1 # int | Size of the file in bytes.

    # example passing only required values which don't have defaults set
    try:
        # Check the status of a file on the Shaman server. 
        api_response = api_instance.shaman_file_store_check(checksum, filesize)
        pprint(api_response)
    except flamenco.manager.ApiException as e:
        print("Exception when calling ShamanApi->shaman_file_store_check: %s\n" % e)

Parameters

Name Type Description Notes
checksum str SHA256 checksum of the file.
filesize int Size of the file in bytes.

Return type

ShamanSingleFileStatus

Authorization

No authorization required

HTTP request headers

  • Content-Type: Not defined
  • Accept: application/json

HTTP response details

Status code Description Response headers
200 Normal response. -
0 unexpected error -

[Back to top] [Back to API list] [Back to Model list] [Back to README]