Inventory

class LabGuruAPI._inventory.Storage(**kwargs)[source]
class_name = 'System::Storage::Storage'

The programmatic class name for the LG API

class_display_name = 'Storages'

The human-readable class name for the LG API

full_location

A string providing the full breadcrumb trail for the item’s location

to_dict(**kwargs) Dict[str, Any][source]

Generates a mapping of LG property fields to values for the object. Generally used for add/update calls.

Parameters:
  • include_other_properties – adds fields contained in other_properties to the dictionary.

  • include_links – will include the links and tags fields in the output dictionary

  • include_id – will include the item’s ID it the output dictionary

Returns:

a dictionary mapping of LG property fields to values

property storage

The parent Storage object

get_boxes() List[Box][source]

Return a list of boxes contained in the current storage element

exception LabGuruAPI._inventory.StockLocationError[source]

Represents a custom exception for stock location errors.

This exception is intended to handle errors specific to stock location processing within an inventory or logistics system. It extends the ValueError to provide more context-specific error handling.

exception LabGuruAPI._inventory.LocationFullError[source]

Exception raised when attempting to exceed location capacity in stock management.

This exception is intended to signal that a specific stock location has reached or exceeded its full capacity, preventing further additions of items to that location. It is a subclass of StockLocationError and can be used to distinguish capacity issues from other stock-related errors.

class LabGuruAPI._inventory.Stock(name: str = '', storage: S | None = None, stockable: LGI | None = None)[source]
xlsx_collection = 'Stock'

The Dataset header/Plate upload name for the object class

marked_as_output

If true, the stock was generated by a LabGuru experiment

location_in_box

The LG position value for the well/position of the stock in the plate/box

barcode

The stock’s barcode. Searchable.

container_type

A physical description of the container. Searchable.

buffer

The buffer that the sample is stored in. Searchable.

quant_method

The method by which the concentration was obtained. Searchable.

reaction_role

The role that the stockable item played in a reaction. Searchable.

stockable = <LG Collection Item : >

The collection item held by the stock

classmethod from_barcode(barcode) Stock | None[source]

Queries the LG API for a stock by its barcode

async classmethod aio_from_barcode(barcode) Stock | None[source]

Asynchronously fetches a Stock object from the database matching the provided barcode.

Parameters:

barcode – The stock’s barcode to search for in the database.

Returns:

The Stock object matching the provided barcode if found, or None if no matching stock exists.

Return type:

Optional[Stock]

property storage: S

The box/plate where the Stock is located. Searchable.

storage_box() Box | None[source]

Old method. No longer needed. :meta private:

get_plate_position() int | None[source]

Old method. No longer needed. :meta private:

get_plate_well(short=True) str | None[source]

Old method. No longer needed. :meta private:

get_plate_tecan_position() int | None[source]

Old method. No longer needed. :meta private:

update_api(session: ~LabGuruAPI._base.Session = <LabGuruAPI._base.Session object>, **kwargs) Stock[source]

Low-level function, please do not use. LabGuruItem.lg_sync is likely the method you want.

mark_as_consumed(session: ~LabGuruAPI._base.Session = <LabGuruAPI._base.Session object>) Stock[source]

Marks the current stock item as consumed in the system using the provided session for authentication and returns the updated stock item.

Parameters:

session (Session) – The session object containing authentication details, including the token needed to authenticate the API request.

Returns:

The updated stock instance after marking it as consumed.

Return type:

Stock

async aio_mark_as_consumed(session: ~LabGuruAPI._base.Session = <LabGuruAPI._base.Session object>) Stock[source]

Marks the current stock item as consumed asynchronously via an API call and updates the current object’s attributes with the data received from the server.

Parameters:

session – Represents the session object that holds authentication and connection details. This is used to interact with the API and must be provided.

Returns:

The updated Stock instance with attributes modified as per the server’s response.

Return type:

Stock

async aio_mark_as_output(session: ~LabGuruAPI._base.Session = <LabGuruAPI._base.Session object>) Stock[source]

Marks the current stock as output using the provided session.

Parameters:

session (Session) – The session object used to authenticate the API request. It should contain a valid token.

Returns:

The updated stock instance after it has been marked as output.

Return type:

Stock

mark_as_output() Stock[source]

Marks the stock instance as output.

Returns:

The updated stock instance after it has been marked as output.

Return type:

