common
¤
Common nodes and field types of bioimage.io specifications.
Classes:
| Name | Description |
|---|---|
BytesReader |
|
FileDescr |
A file description |
FtpUrl |
An untested FTP URL |
HttpUrl |
A URL with the HTTP or HTTPS scheme. |
InvalidDescr |
A representation of an invalid resource description |
ProgressbarLike |
Progressbar protocol modeled after tqdm |
RelativeFilePath |
A path relative to the |
RootHttpUrl |
An untested HTTP URL, possibly a 'URL folder' |
Sha256 |
A SHA-256 hash value |
Attributes:
| Name | Type | Description |
|---|---|---|
AbsoluteDirectory |
|
|
AbsoluteFilePath |
|
|
BioimageioYamlContent |
|
|
BioimageioYamlSource |
TypeAlias
|
|
FileName |
|
|
FilePath |
|
|
FileSource |
TypeAlias
|
|
PermissiveFileSource |
TypeAlias
|
|
YamlValue |
TypeAlias
|
|
ZipPath |
|
AbsoluteDirectory
module-attribute
¤
AbsoluteDirectory = Annotated[
pydantic.DirectoryPath,
Predicate(Path.is_absolute),
pydantic.Field(title="AbsoluteDirectory"),
]
-
API Reference
commonBytesReader
AbsoluteFilePath
module-attribute
¤
AbsoluteFilePath = Annotated[
pydantic.FilePath,
Predicate(Path.is_absolute),
pydantic.Field(title="AbsoluteFilePath"),
]
-
API Reference
specget_resource_package_content
BioimageioYamlContent
module-attribute
¤
BioimageioYamlContent = Dict[str, YamlValue]
-
API Reference
spec
BioimageioYamlSource
module-attribute
¤
BioimageioYamlSource: TypeAlias = Union[
PermissiveFileSource,
ZipFile,
BioimageioYamlContent,
BioimageioYamlContentView,
]
FilePath
module-attribute
¤
-
v0_2NotebookSource -
v0_3NotebookSource -
API Reference
commonFileSource
FileSource
module-attribute
¤
FileSource: TypeAlias = Annotated[
Union[HttpUrl, RelativeFilePath, FilePath],
Field(title="FileSource", union_mode="left_to_right"),
]
-
API Reference
utilsinterprete_file_source
- API Reference
PermissiveFileSource
module-attribute
¤
PermissiveFileSource: TypeAlias = Union[
FileSource, str, pydantic.HttpUrl, FileDescr, ZipPath
]
YamlValue
module-attribute
¤
YamlValue: TypeAlias = Union[
YamlLeafValue,
List["YamlValue"],
Dict[YamlKey, "YamlValue"],
]
-
v0_5BioimageioYamlContent - API Reference
ZipPath
module-attribute
¤
ZipPath = zipp.Path
-
API Reference
specget_resource_package_content
BytesReader
¤
BytesReader(
reader: BytesReaderP | BytesReaderIntoP,
*,
sha256: Sha256 | None,
suffix: Suffix,
original_file_name: FileName,
original_root: RootHttpUrl
| AbsoluteDirectory
| ZipFile,
is_zipfile: bool | None,
)
Bases: BytesReaderP
flowchart TD
bioimageio.spec.common.BytesReader[BytesReader]
bioimageio.spec._internal.io_basics.BytesReaderP[BytesReaderP]
bioimageio.spec._internal.io_basics.BytesReaderP --> bioimageio.spec.common.BytesReader
click bioimageio.spec.common.BytesReader href "" "bioimageio.spec.common.BytesReader"
click bioimageio.spec._internal.io_basics.BytesReaderP href "" "bioimageio.spec._internal.io_basics.BytesReaderP"
-
API Reference
utilsget_reader
Methods:
| Name | Description |
|---|---|
read |
|
read_text |
|
readable |
|
seek |
|
seekable |
|
tell |
|
Attributes:
| Name | Type | Description |
|---|---|---|
closed |
bool
|
|
is_zipfile |
bool
|
|
original_file_name |
FileName
|
|
original_root |
RootHttpUrl | AbsoluteDirectory | ZipFile
|
|
sha256 |
Sha256
|
|
suffix |
Suffix
|
|
Source code in src/bioimageio/spec/_internal/io_basics.py
78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 | |
read
¤
read(size: int = -1) -> bytes
Source code in src/bioimageio/spec/_internal/io_basics.py
128 129 | |
read_text
¤
read_text(encoding: str = 'utf-8') -> str
Source code in src/bioimageio/spec/_internal/io_basics.py
131 132 | |
readable
¤
readable() -> bool
Source code in src/bioimageio/spec/_internal/io_basics.py
134 135 | |
seek
¤
seek(offset: int, whence: int = os.SEEK_SET) -> int
Source code in src/bioimageio/spec/_internal/io_basics.py
137 138 | |
seekable
¤
seekable() -> bool
Source code in src/bioimageio/spec/_internal/io_basics.py
140 141 | |
tell
¤
tell() -> int
Source code in src/bioimageio/spec/_internal/io_basics.py
143 144 | |
FileDescr
pydantic-model
¤
Bases: Node
A file description
Show JSON schema:
{
"$defs": {
"RelativeFilePath": {
"description": "A path relative to the `rdf.yaml` file (also if the RDF source is a URL).",
"format": "path",
"title": "RelativeFilePath",
"type": "string"
}
},
"additionalProperties": false,
"description": "A file description",
"properties": {
"source": {
"anyOf": [
{
"description": "A URL with the HTTP or HTTPS scheme.",
"format": "uri",
"maxLength": 2083,
"minLength": 1,
"title": "HttpUrl",
"type": "string"
},
{
"$ref": "#/$defs/RelativeFilePath"
},
{
"format": "file-path",
"title": "FilePath",
"type": "string"
}
],
"description": "File source",
"title": "FileSource"
},
"sha256": {
"anyOf": [
{
"description": "A SHA-256 hash value",
"maxLength": 64,
"minLength": 64,
"title": "Sha256",
"type": "string"
},
{
"type": "null"
}
],
"default": null,
"description": "SHA256 hash value of the **source** file.",
"title": "Sha256"
}
},
"required": [
"source"
],
"title": "_internal.io.FileDescr",
"type": "object"
}
Fields:
-
source(FileSource) -
sha256(Sha256 | None)
Validators:
-
_validate_sha256
dict_from_kwargs
classmethod
¤
dict_from_kwargs(
*args: P.args, **kwargs: P.kwargs
) -> dict[str, Any]
Source code in src/bioimageio/spec/_internal/node.py
93 94 95 96 97 98 | |
download
¤
download(
*,
progressbar: ProgressbarLike
| Callable[[], ProgressbarLike]
| bool
| None = None,
)
alias for .get_reader
Source code in src/bioimageio/spec/_internal/io.py
372 373 374 375 376 377 378 379 380 381 | |
get_reader
¤
get_reader(
*,
progressbar: ProgressbarLike
| Callable[[], ProgressbarLike]
| bool
| None = None,
)
open the file source (download if needed)
Source code in src/bioimageio/spec/_internal/io.py
361 362 363 364 365 366 367 368 369 370 | |
model_validate
classmethod
¤
model_validate(
obj: Any | Mapping[str, Any],
*,
strict: bool | None = None,
extra: Literal["allow", "ignore", "forbid"]
| None = None,
from_attributes: bool | None = None,
context: ValidationContext
| Mapping[str, Any]
| None = None,
by_alias: bool | None = None,
by_name: bool | None = None,
) -> Self
Validate a pydantic model instance.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
|
Any | Mapping[str, Any]
|
The object to validate. |
required |
|
bool | None
|
Whether to raise an exception on invalid fields. |
None
|
|
bool | None
|
Whether to extract data from object attributes. |
None
|
|
ValidationContext | Mapping[str, Any] | None
|
Additional context to pass to the validator. |
None
|
Raises:
| Type | Description |
|---|---|
ValidationError
|
If the object failed validation. |
Returns:
| Type | Description |
|---|---|
Self
|
The validated description instance. |
Source code in src/bioimageio/spec/_internal/node.py
48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 | |
validate_sha256
¤
validate_sha256(force_recompute: bool = False) -> None
validate the sha256 hash value of the source file
Source code in src/bioimageio/spec/_internal/io.py
327 328 329 330 331 332 333 334 335 336 337 338 339 340 341 342 343 344 345 346 347 348 349 350 351 352 353 354 355 356 357 358 359 | |
FtpUrl
¤
Bases: _RootUrl[pydantic.FtpUrl]
flowchart TD
bioimageio.spec.common.FtpUrl[FtpUrl]
bioimageio.spec._internal.root_url._RootUrl[_RootUrl]
bioimageio.spec._internal.validated_string.ValidatedString[ValidatedString]
bioimageio.spec._internal.root_url._RootUrl --> bioimageio.spec.common.FtpUrl
bioimageio.spec._internal.validated_string.ValidatedString --> bioimageio.spec._internal.root_url._RootUrl
click bioimageio.spec.common.FtpUrl href "" "bioimageio.spec.common.FtpUrl"
click bioimageio.spec._internal.root_url._RootUrl href "" "bioimageio.spec._internal.root_url._RootUrl"
click bioimageio.spec._internal.validated_string.ValidatedString href "" "bioimageio.spec._internal.validated_string.ValidatedString"
An untested FTP URL
Methods:
| Name | Description |
|---|---|
__get_pydantic_core_schema__ |
|
__get_pydantic_json_schema__ |
|
__new__ |
|
__truediv__ |
|
absolute |
analog to |
Attributes:
| Name | Type | Description |
|---|---|---|
host |
str | None
|
|
parent |
FtpUrl
|
|
parents |
Iterable[FtpUrl]
|
iterate over all URL parents (max 100) |
path |
str | None
|
|
root_model |
type[RootModel[Any]]
|
the pydantic root model to validate the string |
scheme |
str
|
|
suffix |
str
|
|
suffixes |
list[str]
|
|
root_model
class-attribute
¤
the pydantic root model to validate the string
__get_pydantic_core_schema__
classmethod
¤
__get_pydantic_core_schema__(
source_type: Any, handler: GetCoreSchemaHandler
) -> CoreSchema
Source code in src/bioimageio/spec/_internal/validated_string.py
31 32 33 34 35 | |
__get_pydantic_json_schema__
classmethod
¤
__get_pydantic_json_schema__(
core_schema: CoreSchema, handler: GetJsonSchemaHandler
) -> JsonSchemaValue
Source code in src/bioimageio/spec/_internal/validated_string.py
37 38 39 40 41 42 43 44 45 46 | |
__new__
¤
__new__(object: object)
Source code in src/bioimageio/spec/_internal/validated_string.py
21 22 23 24 25 | |
__truediv__
¤
__truediv__(other: str) -> RootHttpUrl
Source code in src/bioimageio/spec/_internal/root_url.py
52 53 54 55 56 57 58 59 60 61 62 63 64 | |
absolute
¤
absolute()
analog to absolute method of pathlib.
Source code in src/bioimageio/spec/_internal/root_url.py
22 23 24 | |
HttpUrl
¤
Bases: RootHttpUrl
flowchart TD
bioimageio.spec.common.HttpUrl[HttpUrl]
bioimageio.spec._internal.root_url.RootHttpUrl[RootHttpUrl]
bioimageio.spec._internal.root_url._RootUrl[_RootUrl]
bioimageio.spec._internal.validated_string.ValidatedString[ValidatedString]
bioimageio.spec._internal.root_url.RootHttpUrl --> bioimageio.spec.common.HttpUrl
bioimageio.spec._internal.root_url._RootUrl --> bioimageio.spec._internal.root_url.RootHttpUrl
bioimageio.spec._internal.validated_string.ValidatedString --> bioimageio.spec._internal.root_url._RootUrl
click bioimageio.spec.common.HttpUrl href "" "bioimageio.spec.common.HttpUrl"
click bioimageio.spec._internal.root_url.RootHttpUrl href "" "bioimageio.spec._internal.root_url.RootHttpUrl"
click bioimageio.spec._internal.root_url._RootUrl href "" "bioimageio.spec._internal.root_url._RootUrl"
click bioimageio.spec._internal.validated_string.ValidatedString href "" "bioimageio.spec._internal.validated_string.ValidatedString"
A URL with the HTTP or HTTPS scheme.
-
API Reference
spec
-
v0_2RelativeFilePath -
v0_2RelativeFilePath -
v0_2RelativeFilePath -
v0_2RelativeFilePath -
v0_3RelativeFilePath -
v0_3RelativeFilePath -
v0_3RelativeFilePath -
v0_3RelativeFilePath -
v0_4RelativeFilePath -
v0_5RelativeFilePath -
API Reference
commonRelativeFilePath
-
v0_2NotebookSource -
v0_3NotebookSource -
API Reference
commonFileSource
Methods:
| Name | Description |
|---|---|
__get_pydantic_core_schema__ |
|
__get_pydantic_json_schema__ |
|
__new__ |
|
__truediv__ |
|
absolute |
analog to |
exists |
True if URL is available |
Attributes:
| Name | Type | Description |
|---|---|---|
host |
str | None
|
|
parent |
RootHttpUrl
|
|
parents |
Iterable[RootHttpUrl]
|
iterate over all URL parents (max 100) |
path |
str | None
|
|
root_model |
type[RootModel[Any]]
|
the pydantic root model to validate the string |
scheme |
str
|
|
suffix |
str
|
|
suffixes |
list[str]
|
|
root_model
class-attribute
¤
the pydantic root model to validate the string
__get_pydantic_core_schema__
classmethod
¤
__get_pydantic_core_schema__(
source_type: Any, handler: GetCoreSchemaHandler
) -> CoreSchema
Source code in src/bioimageio/spec/_internal/validated_string.py
31 32 33 34 35 | |
__get_pydantic_json_schema__
classmethod
¤
__get_pydantic_json_schema__(
core_schema: CoreSchema, handler: GetJsonSchemaHandler
) -> JsonSchemaValue
Source code in src/bioimageio/spec/_internal/validated_string.py
37 38 39 40 41 42 43 44 45 46 | |
__new__
¤
__new__(object: object)
Source code in src/bioimageio/spec/_internal/validated_string.py
21 22 23 24 25 | |
__truediv__
¤
__truediv__(other: str) -> RootHttpUrl
Source code in src/bioimageio/spec/_internal/root_url.py
52 53 54 55 56 57 58 59 60 61 62 63 64 | |
absolute
¤
absolute()
analog to absolute method of pathlib.
Source code in src/bioimageio/spec/_internal/root_url.py
22 23 24 | |
exists
¤
exists()
True if URL is available
Source code in src/bioimageio/spec/_internal/url.py
143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 | |
InvalidDescr
pydantic-model
¤
Bases: ResourceDescrBase
A representation of an invalid resource description
Show JSON schema:
{
"additionalProperties": true,
"description": "A representation of an invalid resource description",
"properties": {
"type": {
"title": "Type"
},
"format_version": {
"title": "Format Version"
}
},
"required": [
"type",
"format_version"
],
"title": "An invalid resource description",
"type": "object"
}
Fields:
-
_validation_summary(ValidationSummary | None) -
type(Any) -
format_version(Any)
file_name
property
¤
file_name: FileName | None
File name of the bioimageio.yaml file the description was loaded from.
implemented_format_version
class-attribute
¤
implemented_format_version: Literal['unknown'] = 'unknown'
implemented_format_version_tuple
class-attribute
¤
implemented_format_version_tuple: tuple[int, int, int]
root
property
¤
root: RootHttpUrl | DirectoryPath | ZipFile
The URL/Path prefix to resolve any relative paths with.
__pydantic_init_subclass__
classmethod
¤
__pydantic_init_subclass__(**kwargs: Any)
Source code in src/bioimageio/spec/_internal/common_nodes.py
201 202 203 204 205 206 207 208 209 210 211 212 213 | |
dict_from_kwargs
classmethod
¤
dict_from_kwargs(
*args: P.args, **kwargs: P.kwargs
) -> dict[str, Any]
Source code in src/bioimageio/spec/_internal/node.py
93 94 95 96 97 98 | |
get_package_content
¤
get_package_content(
local_files_only: bool = False,
) -> dict[FileName, FileDescr | BioimageioYamlContent]
Returns package content without creating the package.
Source code in src/bioimageio/spec/_internal/common_nodes.py
392 393 394 395 396 397 398 399 400 401 402 403 404 405 406 407 408 | |
get_reason
¤
get_reason() -> str | None
Get the reason why the description is invalid, if available.
Source code in src/bioimageio/spec/_internal/common_nodes.py
430 431 432 433 434 435 436 437 438 439 440 441 442 443 444 445 446 447 | |
load
classmethod
¤
load(
data: IncompleteDescrView,
context: ValidationContext | None = None,
) -> Self | InvalidDescr
factory method to create a resource description object
Source code in src/bioimageio/spec/_internal/common_nodes.py
226 227 228 229 230 231 232 233 234 235 236 237 238 239 240 241 242 243 244 245 246 247 248 249 250 251 252 253 254 255 256 257 258 259 260 261 262 263 264 265 | |
load_from_kwargs
classmethod
¤
load_from_kwargs(
context: ValidationContext | None = None,
*args: P.args,
**kwargs: P.kwargs,
) -> T | InvalidDescr
Source code in src/bioimageio/spec/_internal/common_nodes.py
215 216 217 218 219 220 221 222 223 224 | |
model_validate
classmethod
¤
model_validate(
obj: Any | Mapping[str, Any],
*,
strict: bool | None = None,
extra: Literal["allow", "ignore", "forbid"]
| None = None,
from_attributes: bool | None = None,
context: ValidationContext
| Mapping[str, Any]
| None = None,
by_alias: bool | None = None,
by_name: bool | None = None,
) -> Self
Validate a pydantic model instance.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
|
Any | Mapping[str, Any]
|
The object to validate. |
required |
|
bool | None
|
Whether to raise an exception on invalid fields. |
None
|
|
bool | None
|
Whether to extract data from object attributes. |
None
|
|
ValidationContext | Mapping[str, Any] | None
|
Additional context to pass to the validator. |
None
|
Raises:
| Type | Description |
|---|---|
ValidationError
|
If the object failed validation. |
Returns:
| Type | Description |
|---|---|
Self
|
The validated description instance. |
Source code in src/bioimageio/spec/_internal/node.py
48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 | |
package
¤
package(
dest: ZipFile | IO[bytes] | Path | str | None = None,
/,
local_files_only: bool = False,
) -> ZipFile
package the described resource as a zip archive
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
|
ZipFile | IO[bytes] | Path | str | None
|
(path/bytes stream of) destination zipfile |
None
|
Source code in src/bioimageio/spec/_internal/common_nodes.py
359 360 361 362 363 364 365 366 367 368 369 370 371 372 373 374 375 376 377 378 379 380 381 382 383 384 385 386 387 388 389 390 | |
ProgressbarLike
¤
Bases: Protocol
flowchart TD
bioimageio.spec.common.ProgressbarLike[ProgressbarLike]
click bioimageio.spec.common.ProgressbarLike href "" "bioimageio.spec.common.ProgressbarLike"
Progressbar protocol modeled after tqdm
Methods:
| Name | Description |
|---|---|
close |
|
reset |
|
set_description |
|
update |
|
Attributes:
| Name | Type | Description |
|---|---|---|
total |
int | None
|
|
close
abstractmethod
¤
close()
Source code in src/bioimageio/spec/_internal/progress.py
20 21 | |
reset
abstractmethod
¤
reset()
Source code in src/bioimageio/spec/_internal/progress.py
17 18 | |
set_description
abstractmethod
¤
set_description(description: str, /, refresh: bool = True)
Source code in src/bioimageio/spec/_internal/progress.py
23 24 | |
update
abstractmethod
¤
update(increment: int) -> Any
Source code in src/bioimageio/spec/_internal/progress.py
14 15 | |
RelativeFilePath
¤
Bases: RelativePathBase[Union[AbsoluteFilePath, HttpUrl, ZipPath]]
flowchart TD
bioimageio.spec.common.RelativeFilePath[RelativeFilePath]
bioimageio.spec._internal.io.RelativePathBase[RelativePathBase]
bioimageio.spec._internal.io.RelativePathBase --> bioimageio.spec.common.RelativeFilePath
click bioimageio.spec.common.RelativeFilePath href "" "bioimageio.spec.common.RelativeFilePath"
click bioimageio.spec._internal.io.RelativePathBase href "" "bioimageio.spec._internal.io.RelativePathBase"
A path relative to the rdf.yaml file (also if the RDF source is a URL).
-
v0_2NotebookSource -
v0_3NotebookSource -
API Reference
commonFileSource
Methods:
| Name | Description |
|---|---|
__repr__ |
|
__str__ |
|
absolute |
get the absolute path/url |
format |
|
get_absolute |
|
model_post_init |
add validation @private |
Attributes:
| Name | Type | Description |
|---|---|---|
parent |
RelativeDirectory
|
|
path |
PurePath
|
|
suffix |
|
__repr__
¤
__repr__() -> str
Source code in src/bioimageio/spec/_internal/io.py
156 157 | |
__str__
¤
__str__() -> str
Source code in src/bioimageio/spec/_internal/io.py
153 154 | |
absolute
¤
absolute() -> AbsolutePathT
get the absolute path/url
(resolved at time of initialization with the root of the ValidationContext)
Source code in src/bioimageio/spec/_internal/io.py
131 132 133 134 135 136 137 138 | |
format
¤
format() -> str
Source code in src/bioimageio/spec/_internal/io.py
159 160 161 | |
get_absolute
¤
get_absolute(
root: RootHttpUrl | Path | pydantic.AnyUrl | ZipFile,
) -> AbsoluteFilePath | HttpUrl | ZipPath
Source code in src/bioimageio/spec/_internal/io.py
221 222 223 224 225 226 227 228 229 230 231 232 233 | |
model_post_init
¤
model_post_init(__context: Any) -> None
add validation @private
Source code in src/bioimageio/spec/_internal/io.py
214 215 216 217 218 219 | |
RootHttpUrl
¤
Bases: _RootUrl[pydantic.HttpUrl]
flowchart TD
bioimageio.spec.common.RootHttpUrl[RootHttpUrl]
bioimageio.spec._internal.root_url._RootUrl[_RootUrl]
bioimageio.spec._internal.validated_string.ValidatedString[ValidatedString]
bioimageio.spec._internal.root_url._RootUrl --> bioimageio.spec.common.RootHttpUrl
bioimageio.spec._internal.validated_string.ValidatedString --> bioimageio.spec._internal.root_url._RootUrl
click bioimageio.spec.common.RootHttpUrl href "" "bioimageio.spec.common.RootHttpUrl"
click bioimageio.spec._internal.root_url._RootUrl href "" "bioimageio.spec._internal.root_url._RootUrl"
click bioimageio.spec._internal.validated_string.ValidatedString href "" "bioimageio.spec._internal.validated_string.ValidatedString"
An untested HTTP URL, possibly a 'URL folder'
-
v0_2HttpUrl -
v0_2HttpUrl -
v0_2HttpUrl -
v0_3HttpUrl -
v0_3HttpUrl -
v0_3HttpUrl -
v0_3HttpUrl -
v0_4HttpUrl -
v0_5HttpUrl -
API Reference
commonHttpUrl
-
API Reference
commonBytesReader
Methods:
| Name | Description |
|---|---|
__get_pydantic_core_schema__ |
|
__get_pydantic_json_schema__ |
|
__new__ |
|
__truediv__ |
|
absolute |
analog to |
Attributes:
| Name | Type | Description |
|---|---|---|
host |
str | None
|
|
parent |
RootHttpUrl
|
|
parents |
Iterable[RootHttpUrl]
|
iterate over all URL parents (max 100) |
path |
str | None
|
|
root_model |
type[RootModel[Any]]
|
the pydantic root model to validate the string |
scheme |
str
|
|
suffix |
str
|
|
suffixes |
list[str]
|
|
root_model
class-attribute
¤
the pydantic root model to validate the string
__get_pydantic_core_schema__
classmethod
¤
__get_pydantic_core_schema__(
source_type: Any, handler: GetCoreSchemaHandler
) -> CoreSchema
Source code in src/bioimageio/spec/_internal/validated_string.py
31 32 33 34 35 | |
__get_pydantic_json_schema__
classmethod
¤
__get_pydantic_json_schema__(
core_schema: CoreSchema, handler: GetJsonSchemaHandler
) -> JsonSchemaValue
Source code in src/bioimageio/spec/_internal/validated_string.py
37 38 39 40 41 42 43 44 45 46 | |
__new__
¤
__new__(object: object)
Source code in src/bioimageio/spec/_internal/validated_string.py
21 22 23 24 25 | |
__truediv__
¤
__truediv__(other: str) -> RootHttpUrl
Source code in src/bioimageio/spec/_internal/root_url.py
52 53 54 55 56 57 58 59 60 61 62 63 64 | |
absolute
¤
absolute()
analog to absolute method of pathlib.
Source code in src/bioimageio/spec/_internal/root_url.py
22 23 24 | |
Sha256
¤
Bases: ValidatedString
flowchart TD
bioimageio.spec.common.Sha256[Sha256]
bioimageio.spec._internal.validated_string.ValidatedString[ValidatedString]
bioimageio.spec._internal.validated_string.ValidatedString --> bioimageio.spec.common.Sha256
click bioimageio.spec.common.Sha256 href "" "bioimageio.spec.common.Sha256"
click bioimageio.spec._internal.validated_string.ValidatedString href "" "bioimageio.spec._internal.validated_string.ValidatedString"
A SHA-256 hash value
-
API Reference
utilsget_sha256
Methods:
| Name | Description |
|---|---|
__get_pydantic_core_schema__ |
|
__get_pydantic_json_schema__ |
|
__new__ |
|
Attributes:
| Name | Type | Description |
|---|---|---|
root_model |
type[RootModel[Any]]
|
the pydantic root model to validate the string |
root_model
class-attribute
¤
root_model: type[RootModel[Any]] = RootModel[
Annotated[
str,
StringConstraints(
strip_whitespace=True,
to_lower=True,
min_length=64,
max_length=64,
),
]
]
the pydantic root model to validate the string
__get_pydantic_core_schema__
classmethod
¤
__get_pydantic_core_schema__(
source_type: Any, handler: GetCoreSchemaHandler
) -> CoreSchema
Source code in src/bioimageio/spec/_internal/validated_string.py
31 32 33 34 35 | |
__get_pydantic_json_schema__
classmethod
¤
__get_pydantic_json_schema__(
core_schema: CoreSchema, handler: GetJsonSchemaHandler
) -> JsonSchemaValue
Source code in src/bioimageio/spec/_internal/validated_string.py
37 38 39 40 41 42 43 44 45 46 | |
__new__
¤
__new__(object: object)
Source code in src/bioimageio/spec/_internal/validated_string.py
21 22 23 24 25 | |