uncountable.core.async_batch.AsyncBatchProcessor ================================================ .. py:class:: uncountable.core.async_batch.AsyncBatchProcessor(*, client) Helper class that provides a standard way to create an ABC using inheritance. .. py:method:: associate_equipment_input(*, equipment_key, material_family_ids, depends_on = None, _request_options = None) Create or return an input association for a piece of equipment within specified material families. The equipment is resolved via identifier key. Supports both direct invocation and async batch execution. Returns modification_made and result_id of the association. :param equipment_key: Identifier of the equipment to associate :param material_family_ids: The list of material families to add the input to. This must be non-empty :param depends_on: A list of batch reference keys to process before processing this request .. py:method:: associate_recipe_as_input(*, recipe_key, input_key = None, show_in_listings = None, depends_on = None, _request_options = None) Associates a recipe as an input (ingredient). When no existing input is specified, creates a new input or returns the existing association if one already exists. When an existing input is specified, associates it with the recipe; fails if that input is already associated with a different recipe. Use `disassociate_recipe_as_input` to remove an existing association first. Returns the input ID and whether a modification was made. :param recipe_key: Identifier for the recipe :param input_key: Identifier for an input to use for the association. Optionally supplied. If not supplied, one is created :param show_in_listings: After associating the input should it be present in listings :param depends_on: A list of batch reference keys to process before processing this request .. py:method:: associate_recipe_as_lot(*, recipe_key, ingredient_key, depends_on = None, _request_options = None) Creates a lot association between a recipe and an ingredient. The recipe becomes a lot for the specified ingredient. Returns whether a modification was made. :param recipe_key: Identifier for the recipe :param ingredient_key: Identifier for the ingredient :param depends_on: A list of batch reference keys to process before processing this request .. py:method:: clear_notebook_content(*, notebook_key, location, depends_on = None, _request_options = None) Permanently removes every cell from the first page of an existing notebook, along with the comments on those cells. This cannot be undone. Subpages and their cells are not changed. Resolves the notebook by identifier key and requires SET_FIELD_VALUE permission on the notebook entity. A locked notebook is refused, and a notebook that does not exist returns a 410 not found error. Clearing a page that holds no cells is a no-op. The response sets only modification_made: true when cells were removed, false when the page already held no cells. To replace the first page, call this endpoint and then add_notebook_content. These are two separate calls: add_notebook_content is not available in async batch, so the two cannot be chained with depends_on, and if the add fails the first page is left empty. :param notebook_key: Identifier key of the notebook to clear: its id, or a batch reference in an async batch. Notebooks have no ref name, so a ref name key fails. :param location: The page of the notebook to clear. Only the first page is supported. :param depends_on: A list of batch reference keys to process before processing this request .. py:method:: clear_recipe_outputs(*, recipe_key, depends_on = None, _request_options = None) Clears all output values and output metadata for a given recipe identified by key. Returns whether a modification was made. :param recipe_key: The identifier of the recipe :param depends_on: A list of batch reference keys to process before processing this request .. py:method:: complete_async_parse(*, async_job_key, upload_destination, parsed_file_data = None, file_id = None, depends_on = None, _request_options = None) Completes the asynchronous parsing step of a file upload workflow. Accepts either inline parsed_file_data or a file_id referencing a JSON file containing the parsed data (exactly one must be provided). Resolves the async job by its identifier key and applies the parsed data to the upload destination. Updates the async job status to COMPLETED upon success. Supports async batch execution. :param parsed_file_data: Inline parsed data. Provide either parsed_file_data or file_id, not both. :param file_id: File ID containing parsed data. Provide either file_id or parsed_file_data, not both. :param depends_on: A list of batch reference keys to process before processing this request .. py:method:: complete_async_upload(*, async_job_id, file_id, depends_on = None, _request_options = None) Completes an asynchronous runsheet export by processing an uploaded file and placing it in the job owner's export downloads folder. Sends an export-complete notification to the job owner on completion. Supports async batch execution. :param depends_on: A list of batch reference keys to process before processing this request .. py:method:: create_mix_order(*, recipe_key, recipe_workflow_step_identifier, depends_on = None, _request_options = None) Creates a mix order on a recipe workflow step. The recipe and workflow step are identified by their respective keys. Returns whether a modification was made. :param depends_on: A list of batch reference keys to process before processing this request .. py:method:: create_or_update_entity(*, entity_type, definition_key, field_values, entity_key = None, on_create_init_field_values = None, depends_on = None, _request_options = None) Creates a new entity or updates an existing one. If the entity already exists, updates its field values. Otherwise, creates a new entity under the specified definition. Returns the entity ID and whether a modification was made. :param on_create_init_field_values: Field values set only when the entity is created (will be ignored if entity already exists) :param depends_on: A list of batch reference keys to process before processing this request .. py:method:: create_recipe(*, material_family_id, workflow_id, name = None, project_id = None, workflow_variant_id = None, recipe_metadata = None, identifiers = None, definition_key = None, recipe_key = None, depends_on = None, _request_options = None) Creates a single recipe in the specified material family and workflow. If a matching recipe already exists, no new recipe is created and the existing recipe ID is returned. Returns the recipe ID. :param name: The name for the recipe :param material_family_id: The material family for the recipe :param project_id: The identifier of the project to create the recipe in :param workflow_id: The identifier of the workflow to create the recipe with :param workflow_variant_id: The identifier of the workflow variant to create the recipe with :param recipe_metadata: Metadata values to populate the recipe with :param identifiers: [DEPRECATED] - use `recipeKey`. A recipe won't be created if it matches the identifier. An identifier must be unique in the schema. An error will be raised if an argument is provided to both `recipeKey` and `identifiers` properties. :param definition_key: The entity definition identifier, default is used if not supplied :param recipe_key: If this identifier matches an existing recipe, the id of the existing recipe will be returned and no update will occur. Use the `lookup_entity` endpoint to match an existing recipe based on a set of field values. :param depends_on: A list of batch reference keys to process before processing this request .. py:method:: current_queue_size() .. py:method:: edit_recipe_inputs(*, recipe_key, recipe_workflow_step_identifier, edits, depends_on = None, _request_options = None) Applies a list of edits to inputs on a specific recipe workflow step. Supported edit types include clearing all inputs, upserting or adding inputs, updating annotations, setting lots, setting propagated percentages, changing basis, adding instructions, adding recipe steps, setting roles, and managing placeholders. :param recipe_key: Identifier for the recipe :param depends_on: A list of batch reference keys to process before processing this request .. py:method:: external_add_entity_comment(*, entity_identifier, content, depends_on = None, _request_options = None) Adds a comment to an entity, creating the entity's comment thread when one does not exist yet. Watchers of the entity and of its comment thread are notified. Comments are not idempotent: each call adds a new comment. :param entity_identifier: Identifier of the entity to add the comment to :param content: The text content of the comment :param depends_on: A list of batch reference keys to process before processing this request .. py:method:: external_lock_entity(*, entity_key, entity_type, globally_removable = None, depends_on = None, _request_options = None) Locks an entity to prevent modifications. Recipe entity types are not supported and must use the dedicated lock_recipes endpoint instead. Attempting to lock an already locked entity is a no-op. :param entity_key: Identifier for the entity :param globally_removable: Should the lock be removable by any user or just admins :param depends_on: A list of batch reference keys to process before processing this request .. py:method:: external_unlock_entity(*, entity_key, entity_type, depends_on = None, _request_options = None) Removes the lock from an entity, allowing modifications again. Recipe entity types are not supported and must use the dedicated unlock_recipes endpoint instead. Attempting to unlock an already unlocked entity is a no-op. :param entity_key: Identifier for the entity :param depends_on: A list of batch reference keys to process before processing this request .. py:method:: get_submitted_job_ids() .. py:method:: grant_entity_permissions(*, entity_type, entity_key, permission_types, user_keys = None, user_group_keys = None, all_users = None, depends_on = None, _request_options = None) Grants permissions on an entity. Only permissions that do not already exist are added. Returns whether any new permissions were granted. :param depends_on: A list of batch reference keys to process before processing this request .. py:method:: ingest_dataset_measurements(*, dataset_key, measurements, depends_on = None, _request_options = None) Adds numeric measurements to a monitor dataset identified by key. Measurements are upserted by observation timestamp. A request must contain at most one measurement for each dataset and observation timestamp. Accepts at most 1,000 measurements per request and supports async batch execution. Returns whether the request included at least one measurement; this is true even when the submitted values already exist. :param dataset_key: The monitor dataset key that will receive the measurements :param measurements: The measurements to upsert. Each dataset and observation timestamp may appear at most once per request. At most 1,000 measurements are accepted per request. :param depends_on: A list of batch reference keys to process before processing this request .. py:method:: invoke_uploader(*, uploader_key, destination, file_id = None, file_ids = None, depends_on = None, _request_options = None) Processes one or more uploaded files through a configured uploader, parsing and writing the extracted data to a recipe destination. Resolves the uploader by its identifier key, or selects it by detection keyword and file extension when uploader_key is null. Requires READ_ALL permission on the uploader entity. The file_ids parameter is preferred; file_id is deprecated. Non-SDK users should use file_upload/external_create_file_record to upload files first. SDK users can use the client.upload_files() helper method. Supports async batch execution. :param file_id: DEPRECATED: use file_ids :param uploader_key: Name an uploader, or pass null to select one by detection keyword and file extension, which fails unless exactly one uploader matches. :param depends_on: A list of batch reference keys to process before processing this request .. py:method:: lock_recipes(*, type = lock_recipes_t.RecipeLockType.ALL, recipes, globally_removable, lock_samples = None, comments = None, depends_on = None, _request_options = None) Locks experiments to prevent editing. Supports locking all data (inputs and measurements) or inputs only. Returns whether a modification was made. :param type: The type of lock to set. All = both inputs and measurements are locked. Inputs Only = only inputs are locked from editing. :param recipes: The recipes to lock, a maximum of 100 can be sent :param globally_removable: If true any user can unlock the experiment. If false the locking user is the only user that can unlock. :param lock_samples: Should associated experiment test samples also be locked. :param comments: Optional comment describing the purpose of locking :param depends_on: A list of batch reference keys to process before processing this request .. py:method:: lookup_entity(*, entity_type, query, depends_on = None, _request_options = None) Looks up an entity by matching field values. Only text and ID field types are supported for matching. Returns the matched entity ID, or null if no match is found. Fails if multiple entities match. Excludes archived entities from results. :param depends_on: A list of batch reference keys to process before processing this request .. py:method:: push_notification(*, notification_targets, subject, message, display_notice = False, entity = None, notice_configuration = None, depends_on = None, _request_options = None) Send a notification to one or more users or user groups. Supports specifying a subject, message body, and optional entity link. Can optionally display as an in-app notice with custom configuration. Supports both direct invocation and async batch execution. :param depends_on: A list of batch reference keys to process before processing this request .. py:method:: remove_recipe_workflow_step(*, recipe_key, recipe_workflow_step_identifier, depends_on = None, _request_options = None) Removes a recipe workflow step from a recipe, together with the inputs on that step. A recipe must keep at least one recipe workflow step, so removing the last one fails; in a batch, all removals from the same recipe count toward this limit. Returns the id of the removed recipe workflow step. :param recipe_workflow_step_identifier: The recipe workflow step to remove. Must resolve to a step on the recipe. :param depends_on: A list of batch reference keys to process before processing this request .. py:method:: run_trigger(*, trigger_ref_name, entity_identifier = None, entity = None, depends_on = None, _request_options = None) Executes a trigger script identified by ref name, optionally on a specific entity, and returns only after the trigger has fully completed. Requires admin user access; non-admin users receive a 403 error. Accepts either entity_identifier (preferred) or entity (deprecated) to specify the target entity, but not both. Returns whether any entities were modified by the trigger execution. :param entity_identifier: Identifier of the entity to run the trigger on. :param entity: [Deprecated: use entity_identifier] Entity to run the trigger on. :param depends_on: A list of batch reference keys to process before processing this request .. py:method:: send() .. py:method:: set_barcode(*, entity_key, barcode_value, depends_on = None, _request_options = None) Sets the barcode value for an entity. Returns whether the new barcode value was set. :param depends_on: A list of batch reference keys to process before processing this request .. py:method:: set_entity_field_values(*, entity_identifier, field_values, depends_on = None, _request_options = None) Sets field values on an entity. Returns whether the field values were modified. :param entity_identifier: Entity to update :param field_values: Field values to set :param depends_on: A list of batch reference keys to process before processing this request .. py:method:: set_recipe_metadata(*, recipe_key, recipe_metadata, depends_on = None, _request_options = None) Sets metadata values on a recipe identified by key. Accepts a list of metadata field-value pairs to populate on the recipe. Fails if any of the metadata fields are read-only. :param recipe_key: Identifier for the recipe :param recipe_metadata: Metadata values to populate the recipe with :param depends_on: A list of batch reference keys to process before processing this request .. py:method:: swap_output_condition_parameters(*, scope, output_key, new_condition, old_condition_key = None, depends_on = None, _request_options = None) Swap output condition parameters on recipes. Either specify recipe keys for targeted swaps or set swap_all to swap across all recipes in the project. :param scope: Which recipes to apply the swap to. See SwapScope variants for options. :param output_key: Identifier for the output on which to swap conditions. :param old_condition_key: Identifier for the old condition to replace. If omitted, recipes without a condition on the output are targeted. :param new_condition: The new output condition to swap to. See NewOutputCondition variants for options. :param depends_on: A list of batch reference keys to process before processing this request .. py:method:: transition_entity_phase(*, transition, entity = None, entity_identifier = None, depends_on = None, _request_options = None) Transitions an entity from one workflow phase to another. Fails if no valid transition exists between the specified phases, or if multiple transitions exist for the same phase pair. :param entity: Entity to transition. If entity_identifier is provided, this should be omitted. :param entity_identifier: Identifier of the entity to transition. If entity is provided, this should be omitted. :param transition: Identifier of the transition to perform :param depends_on: A list of batch reference keys to process before processing this request .. py:method:: unlock_recipes(*, type = unlock_recipes_t.RecipeUnlockType.STANDARD, recipes, unlock_samples = None, depends_on = None, _request_options = None) Unlocks previously locked experiments, making them editable again. Returns whether a modification was made. :param type: The method to unlock recipes. Default is standard. :param recipes: The recipes to unlock, a maximum of 100 can be sent :param unlock_samples: Should associated experiment test samples also be unlocked. :param depends_on: A list of batch reference keys to process before processing this request .. py:method:: upsert_condition_match(*, explicit_name = False, name = None, condition_parameters = None, output_conditions = None, existing_condition_match = None, depends_on = None, _request_options = None) Creates or updates a condition match record. Condition matches are used to set goals on outputs. Each call creates a new condition match — there is no idempotent behavior, so the same inputs will produce a new condition match with each invocation. Each condition parameter's match_type selects how it is matched: range matches min_value/max_value bounds, eq matches exact numeric value(s) supplied in categorical_values (each as a string), eqCategorical matches exact categorical value(s) in categorical_values, and all matches any value. Returns modification_made and result_id of the created or updated condition match. :param depends_on: A list of batch reference keys to process before processing this request .. py:method:: upsert_recipe_workflow_step(*, recipe_key, data_source, location, recipe_workflow_step_key = None, depends_on = None, _request_options = None) Create or update a recipe workflow step on a recipe :param depends_on: A list of batch reference keys to process before processing this request .. py:method:: upsert_step_relationships(*, recipe_key, edits, depends_on = None, _request_options = None) Upsert step relationships on a recipe :param depends_on: A list of batch reference keys to process before processing this request