Stock

async aio_unmark_as_output(session: ~LabGuruAPI._base.Session = <LabGuruAPI._base.Session object>) Stock[source]

Asynchronously unmarks a stock item as output in the inventory system.

Parameters:

session (Session, optional) – The session object containing the authentication token and configuration needed to make API requests. Defaults to SESSION.

Returns:

The updated instance of the Stock class with the modified attributes

as per the API response data.

Return type:

Stock

unmark_as_output() Stock[source]

Marks the instance as no longer being an output stock object in the system, modifying its metadata accordingly.

Returns:

Returns an updated instance of the Stock object.

Return type:

Stock

property concentration: float

The magnitude of the stock’s concentration

property concentration_unit_id: int

The id of the stock’s concentration unit

property concentration_unit_name: str

The name of the stock’s concentration unit

property molarity: float | None

The molarity of the stock.

If the stock’s concentration is recorded in a variant of molarity (nM, μM, etc.) the value will be converted to standard mol/L. If the stock’s concentration is recorded in ng/μL and it is a Weighted object, it will also be converted to mol/L.

property ng_ul: float | None

The stock’s concentration in ng/μL.

If the stock’s concentration is recorded in a variant of molarity (nM, μM, etc.) and it is a Weighted object, it will be converted to ng/μL.

property micromolarity: float | None

The micromolarity of the stock.

If the stock’s concentration is recorded in a variant of molarity (nM, μM, etc.) the value will be converted to micromolar. If the stock’s concentration is recorded in ng/μL and it is a Weighted object, it will also be converted.

property nanomolarity: float | None

The nanomolarity of the stock.

If the stock’s concentration is recorded in a variant of molarity (nM, μM, etc.) the value will be converted to nanomolar. If the stock’s concentration is recorded in ng/μL and it is a Weighted object, it will also be converted.

ul_needed(ratio: float = 1.0, final_nmolar: float = 2.0, total_ul: float = 10.0) float | None[source]

Calculates the μL of stock needed to achieve a given molarity at the final volume. It can be scaled by a given ratio.

Parameters:
  • ratio – Scalar for the parts ratio needed in the reaction. Default = 1.0

  • final_nmolar – Target nanomolarity for a “standard” part in the reaction. Default = 2.0

  • total_ul – Target volume for the reaction in microliters. Default = 10.0

Returns:

The volume of stock to be used in microliters.

nl_needed(ratio: float = 1.0, final_nmolar: float = 2.0, total_ul: float = 10.0, step: float = 2.5) float | None[source]

Calculates the nL of stock needed to achieve a given molarity at the final volume. It can be scaled by a given ratio.

Parameters:
  • ratio – Scalar for the parts ratio needed in the reaction. Default = 1.0

  • final_nmolar – Target nanomolarity for a “standard” part in the reaction. Default = 2.0

  • total_ul – Target volume for the reaction in nanoliters. Default = 10.0

  • step – Step size for nL calculation if the dispenses are quantized (for the Echo or Mantis). Default = 2.5

Returns:

The volume of stock to be used in nanoliters.

ul_for_ng(ng_needed: float) float | None[source]

The microliters needed to dispense a particular weight of sample.

Parameters:

ng_needed – The nanograms of sample needed for the reaction.

Returns:

The volume of sample in microliters

nl_for_ng(ng_needed: float, step: float = 2.5) float | None[source]

The nanoliters needed to dispense a particular weight of sample.

Parameters:
  • ng_needed – The nanograms of sample needed for the reaction.

  • step – Step size for nL calculation if the dispenses are quantized (for the Echo or Mantis). Default = 2.5

Returns:

The volume of sample in nanoliters

property concentration_string

A human-readable string describing the concentration of the stock.

property is_rxn_product

True if the stock represents a reaction product

property is_rxn_side_product

True if the stock represents a reaction side product

property is_rxn_reactant

True if the stock represents a reactant

property is_rxn_catalyst

True if the stock represents a reaction catalyst

property is_rxn_bystander

True if the stock represents a reaction bystander (like a buffer)

class LabGuruAPI._inventory.StockOptions(stocks: List[Stock])[source]
class LabGuruAPI._inventory.LGStockList[source]
base_type

alias of Stock

class LabGuruAPI._inventory.Box(rows=8, cols=12)[source]
class_name = 'System::Storage::Box'

The programmatic class name for the LG API

