bioimageio.spec.application.v0_3
1from typing import TYPE_CHECKING, ClassVar, Literal, Optional 2 3from pydantic import Field 4from typing_extensions import Annotated 5 6from .._internal.io import FileDescr as FileDescr 7from .._internal.io_basics import AbsoluteFilePath as AbsoluteFilePath 8from .._internal.io_basics import Sha256 as Sha256 9from .._internal.types import ImportantFileSource 10from .._internal.url import HttpUrl as HttpUrl 11from ..generic.v0_3 import VALID_COVER_IMAGE_EXTENSIONS as VALID_COVER_IMAGE_EXTENSIONS 12from ..generic.v0_3 import Author as Author 13from ..generic.v0_3 import BadgeDescr as BadgeDescr 14from ..generic.v0_3 import BioimageioConfig as BioimageioConfig 15from ..generic.v0_3 import CiteEntry as CiteEntry 16from ..generic.v0_3 import Config as Config 17from ..generic.v0_3 import DeprecatedLicenseId as DeprecatedLicenseId 18from ..generic.v0_3 import Doi as Doi 19from ..generic.v0_3 import GenericDescrBase, LinkedResourceBase, ResourceId 20from ..generic.v0_3 import LicenseId as LicenseId 21from ..generic.v0_3 import LinkedResource as LinkedResource 22from ..generic.v0_3 import Maintainer as Maintainer 23from ..generic.v0_3 import OrcidId as OrcidId 24from ..generic.v0_3 import RelativeFilePath as RelativeFilePath 25from ..generic.v0_3 import Uploader as Uploader 26from ..generic.v0_3 import Version as Version 27 28 29class ApplicationId(ResourceId): 30 pass 31 32 33class ApplicationDescr(GenericDescrBase): 34 """Bioimage.io description of an application.""" 35 36 implemented_type: ClassVar[Literal["application"]] = "application" 37 if TYPE_CHECKING: 38 type: Literal["application"] = "application" 39 else: 40 type: Literal["application"] 41 42 id: Optional[ApplicationId] = None 43 """bioimage.io-wide unique resource identifier 44 assigned by bioimage.io; version **un**specific.""" 45 46 parent: Optional[ApplicationId] = None 47 """The description from which this one is derived""" 48 49 source: Annotated[ 50 Optional[ImportantFileSource], 51 Field(description="URL or path to the source of the application"), 52 ] = None 53 """The primary source of the application""" 54 55 56class LinkedApplication(LinkedResourceBase): 57 """Reference to a bioimage.io application.""" 58 59 id: ApplicationId 60 """A valid application `id` from the bioimage.io collection."""
str(object='') -> str str(bytes_or_buffer[, encoding[, errors]]) -> str
Create a new string object from the given object. If encoding or errors is specified, then the object must expose a data buffer that will be decoded using the given encoding and error handler. Otherwise, returns the result of object.__str__() (if defined) or repr(object). encoding defaults to sys.getdefaultencoding(). errors defaults to 'strict'.
Inherited Members
34class ApplicationDescr(GenericDescrBase): 35 """Bioimage.io description of an application.""" 36 37 implemented_type: ClassVar[Literal["application"]] = "application" 38 if TYPE_CHECKING: 39 type: Literal["application"] = "application" 40 else: 41 type: Literal["application"] 42 43 id: Optional[ApplicationId] = None 44 """bioimage.io-wide unique resource identifier 45 assigned by bioimage.io; version **un**specific.""" 46 47 parent: Optional[ApplicationId] = None 48 """The description from which this one is derived""" 49 50 source: Annotated[ 51 Optional[ImportantFileSource], 52 Field(description="URL or path to the source of the application"), 53 ] = None 54 """The primary source of the application"""
Bioimage.io description of an application.
id: Optional[ApplicationId]
bioimage.io-wide unique resource identifier assigned by bioimage.io; version unspecific.
source: Annotated[Optional[Annotated[Union[bioimageio.spec._internal.url.HttpUrl, bioimageio.spec._internal.io.RelativeFilePath, Annotated[pathlib.Path, PathType(path_type='file'), FieldInfo(annotation=NoneType, required=True, title='FilePath')]], FieldInfo(annotation=NoneType, required=True, metadata=[_PydanticGeneralMetadata(union_mode='left_to_right')]), AfterValidator(func=<function wo_special_file_name at 0x7f2602536ca0>), PlainSerializer(func=<function _package at 0x7f2602535e40>, return_type=PydanticUndefined, when_used='unless-none')]], FieldInfo(annotation=NoneType, required=True, description='URL or path to the source of the application')]
The primary source of the application
def
model_post_init(self: pydantic.main.BaseModel, context: Any, /) -> None:
124 def wrapped_model_post_init(self: BaseModel, context: Any, /) -> None: 125 """We need to both initialize private attributes and call the user-defined model_post_init 126 method. 127 """ 128 init_private_attributes(self, context) 129 original_model_post_init(self, context)
We need to both initialize private attributes and call the user-defined model_post_init method.
Inherited Members
57class LinkedApplication(LinkedResourceBase): 58 """Reference to a bioimage.io application.""" 59 60 id: ApplicationId 61 """A valid application `id` from the bioimage.io collection."""
Reference to a bioimage.io application.