bioimageio.spec.application.v0_3
1from typing import 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 CiteEntry as CiteEntry 15from ..generic.v0_3 import DeprecatedLicenseId as DeprecatedLicenseId 16from ..generic.v0_3 import Doi as Doi 17from ..generic.v0_3 import GenericDescrBase, LinkedResourceNode, ResourceId 18from ..generic.v0_3 import LicenseId as LicenseId 19from ..generic.v0_3 import LinkedResource as LinkedResource 20from ..generic.v0_3 import Maintainer as Maintainer 21from ..generic.v0_3 import OrcidId as OrcidId 22from ..generic.v0_3 import RelativeFilePath as RelativeFilePath 23from ..generic.v0_3 import Uploader as Uploader 24from ..generic.v0_3 import Version as Version 25 26 27class ApplicationId(ResourceId): 28 pass 29 30 31class ApplicationDescr(GenericDescrBase, title="bioimage.io application specification"): 32 """Bioimage.io description of an application.""" 33 34 type: Literal["application"] = "application" 35 36 id: Optional[ApplicationId] = None 37 """bioimage.io-wide unique resource identifier 38 assigned by bioimage.io; version **un**specific.""" 39 40 parent: Optional[ApplicationId] = None 41 """The description from which this one is derived""" 42 43 source: Annotated[ 44 Optional[ImportantFileSource], 45 Field(description="URL or path to the source of the application"), 46 ] = None 47 """The primary source of the application""" 48 49 50class LinkedApplication(LinkedResourceNode): 51 """Reference to a bioimage.io application.""" 52 53 id: ApplicationId 54 """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
32class ApplicationDescr(GenericDescrBase, title="bioimage.io application specification"): 33 """Bioimage.io description of an application.""" 34 35 type: Literal["application"] = "application" 36 37 id: Optional[ApplicationId] = None 38 """bioimage.io-wide unique resource identifier 39 assigned by bioimage.io; version **un**specific.""" 40 41 parent: Optional[ApplicationId] = None 42 """The description from which this one is derived""" 43 44 source: Annotated[ 45 Optional[ImportantFileSource], 46 Field(description="URL or path to the source of the application"), 47 ] = None 48 """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, metadata=[_PydanticGeneralMetadata(union_mode='left_to_right')]), AfterValidator(func=<function wo_special_file_name at 0x7f9a7f3b8ea0>), PlainSerializer(func=<function _package at 0x7f9a7f3b9620>, 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
51class LinkedApplication(LinkedResourceNode): 52 """Reference to a bioimage.io application.""" 53 54 id: ApplicationId 55 """A valid application `id` from the bioimage.io collection."""
Reference to a bioimage.io application.