class_display_name = 'Boxes'

The human-readable class name for the LG API

xlsx_collection = 'Box'

The Dataset header/Plate upload name for the object class

classmethod from_api(session: ~LabGuruAPI._base.Session = <LabGuruAPI._base.Session object>, item_id: int | None = None, name: str | None = None, uuid: str | None = None, api_url: str | None = None, auto_name: str | None = None, include_custom=False) LGI | None[source]

Low-level function. Please use LabGuruItem.from_LG instead.

to_dict(**kwargs) Dict[str, Any][source]

Generates a mapping of LG property fields to values for the object. Generally used for add/update calls.

Parameters:
  • include_other_properties – adds fields contained in other_properties to the dictionary.

  • include_links – will include the links and tags fields in the output dictionary

  • include_id – will include the item’s ID it the output dictionary

Returns:

a dictionary mapping of LG property fields to values

stocks_from_position(position: int, well_sample_filter: Callable[[Stock], bool] | None = None, **kwargs) List[Stock][source]

Get a list of all stocks at a specified position

copy_stock_to_position(stock: Stock, position: int) Stock[source]

Make a copy of a stock and add it to a specified position

update_stock_at_position(stock: Stock, position: int) Stock[source]

Replace a stock at a specified position with a new one

add_sample_to_position(sample: LGI, position: int) Stock[source]

Adds a collection item to a position. A Stock will be generated automatically

Parameters:
  • sample – the LabGuruItem to add

  • position – the stock’s position in the box

Returns:

the new Stock

add_sample_to_well(sample: LGI, well_name: str) Stock[source]

Adds a collection item to a well. A Stock will be generated automatically

Parameters:
  • sample – the LabGuruItem to add

  • well_name – the stock’s position in the box

Returns:

the new Stock

add_sample_to_tecan_position(sample: LGI, tecan_position: int) Stock[source]

Adds a collection item to a tecan position. A Stock will be generated automatically

Parameters:
  • sample – the LabGuruItem to add

  • tecan_position – the stock’s position in the box

Returns:

the new Stock

resovle_stocks(verbose=False)[source]

Please use aio_resolve_stocks instead. It’s much faster.

aio_resolve_stocks(verbose=True)[source]

An upfront query of all the stocks and collection items in a box. This greatly speeds up working with them later

Parameters:

verbose – if true, a progress bar will be shown for stock and item resolutions. Default: true

class LabGuruAPI._inventory.GridlessBox(rows=8, cols=12)[source]
stocks_from_well(well_name: str, well_sample_filter: Callable[[Stock], bool] | None = None, **kwargs) List[Stock][source]

Get a list of all stocks in a specified well

stocks_from_position(position: int, well_sample_filter: Callable[[Stock], bool] | None = None, **kwargs) List[Stock][source]

Get a list of all stocks at a specified position

update_stock_at_well(stock: Stock, well_name: str) Stock[source]

Replace a stock in a specified well with a new one

update_stock_at_position(stock: Stock, position: int) Stock[source]

Replace a stock at a specified position with a new one

copy_stock_to_well(stock: Stock, well_name: str) Stock[source]

Make a copy of a stock and add it to a specified well

copy_stock_to_position(stock: Stock, position: int) Stock[source]

Make a copy of a stock and add it to a specified position

classmethod parse_api_data(json_data: ~typing.Dict[str, ~typing.Any], session: ~LabGuruAPI._base.Session = <LabGuruAPI._base.Session object>, include_custom=False) LGI[source]

Generates a python object from the LabGuru API’s JSON response. This is a low-level function that should not be used routinely.

Parameters:
  • json_data – the JSON dictionary read from the API

  • session – the active LG session. Please leave as the default value.

  • include_custom – add the LG “custom###” fields to LGI.other_properties. Default: false

Returns:

the python version of the LG object

to_dict(**kwargs) Dict[str, Any][source]

Generates a mapping of LG property fields to values for the object. Generally used for add/update calls.

Parameters:
  • include_other_properties – adds fields contained in other_properties to the dictionary.

  • include_links – will include the links and tags fields in the output dictionary

  • include_id – will include the item’s ID it the output dictionary

Returns:

a dictionary mapping of LG property fields to values

class LabGuruAPI._inventory.PlateDescriptorMixin(*args, **kwargs)[source]

