Data types#

class Range(min: float | None = None, max: float | None = None, tolerance: float | None = None)#

Describes a numerical range used for filtering geometries.

Range objects describe a numerical range between a minimum and a maximum boundary. Both are optional. Thus, if no maximum boundary is passed, the range describes values greater than or equal to the minimum boundary. Note that ranges are inclusive. Thus, both minimum and maximum boundaries match if they are equal to the passed value (as opposed to Python’s range() method).

Ranges can be used as a filter in the geometries.list method.

Parameters:
  • min (float | None) – Minimum boundary.

  • max (float | None) – Maximum boundary.

  • tolerance (float | None) – Tolerance delta. Two values whose difference is smaller than the tolerance are considered as equal.

match_value(value: float) bool#

Determine whether the given value belongs to the Range class.

class SubsetEnum(value)#

SubsetEnum: enumeration of possible subsets TrainingData can belong to if any.

unpack_named_file(named_file: Path | str | PathLike | Tuple[BinaryIO | RawIOBase | BufferedIOBase | Path | str | PathLike, str]) Generator[Tuple[BinaryIO, str, str], None, None]#

Unpack a named file by providing a readable file, its name, and an extension.

BoundaryConditions#

BoundaryConditions describes the external conditions of a prediction.

alias of Dict[str, Number]

File#

Either a binary file-object (typing.BinaryIO) or a Path.

alias of BinaryIO | RawIOBase | BufferedIOBase | Path | str | PathLike

Identifiable#

Either a model or the string ID of an object of the same type.

alias of DataModelType | str

MonitorCallback#

Callback used to monitor the download or upload of a file.

For downloads, the callback is called one time with the total size of the download. Subsequent calls are passed the number of bytes read in this iteration.

For uploads, the callback receives the number of bytes written each iteration.

alias of Callable[[int], None]

NamedFile#

A named file is either a FilePath, from which a name can be inferred, or a tuple with a file and a name. To be valid, the name needs to contain an extension.

Example

file = "/path/to/my/file.stl"  # The file is named file.stl
file = ("/path/to/my/file.stl", "override.stl")  # The file is named override.stl
file = (io.BinaryIO(my_data), "file.stl")  # The file is named file.stl

invalid_file = io.BinaryIO(my_data)  # Cannot infer name from binaryIO
invalid_file = "/path/to/my/file"  # Inferred name has no extension
invalid_file = ("/path/to/my/file.stl", "override")  # Specified name has no extension

alias of Path | str | PathLike | Tuple[BinaryIO | RawIOBase | BufferedIOBase | Path | str | PathLike, str]

Path#

Path to a file or folder as an pathlib.Path object or a format supported by pathlib.

alias of Path | str | PathLike