Mixin class for plate descriptors to define attributes and methods used for manipulating plate-related properties.

This class provides functionality for handling plate identification, description parsing and updating, as well as extracting attributes like barcode, label, and plate type. It includes an abstract method get_type that must be implemented by subclasses to specify the plate type. It also offers mechanisms for working with descriptions in a formatted manner, allowing detailed parsing of labels and plate types from delimited strings.

description_delimiter

The delimiter used to split and join the plate description.

Type:

str

description_line_count

The expected number of lines after splitting the description.

Type:

int

name

The name or barcode of the plate.

Type:

LGStr

description

The detailed description of the plate.

Type:

LGStr

property barcode: str

The plate’s barcode. Searchable.

property label: str

The human-readable label on the plate

property plate_type: str

The consumable name of the plate

make_real() Plate[source]

Only implemented for TheoreticalPlate. Returns itself otherwise.

class LabGuruAPI._inventory.Plate(*args, **kwargs)[source]
classmethod parse_api_data(json_data: ~typing.Dict[str, ~typing.Any], session: ~LabGuruAPI._base.Session = <LabGuruAPI._base.Session object>, include_custom=False) LGI[source]

Generates a python object from the LabGuru API’s JSON response. This is a low-level function that should not be used routinely.

Parameters:
  • json_data – the JSON dictionary read from the API

  • session – the active LG session. Please leave as the default value.

  • include_custom – add the LG “custom###” fields to LGI.other_properties. Default: false

Returns:

the python version of the LG object

get_type() Type[Plate][source]

Determines and returns the type of the current instance.

This method provides the ability to access the type of the instance it is called on, which can be used for type comparisons or introspection.

Returns:

The specific type of the current class instance.

Return type:

Type[Plate]

classmethod from_barcode(barcode: str) LGI[source]

Query the LG api for a plate by its barcode

async classmethod async_from_barcode(barcode: str) LGI[source]

Creates an instance of the class asynchronously using the provided barcode.

update_linked_elements()[source]

Updates the HTML of all linked experiment elements

property dataframe: DataFrame

A dataframe containing plate samples and reaction roles

update_api(session: Session, retries=0) LGI[source]

Low-level function, please do not use. LabGuruItem.lg_sync is likely the method you want.

add_reactant_to_well(item: Stock | LGI, well_name: str, **stock_properties) Stock[source]

Adds a reactant to a specified well and updates the dataset with the relevant information. This method is designed to manage reactants within a biochemical or chemical workflow by either using an existing Stock object or creating a new one based on input parameters. Once the reactant is added to the specified well, it updates the dataset with the necessary details including the well name, associated stock attributes, and properties for workflow tracking.

Parameters:
  • item (Union[Stock, LGI]) – The input item to be added. This can be an existing Stock object or another stockable entity of type LGI from which a new Stock will be created.

  • well_name (str) – The name of the well where the reactant is to be added.

  • **stock_properties – Optional keyword arguments used to create a new Stock object if item is not already of type Stock. These properties include additional attributes related to the stock itself.

Returns:

The Stock object associated with the added reactant, either newly created or the existing one.

Return type:

Stock

add_reactant_to_position(item: Stock | LGI, position: int, **stock_properties) Stock[source]

Adds a reactant to a specified position in a well plate. This method serves as a convenience function that maps a given position to a corresponding well name before adding the reactant to the identified well. It supports positional mapping and additional stock properties to customize the reactant being added to the well.

Parameters:
  • item – A reactant object, either of type Stock or LGI, that needs to be added to the specified position in the well plate.

  • position – An integer specifying the target position on the well plate where the reactant will be added.

  • **stock_properties – Arbitrary keyword arguments representing additional properties or specifications for the stock to be added. These properties can be used to customize the behavior or attributes of the stock.

Returns:

The Stock object that was added to the specified well, after the position has been mapped and the stock properties have been applied.

Return type:

Stock

add_reactant_to_tecan_position(item: Stock | LGI, position: int, **stock_properties) Stock[source]

Adds a reactant to a TECAN position with optional stock properties.

Parameters:
  • item (Stock | LGI) – The reactant to be added. Can be an instance of either a Stock or LGI class.

  • position (int) – The TECAN position where the reactant is to be added.

  • **stock_properties – Additional properties to define or modify the stock.

Returns:

The created or updated Stock object after adding the reactant.

Return type:

Stock

add_product_to_well(item: Stock | LGI, well_name: str, **stock_properties) Stock[source]

Adds a product to a specified well in the system. This method ensures that the item is processed as a product before adding it to the corresponding well. If the provided item is already an instance of Stock, its reaction role is updated accordingly. Otherwise, the method creates a new Stock object from the provided item and properties, ensuring that it is configured as a product. Once this preparation is complete, the product is copied into the specified well.

Parameters:
  • item (Union[Stock, LGI]) – The item to add as a product to the well. If the item is an instance of Stock, it will be updated as a product. If it is not, a new Stock object is created from it.

  • well_name (str) – The name of the well to which the product should be added.

  • **stock_properties – Additional properties required for creating a new Stock object if the provided item is not of type Stock.

Returns:

The Stock object that has been added to the specified well after being

processed or created.

Return type:

Stock

add_product_to_position(item: Stock | LGI, position: int, **stock_properties) Stock[source]

Adds a product to a specific position, assigning it additional stock properties if provided.

This method places a product, specified as either a Stock or LGI object, into a designated position in a storage system. The item’s properties are updated if additional stock attributes are supplied.

Parameters:
  • item – The product to be added to the position, either of type Stock or LGI.

  • position – The numeric position where the product should be placed.

  • **stock_properties – Optional keyword arguments representing additional attributes or properties to assign to the product.

Returns:

The added product represented as a Stock object equipped with updated properties.

Return type:

Stock

add_product_to_tecan_position(item: Stock | LGI, position: int, **stock_properties) Stock[source]

Adds a product to the specified Tecan position on the platform.

Parameters:
  • item (Union[Stock, LGI]) – The product to add, which must be of type Stock or LGI.

  • position (int) – The position on the Tecan platform where the product will be added. This is identified by an integer corresponding to a well.

  • **stock_properties – Additional properties for the stock item, such as metadata or parameters, which are passed as keyword arguments.

Returns:

The Stock instance that has been added to the Tecan position.

Return type:

Stock

add_side_product_to_well(item: Stock | LGI, well_name: str, **stock_properties) Stock[source]

Adds a side product to the specified well.

Parameters:
  • item – A Stock object or an LGI object that represents the substance to be added as a side product.

  • well_name – The name of the well where the side product will be added.

  • **stock_properties – Additional attributes for creating a new Stock object when the input item is not an instance of Stock.

Returns:

The Stock object added to the well.

Return type:

Stock

add_side_product_to_position(item: Stock | LGI, position: int, **stock_properties) Stock[source]

Adds a side product to a specified position on the well plate. This method facilitates adding a product by associating it with a specific position using its attributes and additional stock properties provided.

Parameters:
  • item (Union[Stock, LGI]) – The product to be added, which can either be of type Stock or LGI depending on the implementation.

  • position (int) – The index on the well plate where the product should be placed. Position should correspond to specific plate coordinates.

  • **stock_properties – Arbitrary set of additional properties related to the stock, which are passed as keyword arguments.

Returns:

The new stock instance reflecting the added product along with its updated attributes.

Return type:

Stock

add_side_product_to_tecan_position(item: Stock | LGI, position: int, **stock_properties) Stock[source]

Adds a side product to a specified Tecan position in the well.

This method places a stock or LGI item into a specific position of a Tecan well. Additional stock-related properties may also be specified via keyword arguments to further define the item placement.

Parameters:
  • item – The item to be added to the Tecan position. Can be an instance of Stock or LGI.

  • position – The integer position index within the Tecan well where the item will be added.

  • **stock_properties – Arbitrary keyword arguments specifying additional properties of the stock item during placement.

Returns:

The resultant stock item added to the specified position in the Tecan well.

Return type:

Stock

add_catalyst_to_well(item: Stock | LGI, well_name: str, **stock_properties) Stock[source]

Adds a catalyst to a specified well.

If the given item is an instance of the Stock class, it directly assigns its reaction role to ‘Catalyst’ and resets its ID. Otherwise, it creates a new Stock object by specifying the reaction role as ‘Catalyst’ along with the additional properties provided. The resulting Stock object is then added to the specified well using the add_reactant_to_well method.

Parameters:
  • item (Union[Stock, LGI]) – The item to be added as a catalyst. If it’s an instance of Stock, its reaction role is updated. If it’s an LGI, a new Stock instance is created using the given item and stock properties.

  • well_name (str) – The name of the well to which the catalyst will be added.

  • **stock_properties – Additional properties for the Stock object, applicable only when the given item is not already a Stock.

Returns:

The Stock object representing the catalyst that was added to the specified well.

Return type:

Stock

add_catalyst_to_position(item: Stock | LGI, position: int, **stock_properties) Stock[source]

Adds a catalyst item to a specified position on a well plate. The item can be of a specific stock type or a custom LGI type and additional stock properties may be passed for flexibility in processing.

Parameters:
  • item (Union[Stock, LGI]) – The catalyst item to be added, which could be a Stock or LGI object.

  • position (int) – The numeric position on the well plate where the item is to be added, typically corresponding to the plate’s index or coordinates.

  • **stock_properties – Optional keyword arguments that define additional properties of the stock, which can include details such as concentration, volume, or other chemical properties.

Returns:

Returns the stock object that has been added to the well plate.

Return type:

Stock

add_catalyst_to_tecan_position(item: Stock | LGI, position: int, **stock_properties) Stock[source]

Adds a catalyst to a specified Tecan position.

This function adds a given catalyst item to a Tecan position identified by position, applying any additional stock_properties provided.

Parameters:
  • item – The catalyst stock or LGI item to be added to the Tecan position.

  • position – The integer identifier for the specific Tecan well position.

  • **stock_properties – Additional details or configurations for the catalyst being added.

Returns:

The resulting Stock object after the catalyst has been added.

Return type:

Stock

add_bystander_to_well(item: Stock | LGI, well_name: str, **stock_properties) Stock[source]

Adds a bystander to a specified well and updates its properties.

If the provided item is of type Stock, its reaction_role is set to ‘Bystander’ and its id is cleared. Otherwise, a new Stock is created with the given properties and assigned a reaction_role of ‘Bystander’. The item is then added as a reactant to the specified well.

Parameters:
  • item – The item to be added as a bystander to the well. It can be either an instance of Stock or LGI.

  • well_name – The name of the well where the bystander should be added.

  • **stock_properties – Additional properties for creating a new Stock instance for non-Stock items.

Returns:

The updated bystander Stock object added to the well.

Return type:

Stock

add_bystander_to_position(item: Stock | LGI, position: int, **stock_properties) Stock[source]

Adds a bystander to a specified position in the stock.

This method is used to add an item to a specific position in the well plate by converting the position to the corresponding well name. It accepts a product item and its properties and stores them accordingly. The method ensures integration with the existing well-based system by using a helper method for adding the product to the corresponding well.

Parameters:
  • item (Union[Stock, LGI]) – The product to add, which can be of type Stock or LGI, representing different product types.

  • position (int) – The position in the well plate where the product needs to be added. The position is typically an integer index.

  • **stock_properties – Arbitrary keyword arguments containing additional properties or configurations for the stock or product.

Returns:

The added stock after successfully placing it into the specified

position in the well.

Return type:

Stock

add_bystander_to_tecan_position(item: Stock | LGI, position: int, **stock_properties) Stock[source]

Adds a bystander product, either a Stock or LGI object, to a specific Tecan well position. This function associates the given item with a designated Tecan well position, defined by its numerical position, and allows passing additional stock-related properties if required.

Parameters:
  • item – A Stock or LGI object representing the product to be added to the specified Tecan position.

  • position – An integer representing the Tecan well numeric ID that the item will be linked to.

  • **stock_properties – Arbitrary set of key-value properties related to the stock for customization or configuration purposes.

Returns:

The Stock object after being added to the specified Tecan well position.

Return type:

Stock

get_reactants_from_well(well_name) List[Stock][source]

Get the reactants from a specified well.

Parameters:

well_name – The name of the well from which reactant components are to be retrieved.

Returns:

A list of Stock objects representing the reactants in the

specified well.

Return type:

List[Stock]

get_products_from_well(well_name: str) List[Stock][source]

Gets the list of products associated with a specified well.

This method retrieves all the products linked with the given well name by querying relevant data. If no products are found, it fetches the stocks associated with the well instead.

Parameters:

well_name – The name of the well from which products or stocks should be retrieved.

Returns:

A list containing product objects obtained from the well. If no products are found, it returns stocks associated with the well.

Return type:

List[Stock]

get_side_products_from_well(well_name: str) List[Stock][source]

Gets the side products from a specific well.

Parameters:

well_name – The name of the well from which the side products are to be retrieved.

Returns:

A list of Stock objects representing the side products available in the specified well.

Return type:

List[Stock]

get_catalysts_from_well(well_name: str) List[Stock][source]

Fetches all catalysts from a specified well.

Parameters:

well_name – The name of the well from which to retrieve catalyst components.

Returns:

A list of catalyst components retrieved from the

specified well.

Return type:

List[Stock]

get_bystanders_from_well(well_name: str) List[Stock][source]

Retrieves bystander stocks from the specified well.

Parameters:

well_name – The name of the well containing the bystander stocks.

Returns:

A list of Stock objects representing the bystanders found in the specified well.

Return type:

List[Stock]

get_reactants_from_position(position) List[Stock][source]

Retrieves the reactants from a given position.

Parameters:

position – The position to be converted to a well name.

Returns:

A list of Stock objects representing the reactants.

Return type:

List[Stock]

get_reactants_from_tecan_position(tecan_position) List[Stock][source]

Retrieves the reactants from a given Tecan position.

Parameters:

tecan_position – The Tecan position to be converted to a well name.

Returns:

A list of Stock objects representing the reactants.

Return type:

List[Stock]

get_products_from_position(position) List[Stock][source]

Retrieves the products from a given position.

Parameters:

position – The position to be converted to a well name.

Returns:

A list of Stock objects representing the products.

Return type:

List[Stock]

get_products_from_tecan_position(tecan_position) List[Stock][source]

Retrieves the products from a given Tecan position.

Parameters:

tecan_position – The Tecan position to be converted to a well name.

Returns:

A list of Stock objects representing the products.

Return type:

List[Stock]

get_side_products_from_position(position) List[Stock][source]

Retrieves the side products from a given position.

Parameters:

position – The position to be converted to a well name.

Returns:

A list of Stock objects representing the side products.

Return type:

List[Stock]

get_side_products_from_tecan_position(tecan_position) List[Stock][source]

Retrieves the side products from a given Tecan position.

Parameters:

tecan_position – The Tecan position to be converted to a well name.

Returns:

A list of Stock objects representing the side products.

Return type:

List[Stock]

get_catalysts_from_position(position) List[Stock][source]

Retrieves the catalysts from a given position.

Parameters:

position – The position to be converted to a well name.

Returns:

A list of Stock objects representing the catalysts.

Return type:

List[Stock]

get_catalysts_from_tecan_position(tecan_position) List[Stock][source]

Retrieves the catalysts from a given Tecan position.

Parameters:

tecan_position – The Tecan position to be converted to a well name.

Returns:

A list of Stock objects representing the catalysts.

Return type:

List[Stock]

get_bystanders_from_position(position) List[Stock][source]

Retrieves the bystanders from a given position.

Parameters:

position – The position to be converted to a well name.

Returns:

A list of Stock objects representing the bystanders.

Return type:

List[Stock]

get_bystanders_from_tecan_position(tecan_position) List[Stock][source]

Retrieves the bystanders from a given Tecan position.

Parameters:

tecan_position – The Tecan position to be converted to a well name.

Returns:

A list of Stock objects representing the bystanders.

Return type:

List[Stock]

to_html()[source]

Renders a platemap as an HTML table

class LabGuruAPI._inventory.GridlessPlate(*args, **kwargs)[source]
classmethod make_new(overwrite=False, **properties) LGI[source]

Creates a new item without adding it to the database :param overwrite: if true, will get an object by the same name if it exists and overwrite that object :param properties: The initial properties of the object :return: A new instance of the class

class LabGuruAPI._inventory.TheoreticalPlate(*args, **kwargs)[source]
__init__(barcode='', label='', plate_type='', rows=8, cols=12)[source]

A plate that can be manipulated without waiting for API calls. When done, update all plate stocks in parallel using the make_real() method.

stocks_from_position(position: int, **kwargs) List[Stock][source]

Get a list of all stocks at a specified position

copy_stock_to_position(stock: Stock, position: int) Stock[source]

Make a copy of a stock and add it to a specified position

update_stock_at_position(stock: Stock, position: int) Stock[source]

Replace a stock at a specified position with a new one

make_real() Plate[source]

Converts a TheoreticalPlate into a Plate by adding the stocks to LG in parallel.